bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unexpected behaviour in snippet 643 (custom extender lines) - punctuatio


From: Janek Warchoł
Subject: unexpected behaviour in snippet 643 (custom extender lines) - punctuation printed twice
Date: Wed, 19 Jan 2011 23:32:58 +0100

% the following scheme-made custom extender line from snippet 643
% prints the additional character not only at the ent of the extender line,
% but also when the extender line is interrupted by line break.
% i suppose it should be printed only once.

\version "2.13.45"

#(define (extend text . padding)
   (let ((extender (make-music 'ExtenderEvent))
         ;; optional padding
         (padding (if (pair? padding)
                      (car padding)
                      0)))

     (set! (ly:music-property extender 'tweaks)
           (acons 'stencil (lambda (grob)
                             (ly:stencil-combine-at-edge
                              (ly:lyric-extender::print grob)
                              X RIGHT
                              (grob-interpret-markup grob text)
                              padding))
                  (ly:music-property extender 'tweaks)))

     extender))

%Define custom extenders:
extendComma = #(extend ",")

\paper { ragged-right = ##t }

\score {
  <<
    \new Staff \new Voice = melody \relative c' {
      c4( d e f \break
      g4 f e2 )
    }
    \new Lyrics \lyricsto melody {
      Aah \extendComma
    }
  >>
  \layout {
    \context {
      \Lyrics
      \consists "Tweak_engraver"
    }
  }
}

% cheers,
% Janek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]