Attached is a function . . .

Wahoo. Seems to be a very powerfull function. I keep it in my favorites.
Thanks David.

Gilles

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)))))
Well, it 's just a nitpick.


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to