]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/output-property.ly
* lily/beam-engraver.cc: move new-beam-event to beam-event
[lilypond.git] / input / regression / output-property.ly
1
2 \header { texidoc = "
3
4 Setting @code{\outputproperty} is a clumsy and deprecated way of changing
5 grob definitions.  In this example, the predicate checks the @code{text}
6 object property, to shift only the `m.d.'  text, but not the `two'
7 text.  Since both scripts are @code{TextScript} grobs, using
8 possible to use @code{\override} would shift both texts.
9
10 "
11
12 }
13
14 \version "1.9.1"
15
16 #(define (make-text-checker text)
17    (lambda (grob) (equal? text (ly:get-grob-property grob 'text))))
18
19 \score {    
20   \notes\relative c''' {
21     a^"two"^"m.d."
22     \context Voice
23       \outputproperty #(make-text-checker (make-simple-markup "m.d."))
24         #'extra-offset = #'(-4.0 . -3.5)
25     a^"two"^"m.d."    
26     a^"two"^"m.d."    
27   }
28 }