This is a follow-up question to this answer.
I have a melisma defined like so
\relative
{
c'4. e8 g4 c a c8 a g2
}
\addlyrics {
Al -- le Vö -- gel sind schon __ _ da,
}
which gives me this output:
I want to align the end of the melisma extender line with the last note of the melisma. It should look like this:
(The red line is only here for showing the alignment - I don't want such a line in the output.)
Is this possible, and if yes, how?
I want to do this not by tweaking magic numbers like in the linked answer, but in a way that is robust against spacing changes (like changing paper size or font size or minimum distance between notes or words, or adding manual breaks in the notes, etc.).
I found this in the LilyPond Internals Reference regarding spanner-interface:
Some objects are horizontally spanned between objects. For example, slurs, beams, ties, etc. These grobs form a subtype called Spanner. All spanners have two span points (these must be Item objects), one on the left and one on the right. The left bound is also the X reference point of the spanner.
Maybe I can set the right span point of the LyricExtender to some point of the (to-be-aligned) note? How?
\set lyricMelismaAlignment = #RIGHT
and\unset lyricMelismaAlignment
, but this seems not to work here, since it pushes both eighth notes to the right of the lyrics. But maybe this can be a starting point?