Le 18 mai 08 à 17:30, Reinhold Kainhofer a écrit :
In one of my scores, I'm writing two pages with the lyrics of a
mass, together
with the corresponding German/English translations. I'm using
\fill-line {
\column{"Latin text"...}
\column{"German text"...}
\column{"English text"...}
}
to generate the three columns. However, since the mass has 6 pieces,
I want
the columns of all six text blocks to line up nicely. Currently, each
\fill-line is layed out by itself, so the German and English
translations are
not properly aligned at all.
You may work on something like that. Note that it won't work well
if the text is too large.
#(define-markup-command (columns layout props args) (markup-list?)
(let ((line-width (/ (chain-assoc-get 'line-width props
(ly:output-def-lookup layout 'line-width))
(max (length args) 1))))
(interpret-markup layout props
(make-line-markup (map (lambda (line)
(markup #:pad-to-box `(0 . ,line-
width) '(0 . 0)
#:override `(line-width . ,line-width)
line))
args)))))
\markup \columns {
\column {
"Kyrie eleison,"
"Christe eleison,"
"Kyrie eleison."
}
\column {
"Herr, erbarme dich,"
"Christus, erbarme dich,"
"Herr, erbarme dich!"
}
\column {
"Lord, have mercy,"
"Christ, have mercy,"
"Lord, have mercy."
}
}
PS: I had to insert \noPageBreak at every possible point, because
without
them, lilypond would always decide it wants to start the real score
on an
even-numbered page and stretch the lyrics to three pages, even if
that means
that one page contains just one or two lines (e.g. only the
headline)!!! I
have no idea how to get around this problem, either...
You may change the page breaker:
\paper {
#(define page-breaking ly:minimal-breaking)
}
to avoid page breaks when there is still room to print text at the
bottom of a page. But then the page and line breaking of the pieces
won't be as fine as with optimal-breaking.
PS2: Is there any way to set something like ragged-bottom=##t only
for the
current page? It would suffice to have some \vfill construct, which
simply
takes up all the remaining space on the page. This would do away
with the
need to insert lots of \markup\null to prevent really ugly
stretching of text
paragraphs...
Use a top-level \markuplines, this will set the padding and spacing to 0
for the consecutive markups inside it, thus make them stick one to
another.
Nicolas
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user