lilypond-user
[Top][All Lists]
Advanced

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

Re: Extending LilyPond with packages


From: Urs Liska
Subject: Re: Extending LilyPond with packages
Date: Thu, 05 Dec 2013 23:53:45 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Am 05.12.2013 23:20, schrieb Johan Vromans:
Urs Liska <address@hidden> writes:

[ a whole lot of very good observations, ideas and suggestions ]

Basically a "package" can provide arbitrary code to be included.
It can for example provide
-  overrides to modify the output appearance (classic "stylesheet")
- new commands / functionality
- alternative header definitions with arbitrary header fields
- engravers or anything one would otherwise include too.
1. From a user perspective, this is all "style". Terms like package and
    class will scare away (new) users.

I intentionally used the existing LaTeX terminology because that way it is clearer what I mean.
The used terms are in no way intended to be canonical.
I think there _should_ be a difference between style sheet and document class (I didn't talk about classes at all so far), regardless of a used name. Styles are items that can freely be used and added to a document while the class is fundamental to a document.


2. All this can already be done with \include .

Differences to \include
- search path management (recursive search)
So add search path management for \include .

As said in the other reply to Janek, the idea is about a consistent way to include material in the LilyPond distribution. And I think something like my suggestion could be a good solution. A different command would make that more clear. Two things that aren't possible with \include: Options and a Require (or include once), so a new command would be necessary anyway.


- allow options:
   e.g. (in LaTeX syntax)
   - \usepackage[font="Libre Baskerville"]{mySongbookHeader}
Yikes no. Putting options before the classname is one of the most
disgusting 'features' of LaTeX. More LilyPond-like would be

   \include "mySongbookHeader" \with {
      \override font = "Libre Baskerville"
   }

Yes, it's more verbose, but it's logical and completely in line with
current LP syntax.

As said above I used LaTeX terminology, but not in order to suggest using it too. I like the \with construct although one could perhaps leave out the \override.

Urs


-- Johan

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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