]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/adding-an-extra-staff-at-a-line-break.ly
Doc-it: chapter 1 completed
[lilypond.git] / Documentation / snippets / adding-an-extra-staff-at-a-line-break.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.17.25"
8
9 \header {
10   lsrtags = "breaks, contexts-and-engravers, staff-notation, workaround"
11
12   texidoc = "
13 When adding a new staff at a line break, some extra space is
14 unfortunately added at the end of the line before the break (to fit in
15 a key signature change, which  will never be printed anyway).  The
16 workaround is to add a setting of
17 @code{Staff.explicitKeySignatureVisibility} as is shown in the example.
18
19
20 "
21   doctitle = "Adding an extra staff at a line break"
22 } % begin verbatim
23
24
25 \score {
26   \new StaffGroup \relative c'' {
27     \new Staff
28     \key f \major
29     c1 c^"Unwanted extra space" \break
30     << { c1 | c }
31        \new Staff {
32          \key f \major
33          \once \override Staff.TimeSignature.stencil = ##f
34          c1 | c
35        }
36     >>
37     c1 | c^"Fixed here" \break
38     << { c1 | c }
39        \new Staff {
40          \once \set Staff.explicitKeySignatureVisibility = #end-of-line-invisible
41          \key f \major
42          \once \override Staff.TimeSignature.stencil = ##f
43          c1 | c
44        }
45     >>
46   }
47 }