]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/adding-and-extra-staff-at-a-line-break.ly
Merge commit 'ce4b499'
[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 http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.11.38"
4
5 \header {
6   lsrtags = "staff-notation, contexts-and-engravers, breaks"
7  texidoc = "
8 When adding a new Staff at a line break, LilyPond will unfortunately
9 add some extra space at the end of the line before the break (to fit in
10 a key signature change, which  will never be printed anyway). The
11 workaround is to add a setting of Staff.explicitKeySignatureVisibility
12 as is shown in the example. In version 2.10 and earlier, you have to do
13 a similar setting for the time signatures, see the example. 
14 " }
15 % begin verbatim
16 \score {
17   \new StaffGroup \relative c''{ 
18     \new Staff 
19     \key f \major
20     c1 c^"Unwanted extra space" \break 
21     << { c1 c }
22        \new Staff { 
23          \key f \major
24          c1 c 
25        } 
26     >>
27     c1 c^"Fixed here" \break 
28     << { c1 c }
29        \new Staff { 
30          \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible 
31          %The next line is not needed in 2.11.x or later:
32          \once \override Staff.TimeSignature #'break-visibility = #end-of-line-invisible 
33         \key f \major
34          c1 c 
35        } 
36     >>
37   }
38 }
39