bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doc modification


From: David Nalesnik
Subject: Re: doc modification
Date: Wed, 25 Jun 2014 18:33:35 -0500

On Wed, Jun 25, 2014 at 3:02 PM, Pierre Perol-Schneider <
address@hidden> wrote:

> Hi,
>
> This thread :
>
> http://lilypond.1069038.n5.nabble.com/Positioning-spanner-at-different-height-after-line-break-td163618.html
>
> made me think that maybe it would be good to find another example for this
> part :
>
> http://www.lilypond.org/doc/v2.18/Documentation/extending/difficult-tweaks.html
>
> since it's now easy to tweak with the \alterBroken command.
>
>
Perhaps with a nested property (which \alterBroken won't handle)?

It's worth noting that the example in the NR changes 'extra-offset through
'after-line-breaking.  The example can be adapted to work directly as an
override of 'extra-offset (which is what \alterBroken does essentially):

#(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))

        '(-2 . 5))))


\relative c'' {

  \override Tie.extra-offset = #my-callback

  c1 ~ \break

  c2 ~ c

}


--David


reply via email to

[Prev in Thread] Current Thread [Next in Thread]