bug-lilypond
[Top][All Lists]
Advanced

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

Dead contexts keep making an influence to the end of the line


From: Mats Bengtsson
Subject: Dead contexts keep making an influence to the end of the line
Date: Mon, 12 Jun 2006 14:47:38 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417

Hi,

Related to Anthony's troubles, I noticed an issue with trying to reinstantiate
a Lyrics context that has "died" earlier on the same score line.

Consider the following example
\version "2.8.0"
musicwithlyrics = <<
 \relative c'{c d e f}
 \context Lyrics =mylyrics \lyricmode {Here is some text }
>>
\score{
\relative c'{ c1 \musicwithlyrics c1 \musicwithlyrics }
}

After the first \musicwithlyrics, the mylyrics context dies, since there
are no musical events in that context directly following. However,
LilyPonds still remembers that there was a context there, so the next
time the new incarnation of the same context is created, it is placed
further from the stave. I know that this is normal behaviour if there
are different Lyrics contexts, but I here I tried to avoid this problem
by explicitly naming the context to get the same one again, but it doesn't help.
Of course, one solution is to keep the context alive over the full piece,
\score{
<<
\relative c'{ c1 \musicwithlyrics c1 \musicwithlyrics }
\context Lyrics = mylyrics {s1*4}
>>
}
but such solutions are inconvenient to say the least.

Actually, in a way it would be more intuitive if LilyPond never
reserved the vertical space of a dead context to the end of the line,
so that for example
\repeat unfold 3 \new Staff { c'1}
ended up on a single line instead of the current stair case result.
For the few cases where you really want the current behaviour,
it's not hard to add spacer notes to keep contexts alive.


  /Mats

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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