]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/aligning-marks-with-various-notation-objects.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / Documentation / snippets / aligning-marks-with-various-notation-objects.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.16.0"
8
9 \header {
10   lsrtags = "text"
11
12   texidoc = "
13 If specified, text marks may be aligned with notation objects other
14 than bar lines.  These objects include @code{ambitus},
15 @code{breathing-sign}, @code{clef}, @code{custos}, @code{staff-bar},
16 @code{left-edge}, @code{key-cancellation}, @code{key-signature}, and
17 @code{time-signature}.
18
19
20
21 In such cases, text marks will be horizontally centered above the
22 object. However this can be changed, as demonstrated on the second line
23 of this example (in a score with multiple staves, this setting should
24 be done for all the staves).
25
26
27
28 "
29   doctitle = "Aligning marks with various notation objects"
30 } % begin verbatim
31
32 \relative c' {
33   e1
34
35   % the RehearsalMark will be centered above the Clef
36   \override Score.RehearsalMark #'break-align-symbols = #'(clef)
37   \key a \major
38   \clef treble
39   \mark \markup { \char ##x2193 }
40   e1
41
42   % the RehearsalMark will be centered above the TimeSignature
43   \override Score.RehearsalMark #'break-align-symbols = #'(time-signature)
44   \key a \major
45   \clef treble
46   \time 3/4
47   \mark \markup { \char ##x2193 }
48   e2.
49
50   % the RehearsalMark will be centered above the KeySignature
51   \override Score.RehearsalMark #'break-align-symbols = #'(key-signature)
52   \key a \major
53   \clef treble
54   \time 4/4
55   \mark \markup { \char ##x2193 }
56   e1
57
58   \break
59   e1
60
61   % the RehearsalMark will be aligned with the left edge of the KeySignature
62   \once \override Score.KeySignature #'break-align-anchor-alignment = #LEFT
63   \mark \markup { \char ##x2193 }
64   \key a \major
65   e1
66
67   % the RehearsalMark will be aligned with the right edge of the KeySignature
68   \once \override Score.KeySignature #'break-align-anchor-alignment = #RIGHT
69   \key a \major
70   \mark \markup { \char ##x2193 }
71   e1
72
73   % the RehearsalMark will be aligned with the left edge of the KeySignature
74   % and then shifted right by one unit.
75   \once \override Score.KeySignature #'break-align-anchor = #1
76   \key a \major
77   \mark \markup { \char ##x2193 }
78   e1
79 }