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