lilypond-user
[Top][All Lists]
Advanced

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

Managing the creation of a book with many scores


From: Olivier Biot
Subject: Managing the creation of a book with many scores
Date: Sun, 4 Nov 2012 11:09:38 +0100

Dear all,

I ventured into Lilypond in recreating a lost etude book (it can no
longer be ordered for over 50 years).

One of the challenges is to process individual scores without the need
of recreating the entire score book. I first thought that there ought
to be a method like the preprocessor directives used in C, but that
did not work with Scheme apparently.

However, I managed to solve this issue very simply as follows:

1. The book and custom styling macros are located at the same level
folder, the individual parts are located in the "parts" subdirectory.

2. I created two files named "custom-settings.ly" in the base
directory of the book and in the "parts" subdirectory.

3. The "custom-settings.ly" file in the base directory remains empty.
(Every statement in this file will be executed as many times as there
are parts in the book)

4. The "custom-settings.ly" file in the "parts" subdirectory contains
the include directives for the custom code used to produce the book.

5. Each individual part starts with the following directive:
    \include "custom_settings.ly"

6. The input file for the book contains the include statements
containing in "parts/custom_settings.ly" plus extra code to create the
front page, the table of contents, the book headings (chapters and
sections) and the include statements for the individual parts.

This way, creating the score book will include N times an empty file,
which is okay, and when working on an individual part, the settings
are read from the nonempty file.

Hope this will be useful to others.

Best regards,

Olivier



reply via email to

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