Previous: Bar and bar number checks, Up: Bars


1.2.5.4 Rehearsal marks

To print a rehearsal mark, use the \mark command

     
     c1 \mark \default
     c1 \mark \default
     c1 \mark #8
     c1 \mark \default
     c1 \mark \default

[image of music]

The letter ‘I’ is skipped in accordance with engraving traditions. If you wish to include the letter ‘I’, then use

\set Score.markFormatter = #format-mark-alphabet

The mark is incremented automatically if you use \mark \default, but you can also use an integer argument to set the mark manually. The value to use is stored in the property rehearsalMark.

The style is defined by the property markFormatter. It is a function taking the current mark (an integer) and the current context as argument. It should return a markup object. In the following example, markFormatter is set to a pre-defined procedure. After a few measures, it is set to a procedure that produces a boxed number.

     
     \set Score.markFormatter = #format-mark-numbers
     c1 \mark \default
     c1 \mark \default
     \set Score.markFormatter = #format-mark-box-numbers
     c1 \mark \default
     c1 \mark \default
     c1

[image of music]

The file scm/translation-functions.scm contains the definitions of format-mark-numbers (the default format), format-mark-box-numbers, format-mark-letters and format-mark-box-letters. These can be used as inspiration for other formatting functions.

You may use format-mark-barnumbers, format-mark-box-barnumbers, and format-mark-circle-barnumbers to get bar numbers instead of incremented numbers or letters.

Other styles of rehearsal mark can be specified manually

\mark "A1"

Score.markFormatter does not affect marks specified in this manner. However, it is possible to apply a \markup to the string.

\mark \markup{ \box A1 }

Music glyphs (such as the segno sign) may be printed inside a \mark

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

[image of music]

See The Feta font, for a list of symbols which may be printed with \musicglyph.

For common tweaks to the positioning of rehearsal marks, see Formatting text.

See also

This manual: The Feta font, Formatting text.

Installed Files: scm/translation-functions.scm contains the definition of format-mark-numbers and format-mark-letters. They can be used as inspiration for other formatting functions.

Snippets: Rhythms.

Internals Reference: RehearsalMark.

Examples:

This page is for LilyPond-2.11.58 (development-branch).

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

Your suggestions for the documentation are welcome.

Other languages: français, español.