|
From: | David Nalesnik |
Subject: | Re: New try with lyric extender |
Date: | Tue, 4 Feb 2014 17:06:30 -0600 |
> I think this is a not working example for what he asked for:Thank you both for your answers. Yes Joram, this is would be a not
>
> \version "2.18.0"
> {
> a a a a
> }
> \addlyrics {
> A B C D
> % what should be written here instead?
> \display Lyrics.LyricExtender.minimum-length
> }
>
> Joram
>
working minimal example for my 1st question.
{
a a a a
}
\addlyrics {
\override LyricExtender.after-line-breaking =
#(lambda (grob)
(display "minimum-length: ")
(display (ly:grob-property grob 'minimum-length))
(newline))
A __ B
\override LyricExtender.minimum-length = 1
C __ D
}
{
a a a a
}
\addlyrics {
\override LyricExtender.after-line-breaking =
#(lambda (grob)
(format #t "minimum-length: ~a~%"
(ly:grob-property grob 'minimum-length)))
A __ B
\override LyricExtender.minimum-length = 1
C __ D
}
Another of your questions:
>>I've seen that there's a user settable property of the
>>lyric-extender-interface called "next". How can I access this?
Again, the only way to access the grob and do something with it would be through Scheme. You can get at it through the procedure ly:grob-object.
Here I make the pointed-to grob red:
{
a a a a
}
\addlyrics {
\override LyricExtender.after-line-breaking =
#(lambda (grob)
(let ((n (ly:grob-object grob 'next)))
(if (ly:grob? n)
(set! (ly:grob-property n 'color) red))))
A __ B C __ D
}
>>Could
>>it be of some help for my current problem ?
Possibly. You could, for example, get its horizontal position and replace the LyricExtender stencil with a longer one.
Looking at the link though, it strikes me that automating this could be a rather challenging problem, though, and involve more labor than simply tweaking Kieren's solution to fit different situations.
Sorry also, I didn't fully explained what is my final goal with all
this, but just cited a previous post. For next time, what is the best
way to do ? Repost all the background+example, or just give reference
to the previous post ?
[Prev in Thread] | Current Thread | [Next in Thread] |