Hi Arno,

On Sat, Mar 23, 2013 at 10:29 AM, Arno Rog <arno....@gmail.com> wrote:
> Hi David,
>
> It sure does!!
> With Lilypond 2.16.1 it is almost(!) at the outer right side of the staff,
> there is still a little bit of staff visible after the final barline.
>

I just tried this with 2.16.1, and there is quite a noticeable difference
in alignments.  (I was using 2.17.14 when I wrote the snippet.)

>
> Please ignore my ignorance but can I add a value 0.5 or 1.0 somewhere in
> your code to nudge it a little to the right?


You could do this, but this would be covering over a problem with the
function itself.  This rewrite seems to produce good alignment with 2.16.1:

\override Staff.BarLine #'extra-offset = #(lambda (grob)
    (let* ((refp (ly:grob-system grob))
           (staff (ly:grob-object grob 'staff-symbol))
           (staff-extent-X (ly:grob-extent staff refp X))
           (bar-extent-X (ly:grob-extent grob refp X))
           (blot (ly:output-def-lookup (ly:grob-layout grob)
'blot-diameter)))
      (cons (- (cdr staff-extent-X) (cdr bar-extent-X) (* -0.5 blot))
            0)))

This works with the ending barline you want to use, but if you try it with
an ordinary barline, you'll see the bar very slightly to the left of where
it ought to be.  I will drive myself nuts trying to figure out the right
combination of blot-diameter, etc., so I'll leave it with this.  If anyone
reading this knows the right calculations to generalize this, please let me
know!

Best,
David
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to