Next: , Previous: Text spanners, Up: Writing text


1.8.1.3 Text marks

Various text elements can be added to a score using the syntax described in Rehearsal marks:

     
     c4
     \mark "Allegro"
     c c c

[image of music]

This syntax makes it possible to put any text on a bar line; more complex text formatting may be added using a \markup block, as described in Formatting text. This can be used to print signs like coda, segno or fermata, by specifying the appropriate symbol name:

     
     c1
     \mark \markup { \musicglyph #"scripts.ufermata" }
     c1

[image of music]

Such objects are only typeset above the top staff of the score; depending on whether they are specified at the end or the middle of a bar, they can be placed above the bar line or between notes. When specified at the beginning of a score or at a line break, marks will be printed at the beginning of the line (the next line, in case of a line break).

     
     \mark "Allegro"
     c1 c
     \mark "assai" \break
     c  c

[image of music]

Selected Snippets

Printing marks at the end of a line or a score

Marks can be printed at the end of the current line, instead of the beginning of the following line. This is particularly useful when a mark has to be added at the end of a score – when there is no next line.

In such cases, the right end of the mark has to be aligned with the final bar line, as demonstrated on the second line of this example.

     
     \relative c'' {  
       \override Score.RehearsalMark  #'break-visibility = #begin-of-line-invisible
       g2 c
       d,2 a'
       \mark \default
       \break
       
       \override Score.RehearsalMark #'self-alignment-X = #RIGHT
       g2 b,
       c1 \bar "||"
       \mark "D.C. al Fine"
     }

[image of music]

Aligning marks with various notation objects

If specified, text marks may be aligned with notation objects other than bar lines. These objects include ambitus, breathing-sign, clef, custos, staff-bar, left-edge, key-cancellation, key-signature, and time-signature.

In such cases, text marks will be horizontally centered above the object. However this can be changed, as demonstrated on the second line of this example (in a score with multiple staves, this setting should be done for all the staves).

     
     \relative c' {
       e1
       
       % the RehearsalMark will be centered above the Clef
       \override Score.RehearsalMark #'break-align-symbols = #'(clef)
       \key a \major
       \clef treble
       \mark "↓"
       e
       
       % the RehearsalMark will be centered above the TimeSignature
       \override Score.RehearsalMark #'break-align-symbols = #'(time-signature)
       \key a \major
       \clef treble
       \time 3/4
       \mark "↓"
       e2.
       
       % the RehearsalMark will be centered above the KeySignature
       \override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
       \key a \major
       \clef treble
       \time 4/4
       \mark "↓"
       e1
     
       \break
       e
       
       % the RehearsalMark will be aligned with the left edge of the KeySignature
       \once \override Score.KeySignature #'break-align-anchor-alignment = #LEFT
       \mark "↓"
       \key a \major
       e
       
       % the RehearsalMark will be aligned with the right edge of the KeySignature
       \once \override Score.KeySignature #'break-align-anchor-alignment = #RIGHT
       \key a \major
       \mark "↓"
       e
       
       % the RehearsalMark will be aligned with the left edge of the KeySignature
       % and then shifted right by 1 unit.
       \once \override Score.KeySignature #'break-align-anchor = #1
       \key a \major
       \mark "↓"
       e1
     }

[image of music]

Printing marks on every staff

Although text marks are normally only printed above the topmost staff, they may also be printed on every staff.

     
     {
       \new Score \with {
         \remove "Mark_engraver"
       }
       <<
         \new Staff \with {
           \consists "Mark_engraver"
         }
         { c''1 \mark "molto" c'' }
         \new Staff \with {
           \consists "Mark_engraver"
         }
         { c'1 \mark "molto" c' }
       >>
     }

[image of music]

See also

Notation Reference: Rehearsal marks, Formatting text, The Feta font.

Snippets: Text.

Internals Reference: RehearsalMark.

Known issues and warnings

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 all.

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.

Andere Sprachen: français, español.