[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
Twas cool that night in Bethlehem.ly
Description: Text Data
- Re: promoting LilyPond, (continued)
- Re: promoting LilyPond, Joseph Rushton Wakeling, 2013/12/04
- Re: promoting LilyPond, Janek Warchoł, 2013/12/05
- Re: promoting LilyPond, Urs Liska, 2013/12/05
- Re: promoting LilyPond, Noeck, 2013/12/05
- Re: promoting LilyPond, Janek Warchoł, 2013/12/05
- Re: promoting LilyPond, David Kastrup, 2013/12/05
- Re: promoting LilyPond, Urs Liska, 2013/12/05
- Re: promoting LilyPond, David Kastrup, 2013/12/06
- Re: promoting LilyPond, Werner LEMBERG, 2013/12/05
- Re: promoting LilyPond, Janek Warchoł, 2013/12/05
- Re: promoting LilyPond,
Trevor Daniels <=
- Re: promoting LilyPond, Janek Warchoł, 2013/12/05
- Re: promoting LilyPond, Trevor Daniels, 2013/12/05
- Re: promoting LilyPond, Janek Warchoł, 2013/12/09
- Re: promoting LilyPond, Johan Vromans, 2013/12/06
- Re: promoting LilyPond, David Kastrup, 2013/12/06
- Re: promoting LilyPond, Janek Warchoł, 2013/12/09
- Re: promoting LilyPond, Werner LEMBERG, 2013/12/05
- Re: promoting LilyPond, Janek Warchoł, 2013/12/05
- Re: promoting LilyPond, Werner LEMBERG, 2013/12/05