~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to input/test/spanner-after-break-tweak.ly

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
\version "2.2.0"
3
 
 
4
 
\header { texidoc = "@cindex Spanner after break
5
 
 
6
 
In order to selectively change the properties of spanners after 
7
 
a line break, Scheme code must be used.  In thas manner, the tie
8
 
after the line break in this example is moved around. "
9
 
 
10
 
      }
11
 
 
12
 
#(define (my-callback grob)
13
 
  (let* (
14
 
      (o (ly:grob-original grob))
15
 
      (b (if (ly:grob? o) (ly:spanner-broken-into o) '() ))
16
 
      )
17
 
 
18
 
    ;; Call the equivalent of Tie::after_line_breaking
19
 
    ;; if you're using this for other grob-types.
20
 
    
21
 
    (if (and  (>= (length b) 2) (eq? (car (last-pair b)) grob))
22
 
        (ly:grob-set-property! grob 'extra-offset '(-2 . -1))
23
 
        )
24
 
  ))
25
 
 
26
 
#(debug-enable 'backtrace)
27
 
 
28
 
\score {\notes \relative c'' { 
29
 
    \override Tie  #'after-line-breaking-callback =
30
 
       #my-callback
31
 
    c1 ~ \break c2 ~ c
32
 
}
33
 
    \paper { raggedright = ##t } 
34
 
    }