Janek Warchoł wrote Thursday, December 05, 2013 11:29 PM > 2013/12/6 Trevor Daniels <t.dani...@treda.co.uk>: >> >> A simpler approach would be to embed templates into LP so that they >> could just be invoked. The template would provide the context structure >> of a particular type of score, and also define the variables needed. All >> the (new) users would need to do would be to override the values of the >> variables with their own music. >> >> You can try this now by simply using \include. Two \include's are needed: >> one which goes at the top of the file to define and set up the default >> values of the variables and one which goes at the bottom of the file to >> define the context structure. A real example using a template which >> provides an SATB choir on two staves with lyrics between them and >> a piano staff with accompaniment is attached. I've left out the two >> include files, but you can easily image what they contain. You'll see this >> is a really easy interface for a new user, as all the complication is >> provided by the included file. >> >> A nice feature is that any context left without input is not printed, so the >> same template could be used for SA and piano, just piano, a variable >> number of verses, etc. > > I very much like it! > > Could you add it to > https://github.com/openlilylib/snippets/tree/master/templates
I could, but I'll need to annotate them first. And as I said above, a pair of \include'd files are needed, one at the top and one at the bottom - the user code goes in-between the two. Trevor _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user