Hi Brent,
Am 08.06.21 um 11:50 schrieb Brent Annable:
I'm looking for a way to create a multi-line paragraph of text on the
bottom-right-hand side of the heading section, the last line of which
aligns with the lowest line of text on the left. I have attached a
sample of what I want.
The problems with my current solution are: 1. it is confusing and
inelegant, since the text in the paragraph is split over multiple
heading types; 2. the lines in the rightmost paragraph are too far
apart, and 3. this solution doesn't accommodate three or more lines of
text.
Does anyone know of a way to create an independent, right-aligned box
of text on the lower-right of the heading section, whose lowest line
is on the same level as the stuff on the left?
I'm sure our scheme wizards will be able to provide a much better
solution (for instance, the number "000" should really be a number, not
a string), but here is an approximation:
\version "2.19"
% By harm
#(define (general-column align-dir baseline mols)
(let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X
align-dir)) mols)))
(stack-lines -1 0.0 baseline aligned-mols)))
#(define-markup-command (wordwrap-right layout props args)
(markup-list?)
(general-column RIGHT 2.5 (wordwrap-internal-markup-list layout
props #f args)))
\paper {
scoreTitleMarkup = \markup {
\fill-line {
\line {
\fontsize #7 \fromproperty #'header:piece-nr
\hspace #1
\normal-text \large \fromproperty #'header:piece-title
}
\general-align #Y #DOWN
\italic \small
\override #'(line-width . 50)
\fromproperty #'header:infotext
}
}
}
\markup {
}
\paper {
indent = 0
}
\score {
\header {
piece-nr = "000"
piece-title = "Gottes Sohn ist kommen"
infotext = \markup \wordwrap-right {
This paragraph is in two or more rows, and the last line needs
to be level with the bit on the left. It really can be as long
as you want.
}
}
\relative c' { c1 c e f g a g }
}
\score {
\header {
piece-nr = "001"
piece-title = "Another piece"
infotext = \markup \wordwrap-right {
This paragraph is in two or more rows, and the last line needs
to be level with the bit on the left. It really can be as long
as you want. Bla bla text, bla bla text? Really important bla bla
text, bla bla text.
}
}
\relative c' { c1 c e f g a g }
}
Lukas