[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of variables to add lyrics
From: |
Michael Hendry |
Subject: |
Re: Use of variables to add lyrics |
Date: |
Mon, 16 Jul 2018 15:18:32 +0100 |
> On 16 Jul 2018, at 12:39, Torsten Hämmerle <address@hidden> wrote:
>
> 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
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
Hi, Torsten.
I had tried creating a variable for each \column’s contents, and then for the
\fill-line section, and lost heart when I got error messages from the compiler.
That solves my problem.
Many thanks,
Michael