Hi,
indeed, this topic has been brought up at least in early 2003 (maybe even
earlier) and also went into Han-Wen's and Jan's XIV CIM 2003 paper (see
right column of page 4 in this paper). There _is_ already an implicit way
of writing style sheets (although somewhat limited), but let me explain in
detail, using ancient notation as an example.
Lily's ancient notation has been designed from its very beginning with
having in mind the principle of separating musical content from notational
style. A convincing argument for doing so is, for example, the task of
generating both, old (i.e. original) and new (i.e. transcibed) notation of
an ancient piece from a single source. This is done by controlling a
bunch of grob and context properties, such as "TimeSignature #'style".
Nowadays, in Lily you could achieve the goal of creating old and new
notation from the same source with the \tag command, but it is still handy
to collect control of style at a central spot in the source, rather than
scattering tagged \set or \override commands all over the source. The
point here is, that you may want to change whatever aspect of the
notational style at a central place rather than having to scan through the
whole source and maybe need to introduce a new tag name.
In Lily, the notational style is currently unfotunately not
explicitly factored out into a separate style file like .css or .sty.
Still, it is in most cases possible and usually good practice to set such
properties only once per staff (or score) at the beginning of the piece.
Following this thought a little bit further, there actually _is_ a
(limited) way of separating style into a different file. For example, the
context definitions of VaticanaVoice and VaticanaStaff in
ly/engraver-init.ly in combination with the definitions in
ly/gregorian-init.ly initialize a bunch of properties, such that you will
get ancient notation. If you replace all occurrences of \VaticanaStaff
and \VaticanaVoice with \GregorianTranscriptionVoice and
\GregorianTranscriptionStaff, you should (at least in theory) get the same
music, but in contemporary notation.
This way, the context definitions in ly/engraver-init.ly serve as
predefined style sheets for a selected number of styles (at least for
ancient notation). You can add new styles by overriding these context
definitions.
That is, writing a style sheet in Lily currently reduces to the matter of
redefining context definitions.
Greetings,
Juergen
On Tue, 4 Apr 2006, David Feuer wrote:
I'm sure someone has brought this up before, but I've been thinking a
bit about the way users tweak output in Lilypond. As it is, tweaks
are generally interspersed with actual music information. This seems
to make things difficult when someone tries to maintain a part that
has to be transposed a couple different ways, or printed on different
paper sizes, or whatever. The web deals with this problem through
CSS, and I would suggest that Lilypond might do something similar: let
users name timesteps, timestep edges, measures, and categories of
such, and format them according to a separate program. Obviously this
would be loads of work, and I don't even know if it would be feasible,
but that's what I'm thinking.
David Feuer
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel