Previous: Staff symbol, Up: Displaying staves


1.6.1.3 Hiding staves

In orchestral scores, staff lines that only have rests are usually removed; this saves some space. This style is called ‘French Score’. For Lyrics, ChordNames and FiguredBass, 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 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 }
       >>
     }

[image of music]

The first system shows all staves in full. If empty staves should be removed from the first system too, set remove-first to true in VerticalAxisGroup.

\override Score.VerticalAxisGroup #'remove-first = ##t

To remove other types of contexts, use \AncientRemoveEmptyStaffContext or \RemoveEmptyRhythmicStaffContext.

Another application of the \RemoveEmptyStaffContext is to make ossia sections, i.e., alternative melodies on a separate piece of staff, with help of a Frenched staff. See Staff symbol.

You can make the staff lines invisible by removing the Staff_symbol_engraver from the Staff context.

     
     \score {
       \context Staff \relative c'' { c8 c c16 c c c }
       \layout{
         \context {
           \Staff
           \remove Staff_symbol_engraver
         }
       }
     }

[image of music]

See also

Notation Reference: Staff symbol.

Snippets: Staff

Internals Reference: ChordNames, FiguredBass, Lyrics, Staff, VerticalAxisGroup.


Previous: Staff symbol, Up: Displaying staves

Diese Seite ist für LilyPond-2.11.40 (Entwicklungszweig).

Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.

Ihre Vorschläge für die Dokumentation sind willkommen.

Andere Sprachen: français, español.