4 texidoc = "The @code{\applyoutput} expression is the most flexible way to
5 tune properties for individual grobs.
7 Here, the layout of a note head is changed depending on its vertical
13 #(define (mc-squared gr org cur)
16 (ifs (ly:get-grob-property gr 'interfaces))
17 (sp (ly:get-grob-property gr 'staff-position))
19 (if (and (memq 'note-head-interface ifs)
20 (memq sp '(-2 -3 -5)))
22 (ly:set-grob-property! gr 'molecule-callback brew-new-markup-molecule)
23 (ly:set-grob-property! gr 'font-family 'roman)
24 (ly:set-grob-property!
26 (make-raise-markup -0.5
28 ((-5) (make-simple-markup "m"))
29 ((-3) (make-simple-markup "c "))
30 ((-2) (make-smaller-markup (make-bold-markup "2")))
31 (else (make-simple-markup "bla"))
37 \notes \context Voice \relative c' {
39 \property Voice.autoBeaming = ##f
41 \context Voice \applyoutput #mc-squared
47 \paper { raggedright = ##t