X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Flsr%2Fmarking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly;h=4aa2af76181ba1e0e5a94f35b17ff1dcf6deeb13;hb=1423508c355989fa26a8cfe5985b0d6e1ab0a538;hp=c5914fd2592ec6a2768d549ea115dd8a3d4b4135;hpb=33fee1aae93af367e6d2f0a80bef3e1b38eda9eb;p=lilypond.git diff --git a/input/lsr/marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly b/input/lsr/marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly index c5914fd259..4aa2af7618 100644 --- a/input/lsr/marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly +++ b/input/lsr/marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly @@ -1,31 +1,33 @@ -%% Do not edit this file; it is auto-generated from input/new +%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it %% This file is in the public domain. -\version "2.12.0" +\version "2.13.1" \header { lsrtags = "editorial-annotations, vocal-music" texidoc = " -This example shows how to put crosses on stems. Mark the beginning -of a spoken section with the @code{\\speakOn} keyword, and end it -with the @code{\\speakOff} keyword. Remember to end cross sections -before entering any rest: this function also adds crosses to the -invisible stems of rests. +This example shows how to put crosses on stems. Mark the beginning of +a spoken section with the @code{\\speakOn} keyword, and end it with the +@code{\\speakOff} keyword. + " doctitle = "Marking notes of spoken parts with a cross on the stem" } % begin verbatim - speakOn = { \override Stem #'stencil = #(lambda (grob) - (ly:stencil-combine-at-edge - (ly:stem::print grob) - Y - (- (ly:grob-property grob 'direction)) - (grob-interpret-markup grob - (markup #:hspace -1.025 #:fontsize -4 - #:musicglyph "noteheads.s2cross")) - -2.3 0)) + (let* ((x-parent (ly:grob-parent grob X)) + (is-rest? (ly:grob? (ly:grob-object x-parent 'rest)))) + (if is-rest? + empty-stencil + (ly:stencil-combine-at-edge + (ly:stem::print grob) + Y + (- (ly:grob-property grob 'direction)) + (grob-interpret-markup grob + (markup #:hspace -1.025 #:fontsize -4 + #:musicglyph "noteheads.s2cross")) + -2.3 0)))) } speakOff = { @@ -44,3 +46,4 @@ speakOff = { } } } +