lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Removing empty staves


From: Phil Holmes
Subject: Removing empty staves
Date: Sun, 15 May 2011 14:29:18 +0100

I've been trying to set up a score where all empty staves _except one_ are removed, and so have been experimenting with \RemoveEmptyStaves \override VerticalAxisGroup #'remove-xxx. It's thrown up a few oddities which I thought were worth pointing out, and it may be what I've found could be used in the documentation.

First, trying this:

\layout {
 \context {
   \Staff
   \override VerticalAxisGroup #'remove-first = ##t
   \override VerticalAxisGroup #'remove-empty = ##t
 }
}

which I thought might work, simply removes all staves from the score, whether they're empty or not. I thought override VerticalAxisGroup #'remove-empty = ##t might be a synonym for \RemoveEmptyStaves and so this surprised me. It looks like a bug, although the usage isn't used in the docs.

\layout {
 \context {
   \Staff
   \RemoveEmptyStaves
   \override VerticalAxisGroup #'remove-first = ##t
 }
}

as expected, removes all empty staves correctly. To ensure that one staff is not removed, code like this works well:

\new Staff {
 \override Staff.VerticalAxisGroup #'remove-first = ##f
 \override Staff.VerticalAxisGroup #'remove-empty = ##f
 \clef "bass" R1*35
}

I think this could be documented in the docs. I don't think it's in the LSR, but that's down at present and I can't check. The basic model that seems to work best is to globally remove all empty staves, and then locally turn that option back on in the staff definition.

--
Phil Holmes
Bug Squad






reply via email to

[Prev in Thread] Current Thread [Next in Thread]