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: Aaron Hill
Subject: Re: Combining multiple markups into a single, word-wrappable one?
Date: Mon, 27 Jul 2020 21:20:42 -0700
User-agent: Roundcube Webmail/1.4.2

On 2020-07-27 7:58 pm, Mike Stickles wrote:
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?

Feels like a hack, but would this help?

%%%%
\version "2.20.0"

loremIpsum = \markuplist {
  \bold { Lorem ipsum } dolor sit amet,
  \italic consectetur adipiscing elit.
}

\markup {
  \override #'(line-width . 40)
  \wordwrap { $@loremIpsum $@loremIpsum $@loremIpsum }
}
%%%%


-- Aaron Hill

Attachment: markuplist.cropped.png
Description: PNG image


reply via email to

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