Next: , Previous: Text scripts, Up: Writing text


Text spanners

Some performance indications, e.g., rallentando or accelerando, are written as text and are extended over multiple notes with dotted lines. Such objects, called “spanners”, may be created from one note to another using the following syntax:

     
     \override TextSpanner #'(bound-details left text) = "rit."
     b1\startTextSpan
     e,\stopTextSpan

[image of music]

The string to be printed is set through object properties. By default it is printed in italic characters, but different formatting can be obtained using \markup blocks, as described in Formatting text.

     
     \override TextSpanner #'(bound-details left text) =
       \markup { \upright "rit." }
     b1\startTextSpan c
     e,\stopTextSpan

[image of music]

The line style, as well as the text string, can be defined as an object property. This syntax is described in Line styles.

Predefined commands

\textSpannerUp, \textSpannerDown, \textSpannerNeutral.

See also

Notation Reference: Line styles, Dynamics.

Snippets: Text.

Internals Reference: TextSpanner.

Other languages: français, español, deutsch.