@cindex Text scripts
@cindex text items, non-empty
@cindex non-empty texts
+@cindex quoted text
-It is possible to add arbitrary text indications
+Simple @q{quoted text} indications may be added
to a score, as demonstrated in the following example.
-Such indications can also be manually placed
+Such indications can be manually placed
above or below the staff, using the
simple syntax described in @ref{Direction and
placement}.
d8^"pizz." e f g a4-"scherz." f
@end lilypond
-In LilyPond, such text strings are called @command{markup}
-objects. This syntax is actually a shorthand; more complex text
+This syntax is actually a shorthand; more complex text
formatting may be added to a note by explicitly using a
@code{\markup} block, as described in @ref{Formatting text}.
Internals Reference: @rinternals{RehearsalMark}.
@knownissues
-@c IMO this is a bug; hopefully it'll be fixed soon, so I can
-@c delete this sentence. -gp
-@c A workaround is suggested in the first @snippets item -vv
+@c To be removed when Issue 69 in the tracker gets fixed. -vv
If a mark is entered at the end of the last bar of the score (where
there is no next line), then the mark will not be printed at
@predefined
-@funindex \markup
@code{\markup},
@funindex \markuplines
@code{\markuplines}
@cindex text markup
@cindex markup text
@cindex typeset text
+@funindex \markup
A @code{\markup} block is used to typeset text with an extensible
specific syntax called @qq{markup mode}.
@code{\markup} expression is enclosed in curly braces @code{@{
@dots{} @}}.
-In markup mode, specific commands are entered using the backslash
-@code{\} character. Such commands only affect the first following
-expression.
-
-Markup expressions may also be enclosed in double quotes
-@code{"..."}. Such expressions are treated as text strings
-and may not contain nested expressions or commands.
-Therefore, braces are generally prefered to double quotes;
-the following example demonstrates both syntaxes.
+Unlike simple @q{quoted text} indications, @code{\markup} blocks
+may contain nested expressions or specific commands,
+entered using the backslash @code{\} character.
+Such commands only affect the first following expression.
@lilypond[quote,verbatim,fragment,relative=1]
e1-\markup "intenso"
@cindex markup mode, special characters
@cindex reserved characters, printing
@cindex printing special characters
+@cindex quoted text in markup mode
-Special characters such as @code{\} and @code{#}
-can be printed in the output simply using double
-quotes. Double quotation marks are only printed
-in the output when preceded by backslashes:
+A @code{\markup} block may also contain quoted text, which
+can be useful to print special characters (such as @code{\} and @code{#}).
+Quoted text even allows to print double quotation marks, by preceding
+them with backslashes:
@lilypond[quote,verbatim,fragment,relative=1]
\clef bass
@end lilypond
Lists of words that are not enclosed with double quotes
-or preceded by a previous command are not kept distinct. In
+or preceded by a command are not kept distinct. In
the following example, the first two @code{\markup} expressions
are equivalent:
@knownissues
-@c FIXME: this is totally deprecated, isn't it? -vv
-Kerning or generation of ligatures is only done when the @TeX{}
-backend is used. In this case, LilyPond does not account for them
-so texts will be spaced slightly too wide.
-
-@c is the following sentence really relevant? -vv
Syntax errors for markup mode are confusing.
@node Common markup commands
@subsubsection Common markup commands
-Some basic formatting can be used blah blah
-
-
-
-@ignore
-TODO: here are some commands that could be described here.
-I'm putting them in bulk, prior to working on this section. -vv
-
-\simple
-
-\char
-\fraction
-
-\combine
-\concat
-\put-adjacent
-
-
-\page-ref (see also "Table of contents")
-\fromproperty
-\verbatim-file
-\with-url
-
-\on-the-fly
-\override
-
-
-\null
-\hspace
-
-\lower
-\raise
-\translate
-\translate-scaled
-\rotate
-\transparent
-\whiteout
-
-@end ignore
-
-
+Markup text may be formatted using simple commands.
@cindex font switching
+@funindex \italic
+@funindex \bold
+@funindex \underline
-Some font switching commands are demonstrated here.
+Basic font switching is supported:
-\italic
-\upright
-\bold
-\medium
-\underline
-
+@lilypond[quote,verbatim,relative=2]
+{
+ d1^\markup {
+ \bold { PiĆ¹ mosso }
+ \italic { non troppo \underline Vivo }
+ }
+ r2 r4 r8
+ d,_\markup { \italic quasi \smallCaps Tromba }
+ f1 d2 r
+}
+@end lilypond
-@c TODO: what's the difference between the following commands? -vv
-\smallCaps
-\caps
-\fontCaps
+@cindex font size
+@cindex text size
+@funindex \fontsize
+@funindex \small
+@funindex \large
+@funindex \smaller
+@funindex \larger
+@funindex \magnify
+
+The size of the characters can also be altered in different ways:
+@itemize
+@item
+the font size can be defined to an absolute value,
+@item
+predefined commands allow to easily select standard sizes,
-Some alternate font families can easily be selected:
+@item
+other commands allow to change the size relatively to its previous value.
+@end itemize
-\sans
-\typewriter
-\roman
-\number (only for numbers, such as fingerings and time signatures)
-@c TODO: add \slashed-digit here? -vv
+@noindent
+The following example demonstrates these three methods:
-The size can be blah blah blah
+@lilypond[quote,verbatim,relative=2]
+{
+ f1^\markup { \fontsize #5 Sinfonia }
+ a,_\markup {
+ \tiny espressivo
+ \large e
+ \normalsize intenso
+ }
+ bes^\markup { (con
+ \larger grande
+ \smaller emozione
+ \magnify #0.6 { e sentimento } )
+ }
+ d c2 r8 c bes a g1
+}
+@end lilypond
-\fontsize
+@cindex subscript
+@cindex superscript
+@funindex \super
+@funindex \sub
-Some predefined font sizes can be used blah blah
+Text may be printed as subscript or superscript. By default
+these are printed in a smaller size, but a normal size can be used as well:
-\teeny
-\tiny
-\small
-\normalsize
-\large
-\huge
+@lilypond[quote,verbatim]
+\markup {
+ \column {
+ \line { 1 \super st movement }
+ \line { 1 \normal-size-super st movement
+ \sub { (part two) } }
+ }
+}
+@end lilypond
-Some shorcuts allow to change the font size relatively to its previous value
+The markup mode provides an easy way to select alternate
+font families. The default serif font, of roman type, is automatically
+selected unless specified otherwise: on the last line of the following example,
+there is no difference between the first word and the following words.
-\smaller
-\bigger
-\larger
+@lilypond[quote,verbatim]
+\markup {
+ \column {
+ \line { Act \number 1 }
+ \line { \sans { Scene I. } }
+ \line { \typewriter { Verona. An open place. } }
+ \line { \roman Enter Valentine and Proteus. }
+ }
+}
+@end lilypond
+
+@noindent
+Some of these font families, used for specific items
+such as numbers or dynamics, do not provide all
+characters, as mentioned in @ref{New dynamic marks} and
+@ref{Manual repeat marks}.
-\magnify
-Text may be printed as subscript or superscript:
+Defining custom font sets is also possible, as explained in
+@ref{Fonts}.
-\sub
-\super
+An exhaustive list of font-switching, font-size and font-families related
+commands can be found in @ref{Font}.
-To obtain subscripts or superscripts in a normal text size, use
-\normal-size-sub
-\normal-size-super
+@c TODO: add @seealso
-All these settings (except the size) can be reverted to the default font:
+@knownissues
+When used inside a word, some of these commands may produce an unwanted
+blank space. This can easily be solved by concatenating the text
+elements together, using a specific command
+described in @ref{Text alignment}.
-\normal-text
@node Text alignment
@subsubsection Text alignment
+@warning{This subsection discusses how to place text in markup mode,
+inside a @code{\markup} block. However, markup objects can also
+be moved as a whole using the syntax described in
+@rlearning{Moving objects}.}
-Some objects have alignment procedures of their own, which cancel
-out any effects of alignments applied to their markup arguments as
-a whole. For example, the @rinternals{RehearsalMark} is
-horizontally centered, so using @code{\mark \markup @{ \left-align
-.. @}} has no effect.
-
-In addition, vertical placement is performed after creating the
-text markup object. If you wish to move an entire piece of
-markup, you need to use the #'padding property or create an
-@q{anchor} point inside the markup (generally with @code{\hspace
-#0}).
+Markup objects can be aligned in different ways. By default,
+a text indication is aligned on its left edge: in the following
+example, there's no difference between the first and the second
+markup.
@lilypond[quote,verbatim,fragment,relative=1]
-\textLengthOn
-c'4^\markup{ \raise #5 "not raised" }
-\once \override TextScript #'padding = #3
-c'4^\markup{ raised }
-c'4^\markup{ \hspace #0 \raise #1.5 raised }
+a1-\markup { poco }
+e'
+a,-\markup { \left-align poco }
+e'
+a,-\markup { \center-align { poco } }
+e'
+a,-\markup { \right-align poco }
@end lilypond
-Some situations (such as dynamic marks) have preset font-related
-properties. If you are creating text in such situations, it is
-advisable to cancel those properties with @code{normal-text}. See
-@ref{Text markup commands}, for more details.
-
-
-Alignment basics:
-\left-align
-\center-align
-\right-align
+@c FIXME: \center-align actually doesn't belong here
+@c \center-align vs \column
+@c \center-align vs \hcenter
Horizontal alignment:
\hcenter
\halign
+\null
+\hspace
+
+\lower
+\raise
+\translate
+\translate-scaled
+\rotate
+\transparent
+\whiteout
+
Vertical alignment:
\vcenter
\column
\wordwrap
\wordwrap-string
+
+@ignore
+TODO: here are some commands that could be described here.
+I'm putting them in bulk, prior to working on this section. -vv
+
+\simple
+
+\char
+\fraction
+
+\combine
+\concat
+\put-adjacent
+
+
+\page-ref (see also "Table of contents")
+\fromproperty
+\verbatim-file
+\with-url
+
+\on-the-fly
+\override
+
+
+
+@end ignore
+
+
+Some objects have alignment procedures of their own, which cancel
+out any effects of alignments applied to their markup arguments as
+a whole. For example, the @rinternals{RehearsalMark} is
+horizontally centered, so using @code{\mark \markup @{ \left-align
+.. @}} has no effect.
+
+
+
@node Graphic notation inside markup
@subsubsection Graphic notation inside markup
Graphics around text:
@code{\markuplines}
-
-@c TODO: move the following subsubsec into NR3 -vv
-@c maybe. -gp
@node Fonts
@subsection Fonts