]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/using-an-extra-voice-for-breaks.ly
Doc: NR Section 4.3 - reformatting as per CG Guidelines
[lilypond.git] / Documentation / snippets / new / using-an-extra-voice-for-breaks.ly
1 \version "2.18.0"
2
3 \header {
4   lsrtags = "specific-notation, workaround"
5
6   texidoc = "
7
8 Often it is easier to manage line and page-breaking information by
9 keeping it separate from the music by introducing an extra voice
10 containing only skips along with the @code{\break},
11 @code{pageBreak} and other layout information.
12
13 This pattern becomes especially helpful when overriding
14 @code{line-break-system-details} and the other useful but long
15 properties of @code{NonMusicalPaperColumnGrob}.
16 "
17   doctitle = "Using an extra voice for breaks"
18 }
19
20 music = \relative c'' { c4 c c c }
21
22 \header { tagline = ##f }
23 \paper { left-margin = 0\mm }
24 \book {
25   \score {
26     \new Staff <<
27       \new Voice {
28         s1 * 2 \break
29         s1 * 3 \break
30         s1 * 6 \break
31         s1 * 5 \break
32       }
33       \new Voice {
34         \repeat unfold 2 { \music }
35         \repeat unfold 3 { \music }
36         \repeat unfold 6 { \music }
37         \repeat unfold 5 { \music }
38       }
39     >>
40   }
41 }