lilypond-user
[Top][All Lists]
Advanced

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

Re: Combining multiple markups into a single, word-wrappable one?


From: David Kastrup
Subject: Re: Combining multiple markups into a single, word-wrappable one?
Date: Tue, 28 Jul 2020 18:21:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Mike Stickles <mike@grtbooks.com> writes:

> In the weekly service files I'm generating for my church, near the end
> is the text for a dismissal prayer. This prayer pretty much always has 
> the same beginning and ending text, but a section in the middle varies
> from service to service. I've been trying (without success) to encode 
> these in variables so I can have the beginning and ending pre-coded in
> my template, and just have the middle part in the include file for
> that service.
>
> In other words, I'm trying to turn something like this:
>
> \markup {
>     \column { \override #'(line-width . 92) {
>         \wordwrap {
>             This is the beginning of the rather long dismissal prayer,
> which would be in the first variable;
>             followed here by the service-specific part which goes in
> the include file;
>             and then this part, which would be in the second variable,
> goes at the end to complete the prayer.
>         }
>     } }
> }
>
> Into something like this:
>
> PrayerBeginning = \markup { This is the beginning of the rather long
> dismissal prayer, which would be in the first variable; }
> PrayerEnding = \markup { and then this part, which would be in the
> second variable, goes at the end to complete the prayer. }
> TodaysMiddle = \markup { followed here by the service-specific part
> which goes in the include file; }
>
> \markup {
>     \column { \override #'(line-width . 92) {
>         \wordwrap {
>             \PrayerBeginning
>             \TodaysMiddle
>             \PrayerEnding
>         }
>     } }
> }
>
> And have it still print as a single, word-wrapped
> paragraph. Unfortunately, this (and every variation I've tried that
> will actually compile) treats each variable as if the text it
> represents were enclosed in double-quotes as a single string.
>
> Does anyone know if this is even possible, and if so, how would I do it?

PrayerBeginning = \markuplist { This is the beginning of the rather long
dismissal prayer, which would be in the first variable; }
PrayerEnding = \markuplist { and then this part, which would be in the
second variable, goes at the end to complete the prayer. }
TodaysMiddle = \markuplist { followed here by the service-specific part
which goes in the include file; }

\markup {
    \column { \override #'(line-width . 92) {
        \wordwrap {
            \PrayerBeginning
            \TodaysMiddle
            \PrayerEnding
        }
    } }
}

-- 
David Kastrup



reply via email to

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