Previous: Text spanners, Up: Writing text
The \mark
command is primarily used for Rehearsal marks, but it can also be used to add text elements in a score:
c4\mark "text" c c c
As it can contain a \markup
object, the \mark
command
makes possible to put any text, but also signs like coda, segno, or
fermata on a bar line. The appropriate symbol has to be specified in
the \markup
block; these symbols are listed in The Feta font.
c1 \mark \markup { \musicglyph #"scripts.ufermata" } c1
\mark
is only typeset above the top staff 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.
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 "
Text marks may be aligned with notation objects other than bar lines,
\relative { c1 \key cis \major \clef alto \override Score.RehearsalMark #'break-align-symbols = #'(key-signature) \mark "on key" cis \key ces \major \override Score.RehearsalMark #'break-align-symbols = #'(clef) \clef treble \mark "on clef" ces \override Score.RehearsalMark #'break-align-symbols = #'(time-signature) \key d \minor \clef tenor \time 3/4 \mark "on time" c }
Possible symbols for the break-align-symbols
list are
ambitus
, breathing-sign
, clef
, custos
,
staff-bar
, left-edge
, key-cancellation
,
key-signature
, and time-signature
.
The text marks will, by default, be aligned with the middle of the
notation object, but this can be changed by overriding the
break-align-anchor-alignment
and break-align-anchor
properties for the appropriate grob. For scores with multiple staves,
this setting should be done for all the staves.
{ \override Score.RehearsalMark #'break-align-symbols = #'(key-signature) c1 \key cis \major % the RehearsalMark will be aligned with the left edge of the KeySignature \once \override Score.KeySignature #'break-align-anchor-alignment = #LEFT \mark \default cis1 \key ces \major % the RehearsalMark will be aligned with the right edge of the KeySignature \once \override Score.KeySignature #'break-align-anchor-alignment = #RIGHT \mark \default ces1 \key cis \major % the RehearsalMark will be aligned with the left edge of the KeySignature % and then shifted right by 2 units. \once \override Score.KeySignature #'break-align-anchor = #2 \mark \default ces1 }
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' } >> }
Snippets: Text
Internals Reference: RehearsalMark.
Previous: Text spanners, Up: Writing text
Diese Seite ist für LilyPond-2.11.40 (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.