Next: , Previous: Nested scores, Up: Text


8.1.6 Overview of text markup commands

The following commands can all be used inside \markup { }.

\arrow-head axis (integer) direction (direction) filled (boolean)
produce an arrow head in specified direction and axis. Use the filled head if filled is specified.
\beam width (number) slope (number) thickness (number)
Create a beam with the specified parameters.
\bigger arg (markup)
Increase the font size relative to current setting
\bold arg (markup)
Switch to bold font-series
\box arg (markup)
Draw a box round arg. Looks at thickness, box-padding and font-size properties to determine line thickness and padding around the markup.
\bracket arg (markup)
Draw vertical brackets around arg.
\bracketed-y-column indices (list) args (list of markups)
Make a column of the markups in args, putting brackets around the elements marked in indices, which is a list of numbers.
\caps arg (markup)

\center-align args (list of markups)
Put args in a centered column.
\char num (integer)
Produce a single character, e.g. \char #65 produces the letter 'A'.
\circle arg (markup)
Draw a circle around arg. Use thickness, circle-padding and font-size properties to determine line thickness and padding around the markup.
\column args (list of markups)
Stack the markups in args vertically. The property baseline-skip determines the space between each markup in args.
\combine m1 (markup) m2 (markup)
Print two markups on top of each other.
\dir-column args (list of markups)
Make a column of args, going up or down, depending on the setting of the #'direction layout property.
\doubleflat
Draw a double flat symbol.
\doublesharp
Draw a double sharp symbol.
\draw-circle radius (number) thickness (number) fill (boolean)
A circle of radius radius, thickness thickness and optionally filled.
\dynamic arg (markup)
Use the dynamic font. This font only contains s, f, m, z, p, and r. When producing phrases, like “più f”, the normal words (like “più”) should be done in a different font. The recommend font for this is bold and italic
\epsfile axis (number) size (number) file-name (string)
Inline an EPS image. The image is scaled along axis to size.
\fill-line markups (list of markups)
Put markups in a horizontal line of width line-width. The markups are spaced/flushed to fill the entire line. If there are no arguments, return an empty stencil.
\filled-box xext (pair of numbers) yext (pair of numbers) blot (number)
Draw a box with rounded corners of dimensions xext and yext. For example,
     
     \filled-box #'(-.3 . 1.8) #'(-.3 . 1.8) #0
create a box extending horizontally from -0.3 to 1.8 and vertically from -0.3 up to 1.8, with corners formed from a circle of diameter 0 (ie sharp corners).
\finger arg (markup)
Set the argument as small numbers.
\flat
Draw a flat symbol.
\fontCaps arg (markup)
Set font-shape to caps.
\fontsize increment (number) arg (markup)
Add increment to the font-size. Adjust baseline skip accordingly.
\fraction arg1 (markup) arg2 (markup)
Make a fraction of two markups.
\fret-diagram definition-string (string)
Example
      \markup \fret-diagram #"s:0.75;6-x;5-x;4-o;3-2;2-3;1-2;"

for fret spacing 3/4 of staff space, D chord diagram

Syntax rules for definition-string:


\fret-diagram-terse definition-string (string)
Make a fret diagram markup using terse string-based syntax.

Example

      \markup \fret-diagram-terse #"x;x;o;2;3;2;"

for a D chord diagram.

Syntax rules for definition-string:


\fret-diagram-verbose marking-list (list)
Make a fret diagram containing the symbols indicated in marking-list

For example,

        \markup \fret-diagram-verbose #'((mute 6) (mute 5) (open 4)
             (place-fret 3 2) (place-fret 2 3) (place-fret 1 2))

will produce a standard D chord diagram without fingering indications.

Possible elements in marking-list:

(mute string-number)
Place a small 'x' at the top of string string-number
(open string-number)
Place a small 'o' at the top of string string-number
(barre start-string end-string fret-number)
Place a barre indicator (much like a tie) from string start-stringto string end-string at fret fret-number
(place-fret string-number fret-number finger-value)
Place a fret playing indication on string string-number at fret fret-number with an optional fingering label finger-value. By default, the fret playing indicator is a solid dot. This can be changed by setting the value of the variable dot-color. If the finger part of the place-fret element is present, finger-value will be displayed according to the setting of the variable finger-code. There is no limit to the number of fret indications per string.

\fromproperty symbol (symbol)
Read the symbol from property settings, and produce a stencil from the markup contained within. If symbol is not defined, it returns an empty markup
\general-align axis (integer) dir (number) arg (markup)
Align arg in axis direction to the dir side.
\halign dir (number) arg (markup)
Set horizontal alignment. If dir is -1, then it is left-aligned, while +1 is right. Values in between interpolate alignment accordingly.
\hbracket arg (markup)
Draw horizontal brackets around arg.
\hcenter-in length (number) arg (markup)
Center arg horizontally within a box of extending length/2 to the left and right.
\hcenter arg (markup)
Align arg to its X center.
\hspace amount (number)
This produces a invisible object taking horizontal space.
     \markup { A \hspace #2.0 B }

will put extra space between A and B, on top of the space that is normally inserted before elements on a line.

\huge arg (markup)
Set font size to +2.
\italic arg (markup)
Use italic font-shape for arg.
\justify-field symbol (symbol)

\justify args (list of markups)
Like wordwrap, but with lines stretched to justify the margins. Use \override #'(line-width . X) to set line-width, where X is the number of staff spaces.
\justify-string arg (string)
Justify a string. Paragraphs may be separated with double newlines
\large arg (markup)
Set font size to +1.
\left-align arg (markup)
Align arg on its left edge.
\line args (list of markups)
Put args in a horizontal line. The property word-space determines the space between each markup in args.
\lookup glyph-name (string)
Lookup a glyph by name.
\lower amount (number) arg (markup)
Lower arg, by the distance amount. A negative amount indicates raising, see also \raise.
\magnify sz (number) arg (markup)
Set the font magnification for the its argument. In the following example, the middle A will be 10% larger:
     A \magnify #1.1 { A } A

Note: magnification only works if a font-name is explicitly selected. Use \fontsize otherwise.

\markalphabet num (integer)
Make a markup letter for num. The letters start with A to Z and continues with double letters.
\markletter num (integer)
Make a markup letter for num. The letters start with A to Z (skipping I), and continues with double letters.
\medium arg (markup)
Switch to medium font-series (in contrast to bold).
\musicglyph glyph-name (string)
This is converted to a musical symbol, e.g. \musicglyph #"accidentals.0" will select the natural sign from the music font. See The Feta font for a complete listing of the possible glyphs.
\natural
Draw a natural symbol.
\normal-size-sub arg (markup)
Set arg in subscript, in a normal font size.
\normal-size-super arg (markup)
Set arg in superscript with a normal font size.
\normal-text arg (markup)
Set all font related properties (except the size) to get the default normal text font, no matter what font was used earlier.
\normalsize arg (markup)
Set font size to default.
\note-by-number log (number) dot-count (number) dir (number)
Construct a note symbol, with stem. By using fractional values for dir, you can obtain longer or shorter stems.
\note duration (string) dir (number)
This produces a note with a stem pointing in dir direction, with the duration for the note head type and augmentation dots. For example, \note #"4." #-0.75 creates a dotted quarter note, with a shortened down stem.
\null
An empty markup with extents of a single point
\number arg (markup)
Set font family to number, which yields the font used for time signatures and fingerings. This font only contains numbers and some punctuation. It doesn't have any letters.
\on-the-fly procedure (symbol) arg (markup)
Apply the procedure markup command to arg. procedure should take a single argument.
\override new-prop (pair) arg (markup)
Add the first argument in to the property list. Properties may be any sort of property supported by font-interface and text-interface, for example
     
     \override #'(font-family . married) "bla"

\pad-around amount (number) arg (markup)
Add padding amount all around arg.
\pad-markup padding (number) arg (markup)
Add space around a markup object.
\pad-to-box x-ext (pair of numbers) y-ext (pair of numbers) arg (markup)
Make arg take at least x-ext, y-ext space
\pad-x amount (number) arg (markup)
Add padding amount around arg in the X-direction.
\postscript str (string)
This inserts str directly into the output as a PostScript command string. Due to technicalities of the output backends, different scales should be used for the TeX and PostScript backend, selected with -f.

For the TeX backend, the following string prints a rotated text

     
     0 0 moveto /ecrm10 findfont 
     1.75 scalefont setfont 90 rotate (hello) show

The magical constant 1.75 scales from LilyPond units (staff spaces) to TeX dimensions.

For the postscript backend, use the following

     
     gsave /ecrm10 findfont 
      10.0 output-scale div 
      scalefont setfont 90 rotate (hello) show grestore 

\put-adjacent arg1 (markup) axis (integer) dir (direction) arg2 (markup)
Put arg2 next to arg1, without moving arg1.
\raise amount (number) arg (markup)
Raise arg, by the distance amount. A negative amount indicates lowering, see also \lower.
     
      c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}

[image of music]

The argument to \raise is the vertical displacement amount, measured in (global) staff spaces. \raise and \super raise objects in relation to their surrounding markups.

If the text object itself is positioned above or below the staff, then \raise cannot be used to move it, since the mechanism that positions it next to the staff cancels any shift made with \raise. For vertical positioning, use the padding and/or extra-offset properties.

\right-align arg (markup)
Align arg on its right edge.
\roman arg (markup)
Set font family to roman.
\rotate ang (number) arg (markup)
Rotate object with ang degrees around its center.
\sans arg (markup)
Switch to the sans serif family
\score score (unknown)
Inline an image of music.
\semiflat
Draw a semiflat.
\semisharp
Draw a semi sharp symbol.
\sesquiflat
Draw a 3/2 flat symbol.
\sesquisharp
Draw a 3/2 sharp symbol.
\sharp
Draw a sharp symbol.
\simple str (string)
A simple text string; \markup { foo } is equivalent with \markup { \simple #"foo" }.
\slashed-digit num (integer)
A feta number, with slash. This is for use in the context of figured bass notation
\small arg (markup)
Set font size to -1.
\smallCaps text (markup)
Turn text, which should be a string, to small caps.
     \markup \smallCaps "Text between double quotes"

\smaller arg (markup)
Decrease the font size relative to current setting
\stencil stil (unknown)
Stencil as markup
\strut
Create a box of the same height as the space in the current font.
\sub arg (markup)
Set arg in subscript.
\super arg (markup)

Raising and lowering texts can be done with \super and \sub:

     
      c1^\markup { E "=" mc \super "2" }

[image of music]


\teeny arg (markup)
Set font size to -3.
\text arg (markup)
Use a text font instead of music symbol or music alphabet font.
\tied-lyric str (string)
Like simple-markup, but use tie characters for ~ tilde symbols.
\tiny arg (markup)
Set font size to -2.
\translate offset (pair of numbers) arg (markup)
This translates an object. Its first argument is a cons of numbers
     A \translate #(cons 2 -3) { B C } D

This moves `B C' 2 spaces to the right, and 3 down, relative to its surroundings. This command cannot be used to move isolated scripts vertically, for the same reason that \raise cannot be used for that.

\translate-scaled offset (pair of numbers) arg (markup)
Translate arg by offset, scaling the offset by the font-size.
\transparent arg (markup)
Make the argument transparent
\triangle filled (boolean)
A triangle, filled or not
\typewriter arg (markup)
Use font-family typewriter for arg.
\upright arg (markup)
Set font shape to upright. This is the opposite of italic.
\vcenter arg (markup)
Align arg to its Y center.
\verbatim-file name (string)
Read the contents of a file, and include verbatimly
\whiteout arg (markup)
Provide a white underground for arg
\with-color color (list) arg (markup)
Draw arg in color specified by color
\with-dimensions x (pair of numbers) y (pair of numbers) arg (markup)
Set the dimensions of arg to x and y.
\with-url url (string) arg (markup)
Add a link to URL url around arg. This only works in the PDF backend.
\wordwrap-field symbol (symbol)

\wordwrap args (list of markups)
Simple wordwrap. Use \override #'(line-width . X) to set line-width, where X is the number of staff spaces.
\wordwrap-string arg (string)
Wordwrap a string. Paragraphs may be separated with double newlines


Next: , Previous: Nested scores, Up: Text

This page is for LilyPond-2.10.33 (stable-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.