Next: , Previous: Nested scores, Up: Text



8.1.7 Overview of text markup commands

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

\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)
Set font-shape to caps.
\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
\encoded-simple sym (symbol) str (string)
A text string, encoded with encoding sym. See Text encoding for more information.
\epsfile file-name (string)
Inline an EPS image. The image is scaled such that 10 PS units is one staff-space.
\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.
\finger arg (markup)
Set the argument as small numbers.
\flat
Draw a flat symbol.
\fontsize increment (number) arg (markup)
Add increment to the font-size. Adjust baseline skip accordingly.
\fontsize mag (number) arg (markup)
Set the relative font size, e.g.
     A \fontsize #2 { B C } D

This will enlarge the B and the C by two steps.

\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 #'((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 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.
\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 aise.
\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.
\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.
\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.
\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"

\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 

\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.
\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" }.
\small arg (markup)
Set font size to -1.
\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.
\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.

\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.
\vcenter arg (markup)
Align arg to its Y center.
\whiteout arg (markup)
Provide a white underground for arg
\with-color color (list) arg (markup)
Draw arg in color specified by color
\with-url url (string) arg (markup)
Add a link to URL url around arg. This only works in the PDF backend.

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

Report errors to <bug-lilypond@gnu.org>.

Other languages: English.
Using automatic language selection.