lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Right aligned text in header


From: Br. Samuel Springuel
Subject: Right aligned text in header
Date: Tue, 13 Mar 2018 15:31:08 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

I'm creating a custom bookTitleMarkup for a project I'm working on and have some lines which are setup like `meter` and `arranger` in the default template (two blocks of text, one flushed left the other right, on the same line).

However, on one of those lines the header properties to be used may be very long and thus I need to force word wrapping to less than the full line width for each field. On the left side, that is not a problem, I just use `\override #'(line-width . 30) \wordwrap-field`. However, on the right side this doesn't work because the wrapping of the text within the field is left aligned inside its box (which is right aligned on the line). What I'd like is for the wrapped text to be right aligned inside its box. I tried changing `text-direction` to -1, and this did change the alignment, but also reversed the word order on each line.

Is there an equivalent for `\wordwrap-field` that will flush right the text (much like `\justify-field` leads to it being justified)?

%%% Begin Snippet %%%
\paper  {
% custom title layout
    bookTitleMarkup = \markup { \column {
        \fill-line { \fromproperty #'header:title }
        \fill-line {
            \fromproperty #'header:meter
            \fromproperty #'header:tune
        }
        \fill-line {
            \fromproperty #'header:poet
            \fromproperty #'header:composer
        }
        \fill-line {
{ \override #'(line-width . 30) \wordwrap-field #'header:poet_copyright } { \override #'(line-width . 30) \wordwrap-field #'header:tune_copyright }
        }
    }}
    scoreTitleMarkup = {}
}

\header {
    title = "Title of song (from lyrics)"
    meter = "8.8.8.8"
    tune = "name of tune"
    poet = "Poet"
    composer = "Composer"
poet_copyright = "A sometimes long statement indicating at least the year of the copyright. Should be flushed left." tune_copyright = "Also may be long and in need of wrapping. Should be flushed right."
}

\new Staff
{
  \new Voice = "mel" { c' }
}

%%% End Snippet %%

--
✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ



reply via email to

[Prev in Thread] Current Thread [Next in Thread]