]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly
Imported Upstream version 2.18.2
[lilypond.git] / Documentation / snippets / new / how-to-print-two-rehearsal-marks-above-and-below-the-same-barline-method-1.ly
1 \version "2.17.24"
2
3 \header {
4   lsrtags = "editorial-annotations, expressive-marks, staff-notation, tweaks-and-overrides"
5
6   texidoc = "
7 This method prints two 'rehearsal marks', one on top of the other. It
8 shifts the lower rehearsal mark below the staff and then adds padding
9 above it in order to place the upper rehearsal mark above the staff.
10
11 By adjusting the extra-offset and baseline-skip values you can increase
12 or decrease the overall space between the rehearsal mark and the staff.
13
14 Because nearly every type of glyph or string can be made to behave like
15 a rehearsal mark it is possible to centre those above and below a bar
16 line.
17
18 Adding the appropriate 'break visibility' as shown in snippet 1 will
19 allow you to position two marks at the end of a line as well.
20
21 Note: Method 1 is less complex than Method 2 but does not really allow
22 for fine tuning of placement of one of the rehearsal marks without
23 affecting the other.  It may also give some problems with vertical
24 spacing, since using @code{extra-offset} does not change the bounding
25 box of the mark from its original value.
26
27
28
29 "
30   doctitle = "How to print two rehearsal marks above and below the same barline (method 1)"
31 }
32
33 \relative c'{
34     c d e f |
35     \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
36     \once \override Score.RehearsalMark.baseline-skip = #9
37     \mark \markup \center-column { \circle 1 \box A }
38     g f e d |
39     \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
40     \once \override Score.RehearsalMark.baseline-skip = #9
41     \mark \markup \center-column { \flat { \bold \small \italic Fine. } }
42     g f e d |
43     \once \override Score.RehearsalMark.extra-offset = #'(0 . -8.5)
44     \once \override Score.RehearsalMark.baseline-skip = #9
45     \override Score.RehearsalMark.break-visibility = #begin-of-line-invisible
46     \mark \markup \center-column { \fermata \box z }
47 }