Re: Lyric alignment bug with markup
On 9/14/2021 9:03 AM, Aaron Hill wrote: It is common, but it is done via \override and not \markup. fancyText = { \override LyricText.font-shape = #'italic \override LyricText.color = #red } \new Lyrics \with { \fancyText } \lyricmode { a b c } \new Lyrics \lyricmode { \fancyText a b c } \new Lyrics \lyricmode { a \once \fancyText b c } If you need to apply arbitrary \markup commands to all lyrics, you could install a transforming procedure that operates on each individual LyricText: transformText = #(define-music-function (transformer) (procedure?) #{ \override LyricText.text = #(grob-transformer 'text (lambda (grob orig) (transformer orig))) #}) boxify = #(lambda (text) #{ \markup \box #text #}) jitter = #(lambda (text) #{ \markup \rotate #(- (random 20) 10) #text #}) \new Lyrics \lyricmode { \transformText \boxify lorem ipsum dolor sit amet \transformText \jitter lorem ipsum dolor sit amet } -- Aaron Hill (Sorry, I think I forgot to cc the mailing list the first time.) Thank you for all the examples - I don't think I'll need anything quite that complicated, but seeing the different ways to do it was helpful. Justin ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Lyric alignment bug with markup
On 9/14/2021 10:51 AM, Werner LEMBERG wrote: It is mentioned in the documentation around fonts: http://lilypond.org/doc/v2.23/Documentation/notation/fonts#font-families Ah, somehow I missed that. Thanks. Justin, could you suggest an index entry (or whatever) that would have you enabled to find the necessary information? Werner A mention inside of Formatting Text (1.8.2) would be the most likely to have helped; a mention of formatting or markup in the index of the font section (1.8.3) or maybe a mention inside a section like "Techniques specific to lyrics" (2.1.2) might have helped, but that's harder to say for certain. Justin ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Lyric alignment bug with markup
>> Ah, that's kind of what I was fearing. Obviously (at least I hope >> it was obvious; maybe it wasn't) I was trying to format an entire >> group of lyrics, and having to markup each word was both tedious >> and ugly. In my use case, it looks like \override >> LyricText.font-size and \override LyricText.font-shape work quite >> well. >> >> It doesn't appear that any of this is covered in the documentation >> - is wanting to format entire verses/groups of lyrics not a common >> use case, or would that be something helpful to add? > > It is mentioned in the documentation around fonts: > > http://lilypond.org/doc/v2.23/Documentation/notation/fonts#font-families Justin, could you suggest an index entry (or whatever) that would have you enabled to find the necessary information? Werner ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Lyric alignment bug with markup
On 2021-09-14 6:21 am, Justin Peter wrote: It doesn't appear that any of this is covered in the documentation - is wanting to format entire verses/groups of lyrics not a common use case, or would that be something helpful to add? It is common, but it is done via \override and not \markup. fancyText = { \override LyricText.font-shape = #'italic \override LyricText.color = #red } \new Lyrics \with { \fancyText } \lyricmode { a b c } \new Lyrics \lyricmode { \fancyText a b c } \new Lyrics \lyricmode { a \once \fancyText b c } If you need to apply arbitrary \markup commands to all lyrics, you could install a transforming procedure that operates on each individual LyricText: transformText = #(define-music-function (transformer) (procedure?) #{ \override LyricText.text = #(grob-transformer 'text (lambda (grob orig) (transformer orig))) #}) boxify = #(lambda (text) #{ \markup \box #text #}) jitter = #(lambda (text) #{ \markup \rotate #(- (random 20) 10) #text #}) \new Lyrics \lyricmode { \transformText \boxify lorem ipsum dolor sit amet \transformText \jitter lorem ipsum dolor sit amet } -- Aaron Hill ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Lyric alignment bug with markup
Le 14/09/2021 à 15:21, Justin Peter a écrit : Ah, that's kind of what I was fearing. Obviously (at least I hope it was obvious; maybe it wasn't) I was trying to format an entire group of lyrics, and having to markup each word was both tedious and ugly. In my use case, it looks like \override LyricText.font-size and \override LyricText.font-shape work quite well. It doesn't appear that any of this is covered in the documentation - is wanting to format entire verses/groups of lyrics not a common use case, or would that be something helpful to add? It is mentioned in the documentation around fonts: http://lilypond.org/doc/v2.23/Documentation/notation/fonts#font-families Best, Jean ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Lyric alignment bug with markup
On 9/14/2021 1:02 AM, Aaron Hill wrote: 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 Ah, that's kind of what I was fearing. Obviously (at least I hope it was obvious; maybe it wasn't) I was trying to format an entire group of lyrics, and having to markup each word was both tedious and ugly. In my use case, it looks like \override LyricText.font-size and \override LyricText.font-shape work quite well. It doesn't appear that any of this is covered in the documentation - is wanting to format entire verses/groups of lyrics not a common use case, or would that be something helpful to add? Justin ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Lyric alignment bug with markup
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 ___ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond