Message: 2
Date: Mon, 04 Nov 2019 09:42:57 -0800
From: Aaron Hill <address@hidden>
To: address@hidden
Subject: Re: Centering wordwrap-lines text?
Message-ID: <address@hidden>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On 2019-11-04 9:18 am, Solomon Foster wrote:
> Hi all,
>
> Next problem to tackle for my tunebook project is one which seems
> simple
> and small but has utterly stumped me. If I've got a block of text,
> something like this:
>
> \markuplist {
> \wordwrap-lines {
> Composed while playing the fiddle on board an airplane.
> }
> }
>
> How do I center the text under the tune? (The text may be long enough
> that
> wordwrap is actually needed, BTW.)
>
> My few attempts at this that seem to have correct syntax seem to center
> it
> on the edge of the page or something weird like that.
%%%%
\version "2.19.83"
\markup \fill-line {
\center-column \override #'(line-width . 50) \wordwrap-lines
{ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
volutpat tincidunt libero, a malesuada sapien scelerisque sed.
Phasellus sed placerat est. Mauris fringilla dignissim nulla.
Cras vitae elit a tellus egestas aliquam. }
}
%%%%
While \center-column will take care of aligning the individual markups
from \wordwrap-lines, it is the use of \fill-line that will ensure the
overall markup is centered on the page.
Thanks!
And the \override #'(line-width . 50) is just to make the lines shorter? It looks like it works without it, centered but much wider.