Dear Sven,
I have done it this way too, but with all variables in one file.
Depending on the length, it may get too cumbersome to jump through the
same file to work on one part or another.
You can set multiple variables in the same file. It doesn't make any
difference if you do that or set them in multiple files and \include
"file1.ly" \include "file2.ly" etc.
-William
On 9/16/26 1:41 PM, Sven Axelsson wrote:
On Wed, 16 Sept 2026 at 19:32, Knute Snortum <[email protected]
<mailto:[email protected]>> wrote:
On Wed, Sep 16, 2026 at 9:55 AM Sven Axelsson
<[email protected] <mailto:[email protected]>> wrote:
Hi list,
I need to create a score with a first part and either two or
three following parts that should be switchable when rendering.
The primary use will be to `\include` this score in a
`\bookpart` and I want to put as little code as possible outside
the included score.
What is the recommended way of doing this? Using tags or
variables and conditionals? I want to put it all in a single
file single since there will be a lot of shared code between the
versions.
Well, the way I would do it is to have parts one, two, and three in
separate files with each part in its own variable. Then I would
have two "driver" files: one that includes parts one and two and one
that includes parts one and three. The driver files would only
contain the includes and the commands for the variables. If that
doesn't make sense, I can try to explain in more detail.
Sounds reasonable, however I'd like to avoid using several files for
this if possible. But if noone has a "better" solution I will probably
do it like this.
Thanks,
--
*Sven Axelsson*
++++++++++[>++++++++++>+++++++++++>++++++++++>++++++
++++<<<<<-]>++++.+.++++.>+++++.>+.<<-.>>+.>++++.<<.
+++.>-.<<++.>>----.<++.>>>++++++.<<<<.>>++++.<----.