Next: Selecting font and font size, Up: Formatting text
A \markup block is used to typeset text with an extensible
specific 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 specific commands,
entered using the backslash \ character.
Such commands only affect the first following expression.
e1-\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. This syntax even allows to print
double quotation marks, by preceding them with backslashes
d1^"\italic markup..."
d_\markup \italic "... prints \"italic\" letters!"
d d
The way markup expressions are defined affects how these expressions will stacked, centered and aligned when using the commands explained in Text alignment.
c1^\markup { \column { a bbbb \line { c d } } }
c1^\markup { \center-column { a bbbb c } }
c1^\markup { \line { a b c } }
Lists of words that are not enclosed with double quotes
or preceded by a command are not treated as a distinct
expression. In the following example, the first two
\markup expressions are equivalent:
c1^\markup { \center-column { a bbb c } }
c1^\markup { \center-column { a { bbb c } } }
c1^\markup { \center-column { a \line { bbb c } } }
Markups can be stored in variables. These 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.
This manual: Text markup commands.
Snippets: Text.
Internals Reference: TextScript.
Init files: scm/new-markup.scm.
Syntax errors for markup mode can be confusing.
Diese Seite ist für LilyPond-2.11.58 (Entwicklungszweig).
Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.
Ihre Vorschläge für die Dokumentation sind willkommen.