% 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

_______________________________________________
bug-lilypond mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to