X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fchanging-properties-for-individual-grobs.ly;h=bce3cd9c92ae2e12a7fc50dfe670bfcb207b2a26;hb=cfc1e0d60e5d8faa364f17664dbac7e35b24ec7a;hp=f13e5b00cd9bbcd2f48db9d1b8159f848bda1c96;hpb=b27579f3a9b2311232f8eb1f11403f560dcc9b17;p=lilypond.git diff --git a/Documentation/snippets/changing-properties-for-individual-grobs.ly b/Documentation/snippets/changing-properties-for-individual-grobs.ly index f13e5b00cd..bce3cd9c92 100644 --- a/Documentation/snippets/changing-properties-for-individual-grobs.ly +++ b/Documentation/snippets/changing-properties-for-individual-grobs.ly @@ -1,13 +1,14 @@ -%% DO NOT EDIT this file manually; it is automatically -%% generated from LSR http://lsr.dsi.unimi.it -%% Make any changes in LSR itself, or in Documentation/snippets/new/ , -%% and then run scripts/auxiliar/makelsr.py -%% -%% This file is in the public domain. -\version "2.14.2" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.24 +\version "2.19.24" \header { - lsrtags = "really-cool, tweaks-and-overrides, scheme-language" + lsrtags = "really-cool, scheme-language, tweaks-and-overrides" texidoc = " The @code{\\applyOutput} command allows the tuning of any layout @@ -18,22 +19,20 @@ arguments. doctitle = "Changing properties for individual grobs" } % begin verbatim - #(define (mc-squared grob grob-origin context) - (let ((sp (ly:grob-property grob 'staff-position))) - (if (grob::has-interface grob 'note-head-interface) - (begin - (ly:grob-set-property! grob 'stencil - (grob-interpret-markup grob - (make-lower-markup 0.5 - (case sp - ((-5) "m") - ((-3) "c ") - ((-2) (make-smaller-markup (make-bold-markup "2"))) - (else "bla"))))))))) + (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 #mc-squared + \applyOutput Voice.NoteHead #mc-squared 2 }