Op 16-03-13 17:35, Arno Rog schreef:
L.S.
I'm trying to figure out a way to place the last bar line exactly at the end of
the staff in the score of the Dutch anthem at
http://lsr.dsi.unimi.it/LSR/Snippet?
id=648
Now it's done manually: \override Staff.BarLine #'extra-offset = #'(23 . 0)
\bar "|."
Can this be automatically (and correctly)?
Arno Rog
I used to use alignGrob for this. (See the LSR). But later I wrote this
based on that:
endbar = {
\overrideProperty #"Staff.BarLine" #'after-line-breaking
#(lambda (grob)
(let* ((sys (ly:grob-system grob))
(staff (ly:grob-object grob 'staff-symbol))
(half-thickness (/ (ly:staff-symbol-line-thickness staff) 2))
(cur-x (cdr (ly:grob-extent grob sys X)))
(new-x (cdr (ly:grob-extent staff sys X)))
(xoff (+ half-thickness (- new-x cur-x))))
(ly:grob-set-property! grob 'extra-offset (cons xoff 0))))
}
--
Wilbert Berendsen
http://www.wilbertberendsen.nl/
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user