From: David Kastrup Date: Thu, 16 Jul 2015 15:09:43 +0000 (+0200) Subject: Issue 4507/5: Update snippet changing-properties-for-individual-grobs.ly X-Git-Tag: release/2.19.24-1~5^2~20 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2501bd6a985bab5d5c7a744b15429727293efa45;p=lilypond.git Issue 4507/5: Update snippet changing-properties-for-individual-grobs.ly --- diff --git a/Documentation/snippets/new/changing-properties-for-individual-grobs.ly b/Documentation/snippets/new/changing-properties-for-individual-grobs.ly new file mode 100644 index 0000000000..51dfb84bb9 --- /dev/null +++ b/Documentation/snippets/new/changing-properties-for-individual-grobs.ly @@ -0,0 +1,30 @@ +\version "2.19.24" + +\header { + lsrtags = "really-cool, scheme-language, tweaks-and-overrides" + + texidoc = " +The @code{\\applyOutput} command allows the tuning of any layout +object, in any context. It requires a Scheme function with three +arguments. + +" + doctitle = "Changing properties for individual grobs" +} +#(define (mc-squared grob grob-origin context) + (let ((sp (ly:grob-property grob 'staff-position))) + (ly:grob-set-property! + grob 'stencil + (grob-interpret-markup grob + #{ \markup \lower #0.5 + #(case sp + ((-5) "m") + ((-3) "c ") + ((-2) #{ \markup \teeny \bold 2 #}) + (else "bla")) #})))) + +\relative c' { + 2 + \applyOutput Voice.NoteHead #mc-squared + 2 +}