Next: Separate text, Previous: Text spanners, Up: Writing text
Various text elements may be added to a score using the syntax described in Rehearsal marks:
c4 \mark "Allegro" c c c
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:
<c e>1 \mark \markup { \italic { colla parte } } <d f>2 <e g> <c f aes>1
This syntax also allows to print special signs, like coda, segno or fermata, by specifying the appropriate symbol name as explained in Music notation inside markup:
<bes f>2 <aes d> \mark \markup { \musicglyph #"scripts.ufermata" } <e g>1
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 a line break, the mark will be printed at the beginning of the next line.
\mark "Allegro" c1 c \mark "assai" \break c c
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 g2 b, c1 \bar "||" \override Score.RehearsalMark #'self-alignment-X = #RIGHT \mark "D.C. al Fine" }
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 "↓" e1 % 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 e1 % 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 e1 % 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 "↓" e1 % the RehearsalMark will be aligned with the left edge of the KeySignature % and then shifted right by one unit. \once \override Score.KeySignature #'break-align-anchor = #1 \key a \major \mark "↓" e1 }
Printing marks on every staff
Although text marks are normally only printed above the topmost staff, they may also be printed on every staff.
\score { << \new Staff { c''1 \mark "molto" c'' } \new Staff { c'1 \mark "molto" c' } >> \layout { \context { \Score \remove "Mark_engraver" \remove "Staff_collecting_engraver" } \context { \Staff \consists "Mark_engraver" \consists "Staff_collecting_engraver" } } }
Notation Reference: Rehearsal marks, Formatting text, Music notation inside markup, The Feta font.
Snippets: Text.
Internals Reference: RehearsalMark.
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.