lilypond-user
[Top][All Lists]
Advanced

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

Re: promoting LilyPond


From: Trevor Daniels
Subject: Re: promoting LilyPond
Date: Thu, 5 Dec 2013 23:17:23 -0000

David Kastrup wrote Thursday, December 05, 2013 5:48 PM

> We need to figure out how we can provide "style sheets", similar to how
> LaTeX makes it possible to define "document classes" (layout definitions
> and tools) and "packages" (raw functionality packaged into coherent
> interfaces).

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.

If this mechanism were to be embedded in LP all that would be needed
as the user interface would be something like

\use SA-TB-B-template

before the user code providing the music, as attached.

Just a thought ...

Trevor

Attachment: Twas cool that night in Bethlehem.ly
Description: Text Data


reply via email to

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