Hi Gabriel & Kieren,

Kieren and I would love to use the smart/automated #DOWNas it is intended so that we can spend our teatimes debating matters at least a bitmore fun than “#-0.835or #-0.81?” 🙏

Well, one could tweak the stencil extent of a markup such that it does not take the descenders into account. The following is a very very crude proof-of-concept (what about ascenders? what about multi-line markup? what about automation? etc.), but just to show what I mean:


%%% SNIPPET BEGINS
\version "2.24.4"

musicAdvent = \relative c' {
  \time 7/4 f1 f4 d2 | \bar "||"
  \time 8/4 f1 f4 d4 e2 | \bar "||"
}

#(define-markup-command (alignToBaseLine layout props content) (markup?)
   (let ((stil (interpret-markup layout props content))
         (no-descender (interpret-markup layout props "i")))
     (ly:make-stencil
      (ly:stencil-expr stil)
      (ly:stencil-extent stil X)
      (cons (car (ly:stencil-extent no-descender Y))
            (cdr (ly:stencil-extent stil Y))))))

collectAdvent = \lyricmode {
  \markup
    % The following line of code works,
    % because “Lord announced unto” contains no descenders …
    \general-align #Y #DOWN
    {
      \concat { "℣. "
        \column {
            \line { The Angel of the }
            \line { Lord announced unto }
        }
      }
  }
  Ma -- ry.

  \markup
    % The following line of code *does not work,*
    % because the word “by” has a descender …
    \general-align #Y #DOWN
    {
      \concat { "℟. "
        \column {
            \line \bold \alignToBaseLine { And she }
            \line \bold \alignToBaseLine { conceived by the }
        }
      }
  }
  Ho -- ly Ghost.
}

\score {
  <<
    \new Voice = "firstversicle" \musicAdvent
    \new Lyrics \lyricsto "firstversicle" \collectAdvent
  >>
}

%%% SNIPPET ENDS

Lukas

Reply via email to