| [ << Notationsübersicht ] | [Top][Contents][Index] | [ Befehlsübersicht >> ] |
| [ < Textbeschriftungsbefehle ] | [ Up: Textbeschriftungsbefehle ] | [ Markup for text alignment > ] |
A.10.1 Font markup
\abs-fontsizesize (number) arg (markup) ¶Use size as the absolute font size (in points) to display arg.
This function adjusts the
baseline-skipandword-spaceproperties accordingly.\markup { default text font size \hspace #2 \abs-fontsize #16 { text font size 16 } \hspace #2 \abs-fontsize #12 { text font size 12 } }
Used properties:
-
baseline-skip(3) -
word-space(0.6)
-
\boldarg (markup) ¶Print arg with a bold face.
\markup { default \hspace #2 \bold bold }
The code
\markup \bold …is a shorthand for\markup \override #'(font-series . bold) …– using the more verbose form, it is possible to obtain nuances such as semi-bold, if the text font has such variants. Refer to the documentation for thefont-seriesproperties (User backend properties).\boxarg (markup) ¶-
Draw a box around arg.
This function looks at the
thickness,box-padding, andfont-sizeproperties to determine the line thickness and padding around the markup.\markup { \override #'(box-padding . 0.5) \box \line { V. S. } }
Note that the box does not horizontally displace its argument. Use markup commands like
\left-alignor\tableto make LilyPond realign it.\markup { \override #'(box-padding . 1.5) \column { "text" \box "text" \left-align \box "text" } }
Used properties:
-
box-padding(0.2) -
font-size(0) -
thickness(1)
-
\capsarg (markup) ¶Print arg in (fake) small caps.
This function is a copy of the
\smallCapscommand.\markup { default \hspace #2 \caps { Text in small caps } }
Use
\fontCapsfor real small caps (if the font provides it).\dynamicarg (markup) ¶Print arg using the (music) font for dynamics.
This font only contains letters f, m, n, p, r, s, and z. When producing phrases like ‚più f‘, the normal words (like ‚più‘) should be done in a different font. The recommended font for this is bold and italic.
\markup { \dynamic { sfzp } }
\figured-bassarg (markup) ¶Set arg as small numbers for figured bass.
Specially slashed digits can be achieved with a trailing backslash (for numbers 6, 7, and 9) or a trailing plus (for numbers 2, 4, and 5).2
The use of a backslash is in analogy to
\figuremode(see Eingabe des Generalbass’). Note that to get a backslash character in markup it must be escaped by doubling it. Additionally, it must be put into double quotes.\markup { \figured-bass { 2 3 4+ 7 "9\\" } }
\fingerarg (markup) ¶Set arg as small numbers for fingering instructions.
\markup { \finger { 1 2 3 4 5 } }
\fontCapsarg (markup) ¶Print arg in small caps.
This command sets the
font-variantproperty tosmall-caps.Unlike
\smallCaps, which merely uses capital letters at a smaller font size, this uses the actual variant of the font for small caps. (As a consequence, if you configure a custom text font, this command has no effect if that font does not have a small caps variant.)\markup \fontCaps "Small caps"
\fontsizeincrement (number) arg (markup) ¶Increase current font size by increment to print arg.
This function adjusts the
baseline-skipandword-spaceproperties accordingly.\markup { default \hspace #2 \fontsize #-1.5 smaller }
Used properties:
-
baseline-skip(2) -
word-space(1) -
font-size(0)
-
\hugearg (markup) ¶Set font size to value 2 to print arg.
\markup { default \hspace #2 \huge huge }
\italicarg (markup) ¶Print arg in italics.
This command sets the
font-shapeproperty toitalic.\markup { default \hspace #2 \italic italic }
\largearg (markup) ¶Set font size to value 1 to print arg.
\markup { default \hspace #2 \large large }
\largerarg (markup) ¶Increase current font size by 1 to print arg.
This function adjusts the
baseline-skipandword-spaceproperties accordingly.\markup { default \hspace #2 \larger larger }
\magnifysz (number) arg (markup) ¶-
Magnify current font by factor sz to print arg.
\markup { default \hspace #2 \magnify #1.5 { 50% larger } }
Note that magnification only works if a font name is explicitly selected. Use
\fontsizeotherwise. \normal-size-subarg (markup) ¶-
Set arg in subscript with a normal font size.
\markup { default \normal-size-sub { subscript in standard size } }
Used properties:
-
font-size(0)
-
\normal-size-superarg (markup) ¶-
Set arg in superscript with a normal font size.
\markup { default \normal-size-super { superscript in standard size } }
Used properties:
-
font-size(0)
-
\normal-textarg (markup) ¶Print arg with default text font.
This resets all font-related properties (except the size), no matter what font was used earlier.
\markup { \huge \bold \sans \fontCaps { huge bold sans caps \hspace #2 \normal-text { huge normal } \hspace #2 as before } }
\normal-weightarg (markup) ¶Switch to normal weight (in contrast to bold) to print arg.
This command sets the
font-seriesproperty tonormal.\markup { \bold { some bold text \hspace #2 \normal-weight { normal font series } \hspace #2 bold again } }
\normalsizearg (markup) ¶Set font size to default (i.e., to value 0) to print arg.
\markup { \teeny { this is very small \hspace #2 \normalsize { normal size } \hspace #2 teeny again } }
\numberarg (markup) ¶Print arg using the (music) font for numbers.
This font also contains symbols for figured bass, some punctuation, spaces of various widths, some letters and text variants of accidentals. Use
\dynamicto access the (very small number of) letters. For accidentals you might use\numberin combination with Unicode characters to access the text representation forms of accidental glyphs, as the following table shows.
To get accidentals protected against overrides of
font-nameit is preferable to use\text-doubleflat,\text-flat,\text-natural,\text-sharp,\text-doublesharpor the general\text-accidentalfor the text variants of accidentals.The appearance of digits in the Emmentaler font can be controlled with four OpenType features: ‚tnum‘, ‚cv47‘, ‚ss01‘, and ‚kern‘, which can be arbitrarily combined.
- tnum
If off (which is the default), glyphs ‚zero‘ to ‚nine‘ have no left and right side bearings. If on, the glyphs all have the same advance width by making the bearings non-zero.
- cv47
If on, glyphs ‚four‘ and ‚seven‘ have shorter vertical strokes. Default is off.
- ss01
If on, glyphs ‚zero‘ to ‚nine‘ have a fatter design, making them more readable at small sizes. Default is off.
- kern
If on (which is the default), provide pairwise kerning between (most) glyphs.
\markuplist \number \fontsize #4.5 \override #'((padding . 2) (baseline-skip . 4) (box-padding . 0) (thickness . 0.1)) \table #'(-1 -1 -1 -1) { 0123456789 \box 147 \concat { \box 1 \box 4 \box 7 } \normal-text \normalsize "(time signatures)" \override #'(font-features .("cv47")) { 0123456789 \box 147 \concat { \box 1 \box 4 \box 7 } } \normal-text \normalsize "(alternatives)" \override #'(font-features .("tnum" "cv47" "-kern")) { 0123456789 \box 147 \concat { \box 1 \box 4 \box 7 } } \normal-text \normalsize "(fixed-width)" \override #'(font-features . ("tnum" "cv47" "ss01")) { 0123456789 \box 147 \concat { \box 1 \box 4 \box 7 } } \normal-text \normalsize "(figured bass)" \override #'(font-features . ("cv47" "ss01")) { 0123456789 \box 147 \concat { \box 1 \box 4 \box 7 } } \normal-text \normalsize "(fingering)" }
See also the markup commands
\figured-bassand\finger, which set the font features accordingly.\overtiearg (markup) ¶-
Overtie arg.
\markup \line { \overtie "overtied" \override #'((offset . 5) (thickness . 1)) \overtie "overtied" \override #'((offset . 1) (thickness . 5)) \overtie "overtied" }
Used properties:
-
shorten-pair((0 . 0)) -
height-limit(0.7) -
direction(1) -
offset(2) -
thickness(1)
-
\replacereplacements (list) arg (markup) ¶Use replacements to replace strings in arg.
Each
(key . value)pair of the replacements alist specifies what should be replaced; key gets replaced by value. Note the quasiquoting syntax with a backquote in the second example.\markup \replace #'(("2nd" . "Second")) "2nd time" \markup \replace #`(("2nd" . ,#{ \markup \concat { 2 \super nd } #})) \center-column { \line { Play only } \line { the 2nd time } }
Used properties:
-
replacement-alist
-
\sansarg (markup) ¶Print arg with a sans-serif font.
This command sets the
font-familyproperty tosans.\markup { default \hspace #2 \sans { sans serif } }
\serifarg (markup) ¶Print arg with a serif font.
This command sets the
font-familyproperty toserif.\markup { \sans \bold { sans serif, bold \hspace #2 \serif { text in serif font } \hspace #2 return to sans } }
\simplestr (string) ¶Print string str.
\markup \simple "x"is equivalent to\markup "x". This command was previously used internally, but no longer is, and is being kept for backward compatibility only.\smallarg (markup) ¶Set font size to value -1 to print arg.
\markup { default \hspace #2 \small small }
\smallCapsarg (markup) ¶Print arg in (fake) small caps.
Unlike
\fontCaps, which uses the actual small caps variant of the current font, this fakes small caps by using capital letters at a smaller font size. It can thus be used for fonts that don’t have a small caps variant.\markup { default \hspace #2 \smallCaps { Text in small caps } }
\smallerarg (markup) ¶Decrease current font size by 1 to print arg.
This function adjusts the
baseline-skipandword-spaceproperties accordingly.\markup { \fontsize #3.5 { large text \hspace #2 \smaller { smaller text } \hspace #2 large text } }
\subarg (markup) ¶-
Set arg in subscript.
\markup { \concat { H \sub 2 O } }
Ssee also
\super.Used properties:
-
font-size(0)
-
\superarg (markup) ¶-
Set arg in superscript.
\markup { E = \concat { mc \super 2 } }
See also
\sub.Used properties:
-
font-size(0)
-
\teenyarg (markup) ¶Set font size to value -3 to print arg.
\markup { default \hspace #2 \teeny teeny }
\tiearg (markup) ¶-
Add a horizontal bow at the bottom or top of arg.
This function uses
make-tie-stencilto create the bow; it looks at thethicknessandoffsetproperties to determine the line thickness and vertical offset, respectively. The added bow fits the extent of arg; use theshorten-pairproperty to modify this. Thedirectionproperty may be set explicitly usingoverrideor direction modifiers, or implicitly by usingvoiceOne, etc.\markup { \override #'(direction . 1) \tie "above" \override #'(direction . -1) \tie "below" }
See also
\undertieand\overtie, which are shorthands for this function.Used properties:
-
shorten-pair((0 . 0)) -
height-limit(0.7) -
direction(1) -
offset(2) -
thickness(1)
-
\tinyarg (markup) ¶Set font size to value -2 to print arg.
\markup { default \hspace #2 \tiny tiny }
\typewriterarg (markup) ¶Print arg in typewriter.
This command sets the
font-familyproperty totypewriter, also switching off the ‚liga‘ OpenType feature to disable ligatures like ‚ff‘ or ‚fi‘.\markup { "default fi ff" \hspace #2 \typewriter "typewriter fi ff" }
\underlinearg (markup) ¶-
Underline arg.
This function looks at the property
thicknessto determine the line thickness, atoffsetto determine the line’s vertical offset from arg, and atunderline-skipto determine the distance of additional lines from the others.The
underline-shiftproperty is used to make subsequent calls work correctly. Overriding it makes little sense since it would end up adding the provided value to the one ofoffset.\markup \justify-line { \underline "underlined" \override #'(offset . 5) \override #'(thickness . 1) \underline "underlined" \override #'(offset . 1) \override #'(thickness . 5) \underline "underlined" \override #'(offset . 5) \override #'(underline-skip . 4) \underline \underline \underline "underlined thrice" }
Used properties:
-
underline-skip(2) -
underline-shift(0) -
offset(2) -
thickness(1)
-
\undertiearg (markup) ¶-
Print a tie under arg.
\markup \line { \undertie "undertied" \override #'((offset . 5) (thickness . 1)) \undertie "undertied" \override #'((offset . 1) (thickness . 5)) \undertie "undertied" }
Used properties:
-
shorten-pair((0 . 0)) -
height-limit(0.7) -
direction(1) -
offset(2) -
thickness(1)
-
\uprightarg (markup) ¶Print arg upright.
This command is the opposite of
\italic; it sets thefont-shapeproperty toupright.\markup { \italic { italic text \hspace #2 \upright { upright text } \hspace #2 italic again } }
\volta-numberarg (markup) ¶Set arg in a font appropriate for volta numbers.
\markup \volta-number "4."
\with-string-transformertransformer (procedure) arg (markup) ¶Apply string transformer function transformer to arg.
Whenever a string is interpreted inside arg, function transformer is called first, and its result is then interpreted. The arguments passed to transformer are the output definition, the property alist chain, and the markup arg. See New markup command definition about the two first arguments.
\markup \with-string-transformer #(lambda (layout props str) (string-upcase str)) \concat { "abc" \larger "def" }
Footnotes
(2)
Internally, this works by activating the ‚dlig‘ OpenType feature of the Emmentaler font.
| [ << Notationsübersicht ] | [Top][Contents][Index] | [ Befehlsübersicht >> ] |
| [ < Textbeschriftungsbefehle ] | [ Up: Textbeschriftungsbefehle ] | [ Markup for text alignment > ] |