Am 11.05.2018 um 11:16 schrieb Malte Meyn:
I found a way to do this for scores but not for toplevel markups. It’s not even a complicated calculation: just let VerticalAxisGroup.after-line-breaking print it’s Y-extent.

Oops, forgot about scores with multiple staves … And I’d thought that VerticalAxisGroup lived in Score.

I tried to print the Y-offset too but it seems like ly:hara-kiri-group-spanner::force-hara-kiri-callback doesn’t only get the offset but set it so asking for it

        (ly:grob-property grob 'Y-extent)

has a side-effect: It shifts the next staff (see code below). I’ll have a closer look and come back when I find something better.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.19.81"

\layout {
  \override Score.VerticalAxisGroup.after-line-breaking =
  #(lambda (grob)
     (let ((extent (ly:grob-property grob 'Y-extent))
           (offset (ly:grob-property grob 'Y-offset)))
       (print "~a ~a\n" extent offset)))
}

<< \new Staff a \new Staff g >>

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

Reply via email to