Janek Warchoł <janek.lilyp...@gmail.com> writes:

> Hi all,
>
> is it possible to write a function that does something based on
> whether the current context will be visible or hidden in the next
> system?  For example, i have
>
> \version "2.19.12"
>
> \layout {
>   \context {
>     \Score
>     \RemoveEmptyStaves
>   }
> }

No, and your question does not even make sense.  There is no "current
context" by the time \RemoveEmptyStaves has an effect.  Iteration is
over, and arranging the bunch of grobs it produced is already in a late
stage of assembly, after determining line breaks.  Any connection to a
context is confined to the properties a Grob inherited from the
engraver's context's properties at the time it was created.

\RemoveEmptyStaves has resulted in the creation of VerticalAxisGroup
grobs with suicidal tendencies.  They commit suicide based on the live
and death of other potentially suicidal VerticalAxisGroup grobs, and
based on whether they have seen grobs created (and survive) supporting
any of a number of specified interfaces during their lifetime.

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to