Comment #23 on issue 2990 by [email protected]: \RemoveEmptyStaves in StaffGroup context crashes
http://code.google.com/p/lilypond/issues/detail?id=2990

Workaround: use the 'remove-empty property instead of the pre-packaged \RemoveEmptyStaves, and ask all staves to listen to the 'remove-empty property:

\new StaffGroup \with { \override VerticalAxisGroup #'remove-empty = ##t } <<
  \new Staff { b1 \break R1 \break b1}
  \new Staff \with { \override VerticalAxisGroup #'remove-empty = ##f } {
    b1 \break b1 \break R1 } >>

%% This makes all types of staff-like lines of music honor the remove-empty setting
\layout {
  \context { \Staff
    \remove "Axis_group_engraver" \consists "Hara_kiri_engraver" }
  \context { \Dynamics
    \remove "Axis_group_engraver" \consists "Hara_kiri_engraver" }
  \context { \NoteNames
    \remove "Axis_group_engraver" \consists "Hara_kiri_engraver" }
  \context { \RhythmicStaff
    \remove "Axis_group_engraver" \consists "Hara_kiri_engraver" }
}

(The patches offered only stop the crash, you still need the workaround to make remove-empty take effect on a group of staves.)


Reply via email to