2015-01-27 7:12 GMT+01:00 Noeck <[email protected]>:
[...]
>
> PS: Wouldn’t it be nice to have these commands (or similar):
> b1\startText "rit." c e,\stopText

Hi,

try:

\version "2.19.15" % is needed!

startMyTextSpan =
#(define-event-function (parser location txt mus)((markup? "")ly:music?)
  (if (and (string? txt) (string-null? txt))
      #{ \startTextSpan #}
      #{
        -\tweak TextSpanner.bound-details.left.text $txt
        \startTextSpan
      #}))


\relative c' {
    c1
        \startMyTextSpan \markup \with-color #red "whatever"
    d
    e
    f
    g\stopTextSpan

    \override TextSpanner.bound-details.left.text = "TEXT"
    c1
        \startMyTextSpan
    d
    e
    f
    g\stopTextSpan
}

HTH,
  Harm

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to