Le 06/11/2021 à 22:01, Knute Snortum a écrit :
Hello again, I have a situation where I need to adjust the padding of an ottava bracket after a line break. That is, I want to affect the bracket on the second line, but not the first. I know you can do something like this with the \shape function, but what about brackets? I tried this solution -- blatantly stolen from the Difficult Tweaking section in the manual -- but it doesn't work. %%% \version "2.22.1" #(define (my-callback grob) (let* ( ;; have we been split? (orig (ly:grob-original grob)) ;; if yes, get the split pieces (our siblings) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '()))) (if (and (>= (length siblings) 2) (eq? (car (last-pair siblings)) grob)) (ly:grob-set-property! grob 'padding 4)))) \relative { \override OttavaBracket.after-line-breaking = #my-callback \ottava 1 c''''1 \break c2 2 } %%% Anything easier than this? Some other solution?
It should be Staff.OttavaBracket because the Ottava_spanner_engraver is in Staff context (http://lilypond.org/doc/v2.22/Documentation/internals/ottava_005fspanner_005fengraver). As Kieren showed, this is much easier done using \alterBroken. The documentation was outdated, see https://gitlab.com/lilypond/lilypond/-/merge_requests/991 Best, Jean