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