]> git.donarmstrong.com Git - lilypond.git/blob - input/test/broken-spanner-adjustment.ly
* input/regression/instrument-name-partial.ly: move from input/test.
[lilypond.git] / input / test / broken-spanner-adjustment.ly
1 \version "1.7.18"
2 \header {
3
4          texidoc = "@cindex Broken Spanner Adjustment
5 Broken spanners can be adjusted individually, but
6 this requires complicated scheme code.
7 " }
8
9 #(define (my-callback grob)
10   (let* (
11       (o (ly:get-original grob))
12       (b (if (ly:grob? o) (ly: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     }
32