[ << General input and output ] | [Top][Contents][Index] | [ Spacing issues >> ] |
[ < Unicode ] | [ Up : Special characters ] | [ Controlling output > ] |
ASCII aliases
A list of ASCII aliases for special characters can be included:
\paper { #(include-special-characters) } \markup "&flqq; – &OE;uvre incomplète… &frqq;" \score { \new Staff { \repeat unfold 9 a'4 } \addlyrics { This is al -- so wor -- kin'~in ly -- rics: –_&OE;… } } \markup \column { "The replacement can be disabled:" "– &OE; …" \override #'(replacement-alist . ()) "– &OE; …" }
You can also make your own aliases, either globally:
\paper { #(add-text-replacements! '(("100" . "hundred") ("dpi" . "dots per inch"))) } \markup "A 100 dpi."
or locally:
\markup \replace #'(("100" . "hundred") ("dpi" . "dots per inch")) "A 100 dpi."
The replacement is not necessarily a string; it can be an arbitrary markup. On the syntax level, this requires using Scheme quasi-quoting syntax, with a backtick ‘`’ instead of a quote ‘'’ to write the alist.
\markup \replace #`(("2nd" . ,#{ \markup \concat { 2 \super nd } #})) "2nd time"
Aliases themselves are not further processed for replacements.
See also
Notation Reference: List of special characters.
Installed Files: ly/text-replacements.ly.
[ << General input and output ] | [Top][Contents][Index] | [ Spacing issues >> ] |
[ < Unicode ] | [ Up : Special characters ] | [ Controlling output > ] |