On 2016-12-14 07:12, Knut Petersen wrote:
Am 13.12.2016 um 22:43 schrieb Alexander Kobel:
On 2016-12-12 13:48, Knut Petersen wrote:
Hi everybody!

Please test and comment, patch and examples attached.

Hi Knut,

works beautifully, as far as your code is concerned. But I found a bug
in my function (add-lyric-extenders): Unintuitively, adding an
extender after _ makes extenders disappear: compare { Foo __ _ }
against { Foo __ _ __ }.


Very interesting. Have a look at the scheme code produced from your
example, you'll see the reason: every _ is translated to an " " and an
extender event is added by your scheme code. But then in
lyric-engraver.cc there is a special handling for the " " case:
[...]
A hackish solution, but it works ;-)

I guess a more proper way would be to introduce an additional event type, say 'LyricContinuation, have _ translated to that, and get rid of this case distinction. But it doesn't seem to me that this is worth the effort; the current solution works, and I can't remember anyone complaining that their cherished hidden " " lyrics broke the alignment.

The fixed function is in your regtest, along with a testcase for it.

Yes, your extended \add-lyric-extenders is correct.

I think \has-hypen? and \add-extender! should be merged with
add-lyric-extenders.

True.

Then the code should be put into a file in the scm
directory. E.g. scm/music-functions.scm. It's your code, will you
prepare a patch?

Can do it, but I really don't mind if you wrap everything together into one single patch. Just let's wait for some input whether this should be active per default or not (see my lily-devel mail).


Cheers,
Alexander

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to