Next: , Previous: Aligning to cadenzas, Up: Orchestral music



5.15.3 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.)

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 canned procedure. After a few measures, it is set to function 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.

The \mark command can also be used to put signs like coda, segno, and fermata on a bar line. Use \markup to access the appropriate symbol

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

[image of music]

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. To print the mark at the end of the current line, use

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

See also

Program reference: MarkEvent (lilypond-internals) , RehearsalMark (lilypond-internals) .

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

Examples: input/regression/rehearsal-mark-letter.ly,

input/regression/rehearsal-mark-number.ly.

Read comments on this page, or add one.

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

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

Other languages: English.
Using automatic language selection.