Modifying barline right before a stave is hidden

2014-08-28 Thread Janek Warchoł
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
  }
}

fooBarline = {}


  \new Staff {
\fooBarline
\repeat unfold 24 c'4
R1*8
  }
  \new Staff {
\repeat unfold 24 f'2
  }


And i'd like to define fooBarline so that the last barline before the
staff is hidden (which happens because of RemoveEmptyStaves) is
different.

best,
Janek

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


Re: Modifying barline right before a stave is hidden

2014-08-28 Thread David Kastrup
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