lilypond-user
[Top][All Lists]
Advanced

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

Re: Set /bookOutputName to Conjunction of Variable and String


From: Aaron Hill
Subject: Re: Set /bookOutputName to Conjunction of Variable and String
Date: Mon, 09 Sep 2019 08:29:09 -0700
User-agent: Roundcube Webmail/1.3.8

On 2019-09-09 6:16 am, address@hidden wrote:
Hi all,

My score's title is set up in a variable called "title".

I'm trying to output a file for every instrument and thus would like to have
something like this

\version "2.19.83"
\book
{
                \bookOutputName \title " - Clarinet"
}

for every instrument of my score.

But the code above outputs an error message, because it can't handle both a
variable and a plain string.

Is it possible to make this work somehow?

I would suggest using \bookOutputSuffix, but you can certainly use a little Scheme to concatenate the strings:

%%%%
\version "2.19.83"

title = "Title"

\book {
  \bookOutputName \title
  \bookOutputSuffix "Suffix"
  { b'1 }
}

\book {
  \bookOutputName #(string-join (list title "Joined") "-")
  { b'1 }
}
%%%%


-- Aaron Hill



reply via email to

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