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

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.0"

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
}