Thanks!  Somehow it never occurred to me that markuplist could be used that 
way, but now that you've pointed it out it seems like it should have been 
obvious to me.

----------------------------------------

From: "David Kastrup" <d...@gnu.org>

Sent: Tuesday, July 28, 2020 12:24 PM

To: "Mike Stickles" <m...@grtbooks.com>

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


Mike Stickles <m...@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