From 2501bd6a985bab5d5c7a744b15429727293efa45 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 16 Jul 2015 17:09:43 +0200 Subject: [PATCH] Issue 4507/5: Update snippet changing-properties-for-individual-grobs.ly --- ...hanging-properties-for-individual-grobs.ly | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/snippets/new/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 +} -- 2.39.2