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

Reply via email to