In orchestral scores, staff lines that only have rests are usually removed. This saves some space. This style is called `French Score'. For Lyrics (lilypond-internals) , ChordNames (lilypond-internals) and FiguredBass (lilypond-internals) , this is switched on by default. When the lines of these contexts turn out empty after the line-breaking process, they are removed.
For normal staves, a specialized
Staff (lilypond-internals)
context is
available, which does the same: staves containing nothing (or only
multi-measure rests) are removed. The context definition is stored in
\RemoveEmptyStaffContext
variable. Observe how the second staff
in this example disappears in the second line
\layout { \context { \RemoveEmptyStaffContext } } { \relative c' << \new Staff { e4 f g a \break c1 } \new Staff { c4 d e f \break R1 } >> }
The first system shows all staves in full. If empty staves should be
removed from the first system too, set remove-first
to false in
RemoveEmptyVerticalGroup (lilypond-internals)
.
Another application is making ossia sections, i.e., alternative melodies on a separate piece of staff, with help of a Frenched staff. See input/test/ossia.ly for an example.
This page is for LilyPond-2.5.11 (development-branch).