I'm still struggling to figure out how to override the markup of the first syllable in each system. I have figured out a callback that can add the underscore to the syllable, but I need to figure out how to know if the syllable is the first in its system. Does anyone know how to do this?
Here's what I have adding the horizontal line to every syllable:
\version "2.16.1"
#(define (my-callback grob)
(let* (
(text (ly:grob-property-data grob 'text))
)
(display text) (display "\n")
;(ly:grob-set-property! grob 'self-alignment-X '-1)
; (ly:grob-set-property! grob 'extra-offset '(-4 . 0))
(ly:grob-set-property! grob 'text #{ \markup \combine #text \translate #'(1.6 . -0.5) \draw-line #'(-4 . 0) #})
(ly:grob-set-property! grob 'stencil (lyric-text::print grob))
)
)
melody = \repeat unfold 16 g'4
lyr = \lyricmode {
\repeat unfold 16 sol
}
\score {
\new Staff <<
\new Voice = "voice" {
\melody
}
\new Lyrics \with {
\override LyricText #'after-line-breaking = #my-callback
} \lyricsto "voice" \lyr
>>
}
\paper {
indent = 0
line-width = 5.5\cm
}
Thanks,
Benjamin Bloomfield