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
13 \layout { raggedright = ##t }
15 #(define (mc-squared gr org cur)
18 (ifs (ly:grob-interfaces gr))
19 (sp (ly:grob-property gr 'staff-position))
21 (if (and (memq 'note-head-interface ifs)
22 (memq sp '(-2 -3 -5)))
24 (ly:grob-set-callback! gr 'stencil Text_interface::print)
25 (ly:grob-set-property! gr 'font-family 'roman)
26 (ly:grob-set-property!
28 (make-raise-markup -0.5
30 ((-5) (make-simple-markup "m"))
31 ((-3) (make-simple-markup "c "))
32 ((-2) (make-smaller-markup (make-bold-markup "2")))
33 (else (make-simple-markup "bla"))
37 \context Voice \relative c' {
39 \set autoBeaming = ##f
41 \context Voice \applyOutput #mc-squared