Sometimes, one needs to run several lilypond files with the same global options (e.g. removing the tagline, using a particular page size, normalizing margins, etc. in particular when you want to insert the resulting images into e.g. a presentation).
So far, you could write a global settings file and include that in all of the scores. However, if you then want to create the images with a different set of global options / page sizes, etc. then you had to change the file manually. Also note, how lilypond-book needs to modify the input file to remove all margins, etc. Here is a patch that adds a command-line option to insert a given include file into the init sequence, right before the file itself it processed: http://codereview.appspot.com/1901042/show This allows the user to apply the same set of options/definitions to different files. In particular, lilypond -duser-include=draft.ily file.ly lilypond -duser-influce=final.ily will compile file.ly, but read and execut draft.ily and final.ily before file.ly is processed. That way, e.g. global paper changes can be easily done, and a file can be run several times, each time with a different user-include file containing different settings. This feature is similar to the --init=DATEI feature, except that --init will replace the whole init sequence (thus your init file will copy all of lilypond's init.ly), while -duser-include will only add some definitions to the normal init sequence in init.ly (i.e. the file is included using scheme in init.ly). Internally, I just modify the init.ly file to include the given include file using the new ly:parser-include-string scheme function. this happens only, if a user-init file is given, of course. Okay to apply? Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, [email protected], http://reinhold.kainhofer.com/ * Financial & Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
