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 _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user