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