On 2021-09-13 9:03 pm, Justin Peter wrote:
When using (or rather attempting to use) a \markup block inside of
lyrics, the lyrics become misaligned. Example:
\score {
<<
\new Staff {
\new Voice = "melody" {
\relative { c''4 c c c }
}
}
\new Lyrics {
\lyricsto "melody" {
\markup { Here are the words }
}
}
>>
}
This is based off of
https://lilypond.org/doc/v2.23/Documentation/notation/techniques-specific-to-lyrics#placing-lyrics-vertically,
as I was not able to get the case I ran across it in to be quite that
small.
If there is a better way to markup an entire section of lyrics, please
let me know; I can send an image if helpful, I don't know how
attachments work with this though.
This is not a bug. You are specifying only a single LyricText when
you use \markup that way. What you have done is similar to quoting
the text which also treats the input as a single word/syllable.
By your example alone, it is unclear why you are using \markup at
all. Simply omit it and input lyrics in the manner the cited
documentation shows.
If you are intending to use markup commands, then remember each
word/syllable must be its own markup:
%%%%
\lyricsto "melody" {
\markup \bold Here
\markup \italic are
\markup \box the
\markup \with-color #red words
}
%%%%
You can also \override various font-interface properties of LyricText
if you want to apply certain formatting to all words/syllables without
needing to use \markup:
%%%%
\lyricsto "melody" {
\override LyricText.font-shape = #'italic
\override LyricText.color = #red
Here are the words
}
%%%%
-- Aaron Hill