]> git.donarmstrong.com Git - lilypond.git/blob - input/test/broken-spanner-adjustment.ly
* input/test/broken-spanner-adjustment.ly: new file.
[lilypond.git] / input / test / broken-spanner-adjustment.ly
1 \header {
2
3          texidoc = "Broken spanners can be adjusted individually, but
4 this requires complicated scheme code.
5   "
6
7 }
8
9 #(define (my-callback grob)
10   (let* (
11       (o (get-original grob))
12       (b (if (ly-grob? o) (get-broken-into o) '() ))
13       )
14
15     ;; Call the equivalent of Tie::after_line_breaking
16     ;; if you're using this for other grob-types.
17     
18     (if (and  (>= (length b) 2) (eq? (car (last-pair b)) grob))
19         (ly-set-grob-property! grob 'extra-offset '(4 . -2))
20         )
21   ))
22
23 #(debug-enable 'backtrace)
24
25 \score {\notes { 
26     \property Voice.Tie \override #'after-line-breaking-callback =
27        #my-callback
28     c1\break ~ c2 ~ c
29 }
30     \paper { linewidth= 5.0 \cm }
31     }