]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/adding-an-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-an-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
12 @code{Staff.explicitKeySignatureVisibility} as is shown in the example.
13 In version 2.10 and earlier, you have to do a similar setting for the
14 time signatures, see the example.
15
16
17 " }
18 % begin verbatim
19 \score {
20   \new StaffGroup \relative c''{ 
21     \new Staff 
22     \key f \major
23     c1 c^"Unwanted extra space" \break 
24     << { c1 c }
25        \new Staff { 
26          \key f \major
27          \once \override Staff.TimeSignature #'stencil = ##f
28          c1 c 
29        } 
30     >>
31     c1 c^"Fixed here" \break 
32     << { c1 c }
33        \new Staff { 
34          \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible 
35          %The next line is not needed in 2.11.x or later:
36          \once \override Staff.TimeSignature #'break-visibility = #end-of-line-invisible 
37          \key f \major
38          \once \override Staff.TimeSignature #'stencil = ##f
39          c1 c 
40        } 
41     >>
42   }
43 }
44