lilypond-user
[Top][All Lists]
Advanced

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

Compile twice with different includes


From: Urs Liska
Subject: Compile twice with different includes
Date: Thu, 14 Feb 2013 20:50:09 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

Hi list,

maybe it's an academic question, but maybe it also triggers the curiosity of some Scheme-hackers ;-)

Is it possible to write something (probably a Scheme function) that lets LilyPond compile a file twice with a different file included or a different command line option? Or is it possible from within a document to launch a second LilyPond instance with an arbitrary command line option set?

The background is: I want to create a scenario where I can compile two different pdf files in one run. The two files should have a different first-page-number and a different filename suffix. I would like to have two versions of a score starting on odd and even pages. (Afterwards I want to include the appropriate file in a LaTeX document, depending on the page in the document.)

I can imagine doing this with two layout include files (like 'start-odd.ily' and 'start-even.ily') or with a function that directly writes the right commands depending on command line options (like '-dstartodd' or 'dstarteven').

So maybe the easiest way would be to have a function that triggers two separate lilypond runs on the same file, providing different command line options. I'd then have a main .ly file as usual that includes one of two style sheets depending on the presence of command line options, but I would explicitely run lilypond on a 'master' file that doesn't actually contain music but only controls the build process.

Any ideas?

Best
Urs



reply via email to

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