Hi RipMus,

> Would it be possible to right-align the subtitle text, broken into two
> lines, so that the second line (the one ending with 2025) is aligned to the
> right margin?

Yes, by modifying the `\justify-string` command to allow for justification:

%%%
%%%
\version "2.24.4"

#(define-markup-command (justify-string-aligned layout props align arg)
  (ly:dir? string?)
  #:category align
  #:properties ((baseline-skip)
                wordwrap-string-internal-markup-list)
  (stack-lines DOWN 0.0 baseline-skip
               (map
                (lambda (stc)
                  (ly:stencil-aligned-to stc X align))
                (wordwrap-string-internal-markup-list layout props #t arg))))

#(define composer "Foo")
#(define title "TITLE")
#(define subtitle "a subtitle with a lot, a lot of stuff, much longer than
this one, which breaks into at least two lines, creating a problem to be
solved.")
#(define cyear "2025")

\markup \column {
  \fill-line { \abs-fontsize #24 #composer " " }
  \vspace #1
  \fill-line { \general-align #Y #-1 \abs-fontsize #36 #title
\general-align #Y #-1 \abs-fontsize #8 \override #'(line-width . 60)
\justify-string-aligned #RIGHT #(string-join (list subtitle " (" cyear ")") 
"") }
}
%%%

Cheers,
Tina

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to