]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/adding-and-extra-staff-at-a-line-break.ly
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / input / lsr / adding-and-extra-staff-at-a-line-break.ly
1 %% Do not edit this file; it is auto-generated from LSR!
2 %% Tags: staff-notation
3 \version "2.11.35"
4
5 \header { texidoc = "
6 When adding a new Staff at a line break, LilyPond will unfortunately
7 add some extra space at the end of the line before the break (to fit in
8 a key signature change, which  will never be printed anyway). The
9 workaround is to add a setting of Staff.explicitKeySignatureVisibility
10 as is shown in the example. In version 2.10 and earlier, you have to do
11 a similar setting for the time signatures, see the example. 
12 " }
13
14 \score {
15   \new StaffGroup \relative c''{ 
16     \new Staff 
17     \key f \major
18     c1 c^"Unwanted extra space" \break 
19     << { c1 c }
20        \new Staff { 
21          \key f \major
22          c1 c 
23        } 
24     >>
25     c1 c^"Fixed here" \break 
26     << { c1 c }
27        \new Staff { 
28          \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible 
29          %The next line is not needed in 2.11.x or later:
30          \once \override Staff.TimeSignature #'break-visibility = #end-of-line-invisible 
31         \key f \major
32          c1 c 
33        } 
34     >>
35   }
36 }
37