mdeneufch via lilypond-user wrote:
Not exactly: I would like to display the number of each stanza, for example
after the \leftBrace.
Using \set stanza = "n." after the \skipFour in your solution does not work
directly (the numbers are printed above the brace).
Using \set stanza = "n." after the \skipFour does actually work:
- the "n." appears inline as it should
- however it starts in the same X-position as the brace
- this can be avoided by giving the brace some padding
But the above applies only to verses 2/3/4.
To do that for verse 1 (i.e. lyricsA, which has no \skipFour), we would say
- \set stanza = \leftBrace
- immediately followed by
- \set stanza = "1."
But these \set commands share the same moment, so the first is ignored.
And \raiseStanzaN must apply to the "1." but not the \leftBrace!
This conundrum can be avoided by using a separate lyric line for the
common words (and the braces). This structure is better anyway because
it reveals the commonality of the verse lyrics.
I moved the common words to lyricsZ and placed it _below_ the verses.
Cheers,
Robin
\version "2.18.2"
\include "english.ly"
rightBrace = \markup { \null \translate #(cons 4 0.5)
\with-dimensions #(cons 0 0) #(cons 0 0) \right-brace #55 }
leftBrace = \markup { \null \translate #(cons 1 0.5)
\with-dimensions #(cons 0 3) #(cons 0 0) \left-brace #55 }
upwards = #(cons 0 7)
raiseLyrics =
{
\override LyricText.extra-offset = #upwards
\override LyricHyphen.extra-offset = #upwards
\override LyricExtender.extra-offset = #upwards
}
raiseStanzaN = \override StanzaNumber.extra-offset = #upwards
dropLyrics =
{
\revert LyricText.extra-offset
\revert LyricHyphen.extra-offset
\revert LyricExtender.extra-offset
}
dropStanzaN = \revert StanzaNumber.extra-offset
skipThree = \repeat unfold 3 { \skip 8 }
skipFour = \repeat unfold 4 { \skip 8 }
lyricsA = \lyricmode { The first verse has \skipFour \set stanza = "1." used in all four. }
lyricsB = \lyricmode { In stan -- za two, \skipFour \set stanza = "2." al -- so ap-- pear. }
lyricsC = \lyricmode { By the third verse, \skipFour \set stanza = "3." are get -- ting dull. }
lyricsD = \lyricmode { Last stan -- za, and \skipFour \set stanza = "4." get used once more. }
lyricsZ = \lyricmode {
\skipThree \hide : % a hidden colon as an anchor for the following brace
\raiseLyrics \raiseStanzaN
\set stanza = \rightBrace
the com -- mon words
\set stanza = \leftBrace
\skipFour
}
melody = \relative c' { c4 d e f g f e8( e f) d4 c e d c }
\score
{
<<
\new Voice = m \melody
\new Lyrics \lyricsto m \lyricsA
\new Lyrics \lyricsto m \lyricsB
\new Lyrics \lyricsto m \lyricsC
\new Lyrics \lyricsto m \lyricsD
\new Lyrics \lyricsto m \lyricsZ
>>
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user