[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of variables to add lyrics
From: |
Torsten Hämmerle |
Subject: |
Re: Use of variables to add lyrics |
Date: |
Mon, 16 Jul 2018 13:39:56 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Dear Michael,
I can't see why you shouldn't be able to set up variables containing
markup...
In the following example (admittedly not as minimal as it could be),
I've declared a two-column lyrics markup variable named \lyr along with
the variable \mus containing the melody.
Even "Bb version" and "Eb version" markup variables are there and all
can be used later on.
%%%%%%
\version "2.18.2"
% definition of music and (!) markup variables
mus = \relative {
\key c \major
g'4 f e f g g g2 f4 f f2 g4 g g2
g4 f e f g g g2 f4 f g f e1 \bar "|."
}
lyr = \markup {
\huge
\fill-line {
\null
\column {
"Markup stored and used aain,"
"used again, used again,"
"Markup stored and used again,"
"everywhere you want."
}
\null
\column {
"Markup stored and used again,"
"used again, used again,"
"Markup stored and used again,"
"thanks to LilyPond."
}
\null
} % fill-line
} % markup
BflatVersion = \markup \line { \concat { B \hspace #0.2 \raise #0.4
\tiny \flat } version }
EflatVersion = \markup \line { \concat { B \hspace #0.2 \raise #0.4
\tiny \flat } version }
%%%% later on, all these variables can be used ...
\score { \mus \header { piece = "C version" } }
\markup \vspace #2
\score { \transpose bes c' \mus \header { piece = \markup \BflatVersion } }
\markup \vspace #2
\score { \transpose es c' \mus \header { piece = \markup \EflatVersion } }
\markup \vspace #2
\score { \mus \header { piece = "Vocals" } }
\lyr