On Mon 03 Feb 2025 at 16:40:29 (+0100), Arne Ploese wrote:
> I tried to align the lyrics by filtering unwanted text with \new
> Devnull.
> In the second verse the last underline is extended through out the coda
> section.
> This looks to me like a bug - is it one?
An extender runs as far as the next syllable, and the problem for this
trick is that there aren't any. That's why my usual method of skipping
sections looks like, eg \n \repeat unfold 25 _ where \n is
something like "", or a space, or an unbreakable space, and I can
adjust the number.
IOW, you need one fewer skips inside your \Devnull. My workaround
is attached. I can't tell whether this feature is a bug, nor whether
it could be bent to your requirement.
Cheers,
David.
\version "2.24.4"
melody = \relative c'' {
c1 d1 e2~ 2 \break f g a b
}
wordsRefrain = \lyricmode {
Refrain
}
wordsFirstVerse = \lyricmode {
First verse. __
}
wordsSecondVerse = \lyricmode {
Second verse. __
}
ordsCoda = \lyricmode {
ly Co -- da
}
wordsCoda = \lyricmode {
Last -- \ordsCoda
}
\score {
<<
\new Staff { \melody }
\addlyrics { \wordsRefrain \wordsFirstVerse \wordsCoda }
\addlyrics {
\new Devnull { \wordsRefrain }
\wordsSecondVerse
"" \new Devnull { \ordsCoda } }
>>
\layout { }
}