2009/12/5 Glendan Lawler <[email protected]>:
> This is very frustrating.  Perhaps it has to do with our operating systems?
> What operating system are you on?  This is the second time my code has
> worked fine for other people and not for me.  I thought my installation
> might be corrupted, so I tried reinstalling, but it didn't help.  The output
> still looks exactly the same after I apply the tweak.  Any ideas on what
> might be wrong?

I've tested it on Windows XP (2.12.2) and Ubuntu 9.10 (latest git
master).  Both worked fine with your file, though the following test
snippet always fails:

\relative c' {
  \breakTieUp
  c1 ~ \break
  c1
}

It seems the tie stencil has already been evaluated in such cases,
though I'm not sure why it sometimes works in real-world files (it's
probably related to TieColumn wresting control though).

Try this instead, which should work in all situations:

#(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 'direction UP))
     (ly:tie::print grob)))

breakTieUp = \override Tie #'stencil = #my-callback

Regards,
Neil


_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to