On 3/14/11, Gilles THIBAULT <gilles.thiba...@free.fr> wrote: >> Attached is a function . . . > > Wahoo. Seems to be a very powerfull function. I keep it in my favorites. > Thanks David.
Glad you can use it! > NB > If the user enters the value 2 for example as the dir parameter, the > function fails. > Using = < and > in the last cond expression avoids that. > (ly:grob-set-property! grob 'extra-offset > `(,(cond ((< $dir 0) (- (ly:grob-relative-coordinate ref sys X) > default-coord)) > ((= $dir 0) (- (interval-center (ly:grob-extent ref sys X)) > (interval-center (ly:grob-extent grob sys X)))) > ((> $dir 0) (- (cdr (ly:grob-extent ref sys X)) > (cdr (ly:grob-extent grob sys X))))) > > . ,$corr))))) Thank you very much! This also fixes the issue of what to do with decimals. --David _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user