]> git.donarmstrong.com Git - lilypond.git/blob - input/test/bar-number-every-five-reset.ly
* scripts/lilypond-book.py (do_file): do not overwrite input file.
[lilypond.git] / input / test / bar-number-every-five-reset.ly
1 \version "2.1.26"
2
3 \header {
4     texidoc = "@cindex Bar Number Every Fifth Reset
5 If you would like the bar numbers to appear at regular intervals, but
6 not starting from measure zero, you can use the context function,
7 @code{set-bar-number-visibility}, to automatically set
8 @code{barNumberVisibility} so that the bar numbers appear at regular
9 intervals, starting from the @code{\applycontext}.
10 "
11
12 }
13
14 resetBarnum = \context Score \applycontext
15   #(set-bar-number-visibility 4)
16 \score {
17     <<
18         \notes \transpose c c'' {
19             \override Score.BarNumber  #'break-visibility =#end-of-line-invisible
20             \override Score.RehearsalMark  #'padding = #2.5
21             \mark "A" \resetBarnum
22             \repeat unfold 10 c1
23             \mark \default \resetBarnum
24             \repeat unfold 8 c
25             \bar "|."
26         }
27     >>
28 \paper{raggedright = ##t}
29 }