Next: , Previous: Text spanners, Up: Text


8.1.3 Text marks

The \mark command is primarily used for Rehearsal marks, but it can also be used to put signs like coda, segno, and fermata on a bar line. Use \markup to access the appropriate symbol (symbols are listed in The Feta font)

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

[image of music]

\mark is only typeset above the top stave of the score. If you specify the \mark command at a bar line, the resulting mark is placed above the bar line. If you specify it in the middle of a bar, the resulting mark is positioned between notes. If it is specified before the beginning of a score line, it is placed before the first note of the line. Finally, if the mark occurs at a line break, the mark will be printed at the beginning of the next line. If there is no next line, then the mark will not be printed at all.

Commonly tweaked properties

To print the mark at the end of the current line, use

\override Score.RehearsalMark
  #'break-visibility = #begin-of-line-invisible

\mark is often useful for adding text to the end of bar. In such cases, changing the #'self-alignment is very useful

     
     \override Score.RehearsalMark
       #'break-visibility = #begin-of-line-invisible
     c1 c c c4 c c c
     \once \override Score.RehearsalMark #'self-alignment-X = #right
     \mark "D.S. al Fine "

[image of music]

Text marks may be aligned with notation objects other than bar lines,

     
     \relative {
       c1
       \key cis \major
       \clef alto
       \override Score.RehearsalMark #'break-align-symbol = #'key-signature
       \mark "on key"
       cis
       \key ces \major
       \override Score.RehearsalMark #'break-align-symbol = #'clef
       \clef treble
       \mark "on clef"
       ces
       \override Score.RehearsalMark #'break-align-symbol = #'time-signature
       \key d \minor
       \clef tenor
       \time 3/4
       \mark "on time"
       c
     }

[image of music]

Although text marks are normally only printed above the topmost staff, you may alter this to print them on every staff,

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

[image of music]

See also

Program reference: RehearsalMark.


Next: , Previous: Text spanners, 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.