Hello Jan-Peter,
thank you very much!
The example file works perfectly. Now I'll have to see how (and
where exactly) I include it in my material.
I'll soon give all that back (guess you can guess where ...) :-)
Best
Urs
Am 15.02.2013 09:37, schrieb Jan-Peter Voigt:
Hello
Urs,
On 14.02.2013 20:50, Urs Liska wrote:
Hi list,
maybe it's an academic question, but maybe it also triggers the
curiosity of some Scheme-hackers ;-)
I wouldn't call it academic - if want to build some kind of
workflow, you will face the need for creating several pdfs from
one ly-file.
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?
... you can process a book object in scheme as often you like
(ly:process-book)
Or is it possible from within a document
to launch a second LilyPond instance with an arbitrary command
line option set?
You can play with schemes 'system' command, but I wouldn't use
that, to call lilypond - it is already running.
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.
My approach is using a book variable. A scheme-function then sets
all given paper vars in the book paper before it starts processing
it with ly:process-book. The example file creates writeBook.pdf
(odd version), writeBook-even.pdf and writeBook-music.midi.
HTH
Best, Jan-Peter
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
|