Next: Selecting font and font size, Up: Formatting text
A \markup block is used to typeset text with an extensible
syntax called “markup mode”.
The markup syntax is similar to LilyPond's usual syntax: a
\markup expression is enclosed in curly braces {
... }. A single word is regarded as a minimal expression,
and therefore does not need to be enclosed with braces.
Unlike simple “quoted text” indications, \markup blocks
may contain nested expressions or markup commands,
entered using the backslash \ character.
Such commands only affect the first following expression.
a1-\markup intenso
a2^\markup { poco \italic più forte }
c e1
d2_\markup { \italic "string. assai" }
e
b1^\markup { \bold { molto \italic agitato } }
c
A \markup block may also contain quoted text strings.
Such strings are treated as minimal text expressions, and
therefore any markup command or special character (such as
\ and #) will be printed verbatim without affecting
the formatting of the text. Double quotation marks themselves
may be printed by preceding them with backslashes.
a1^"\italic markup..."
a_\markup { \italic "... prints \"italic\" letters!" }
a a
To be treated as a distinct expression, a list of words needs
to be enclosed with double quotes or preceded by a command.
The way markup expressions are defined affects how these
expressions will be stacked, centered and aligned; in the
following example, the second \markup expression is
treated the same as the first one:
c1^\markup { \center-column { a bbb c } }
c1^\markup { \center-column { a { bbb c } } }
c1^\markup { \center-column { a \line { bbb c } } }
c1^\markup { \center-column { a "bbb c" } }
Markups can be stored in variables. Such variables may be directly attached to notes:
allegro = \markup { \bold \large Allegro }
{
d''8.^\allegro
d'16 d'4 r2
}
An exhaustive list of \markup-specific commands can be found in
Text markup commands.
Notation Reference: Text markup commands.
Snippets: Text.
Installed files: scm/markup.scm.
Syntax errors for markup mode can be confusing.