Thank you for your response. I just wanted to know, whether there is an easier way to archieve this?
Yours, Robert Clausecker Am Donnerstag, den 02.09.2010, 01:06 +0100 schrieb Neil Puttock: > On 31 August 2010 13:42, Robert Clausecker <fuz...@gmail.com> wrote: > > > I want to write a small snippet for demonstration purposes, which > > contains lyrics. The problem is, that the first measure of the cited > > fragment is the second syllable of a word (Pro - phe - ten, the "Pro" is > > missing). In order to increase the readability of this snippet, I wanted > > to use a stanza to add this, eg: > > > > \set stanza = \markup {\medium Pro ‐} > > > > This works as expected, but unfortunately the dash "-" doesn't looks > > like the dash which usually indicates a word-continuation (Entered > > uding "--"). Does anybody know, how to get exactly this hyphen? > > If you're using 2.13 you can span a hyphen between the stanza and the > first lyric syllable via a scheme engraver: > > \version "2.13.31" > > #(define (stanza-lyric-hyphen-engraver ctx) > (let ((hyphen '())) > > `((initialize . ,(lambda (trans) > ;; if 'stanza is set, make a hyphen before anything > ;; else has happened > (and (markup? (ly:context-property ctx 'stanza)) > (set! hyphen (ly:engraver-make-grob trans > 'LyricHyphen > '()))))) > > (acknowledgers > (lyric-syllable-interface > . ,(lambda (trans grob source) > ;; if a hyphen has been created, set the first > ;; syllable acknowledged as its right bound > (and (ly:spanner? hyphen) > (ly:spanner-set-bound! hyphen RIGHT grob)))) > > (stanza-number-interface > . ,(lambda (trans grob source) > ;; if a hyphen has been created, set the stanza > ;; as its left bound > (and (ly:spanner? hyphen) > (ly:spanner-set-bound! hyphen LEFT grob))))) > > (stop-translation-timestep > . ,(lambda (trans) > ;; clear hyphen at end of first timestep > (and hyphen > (set! hyphen '()))))))) > > << > \new Voice = melody \relative c' { > c2 c > } > \new Lyrics \with { > stanza = #"Pro" > % make stanza look like a lyric syllable > \override StanzaNumber #'font-size = #1 > \override StanzaNumber #'font-series = #'bold-narrow > % tweak stanza position to match lyric spacing > \override StanzaNumber #'X-offset = #-5.8 > \consists #stanza-lyric-hyphen-engraver > } > \lyricsto melody { > phe -- ten > } > >> > > Cheers, > Neil _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user