On Fri, Oct 22, 2021 at 6:48 PM Aaron Hill <lilyp...@hillvisions.com> wrote:
> On 2021-10-22 10:42 am, Kevin Cole wrote: > > The subject line pretty much says it all: > > > > I have two columns of additional verse lyrics to a song following the > > score, and I'm wondering if there's a simple way to add a vertical > > line centered between them that is as "tall" as the two columns of > > lyrics. > > > > I'm still pretty new to LilyPond, hence the "simple". ;-) > > The simplest option is to manually insert a \draw-line command. > > %%%% > \markup \concat { > \left-column { "Lorem ipsum" "dolor sit amet," } > \hspace #2 \raise #1 \draw-line #'(0 . -4) \hspace #2 > \left-column { consectetur "adipiscing elit." } > } > %%%% > Luv'ly. Thanks. Randomly playing around with the numeric values gave me a reasonable "beginner's sense" of what's happening. Just the thing. > If you want something more automated, you could use a custom markup > command like this: > > %%%% > #(define-markup-command > (line-between layout props left right) > (markup? markup?) > #:properties ((padding 0.5)) > (let* ((left-sten (interpret-markup layout props left)) > (left-yex (ly:stencil-extent left-sten Y)) > (right-sten (interpret-markup layout props right)) > (right-yex (ly:stencil-extent right-sten Y)) > (combined-yex (interval-union left-yex right-yex)) > (offset (car combined-yex)) > (height (interval-length combined-yex))) > (interpret-markup layout props #{ > \markup \concat { > #left \hspace #padding > \raise #offset \draw-line #(cons 0 height) > \hspace #padding #right > } #} ))) > > \markup > \override #'(padding . 3) > \line-between > \left-column { "Lorem ipsum" "dolor sit amet," } > \left-column { consectetur "adipiscing elit." } > %%%% > At the moment, that's a bridge too far, though I suspect I'll be wanting to do this more often. So, I'll keep the automated custom markup script in my "back pocket" for now. Thanks again.