On 2012-06-12 09:40, Alexander Kobel wrote:
s/twice/thrice/ below. Anybody knows of issues with gnu.lists.org? (I
can't remember to have changed anything affecting this mail address or
the mailing list in the past few years...)
On 2012-06-11 17:49, Alexander Kobel wrote:
<this very same message>
Looks like this message has not made it to the list; not sure if the problem
was on my or on the gnu.org side. I apologize in advance if it appears twice
now.
================================
Hi all,
digging out a very old thread:
<http://lists.gnu.org/archive/html/lilypond-user/2009-08/msg00136.html>
It was about conditionally killing lyric extenders if they are in the
source, but the engraving turns out too tight for them to be necessary.
Several months ago, I wrote the following function for exactly this. I
forgot about it and today hoped that Google helps me find it; turned out
that I had to grep locally instead since I never posted it to the
public. Ashamed of that, but here comes the code:
#(define (conditional-kill-lyric-extender-callback . args)
(lambda (grob)
(let* ((minimum-length
(if (null? args)
(ly:grob-property grob 'minimum-length 0)
(car args)))
(X-extent (ly:stencil-extent (ly:grob-property grob 'stencil
empty-stencil) X))
(length (- (cdr X-extent) (car X-extent))))
(if (> minimum-length length)
(ly:grob-suicide! grob)))))
\layout {
\context {
\Lyrics
\override LyricExtender #'minimum-length = #0
\override LyricExtender #'after-line-breaking =
#(conditional-kill-lyric-extender-callback 1)
%% change "1" (in staff-spaces) to whatever you feel is a suitable
minimum length for extenders
}
}
Best,
Alexander
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user