Define shorthand for text spanner, like rit. or rall.

Revision as of 18:47, 16 November 2025 by Jean Abou Samra (talk | contribs) (Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series)

To obtain a textual indication like "rit." or "rall." followed by a dashed line, you have to first set bound-details.left.text. However, it is easy to define a shorthand to both set the text and start the text spanner.

\version "2.24"

rit = 
  \tweak bound-details.left.text #"rit. "
  \startTextSpan 

rall = 
  \tweak bound-details.left.text #"rall. "
  \startTextSpan 

% If you prefer the syntax \rit ... \stopRit:
stopRit = \stopTextSpan

\fixed c' {
  c4 d e \rit f |
  g1 \stopRit
  c4 d e _\rall f |
  g1 \stopTextSpan
}