]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/adding-an-extra-staff-at-a-line-break.ly
Merge branch 'master' into beaming
[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.48"
4
5 \header {
6   lsrtags = "staff-notation, contexts-and-engravers, breaks"
7
8   texidoc = "
9 When adding a new staff at a line break, some extra space is
10 unfortunately added at the end of the line before the break (to fit in
11 a key signature change, which  will never be printed anyway). The
12 workaround is to add a setting of
13 @code{Staff.explicitKeySignatureVisibility} as is shown in the example.
14 In versions 2.10 and earlier, a similar setting for the time signatures
15 is also required (see the example).
16
17
18
19 "
20   doctitle = "Adding an extra staff at a line break"
21 } % begin verbatim
22 \score {
23   \new StaffGroup \relative c'' {
24     \new Staff
25     \key f \major
26     c1 c^"Unwanted extra space" \break
27     << { c1 c }
28        \new Staff {
29          \key f \major
30          \once \override Staff.TimeSignature #'stencil = ##f
31          c1 c 
32        } 
33     >>
34     c1 c^"Fixed here" \break
35     << { c1 c }
36        \new Staff {
37          \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible
38          % The next line is not needed in 2.11.x or later:
39          \once \override Staff.TimeSignature #'break-visibility = #end-of-line-invisible
40          \key f \major
41          \once \override Staff.TimeSignature #'stencil = ##f
42          c1 c
43        }
44     >>
45   }
46 }