> [EMAIL PROTECTED] writes:
> > > [EMAIL PROTECTED] writes:
> > > > defaults to major:
> > > >
> > > > \key c minor;
> > > > \key es major;
> > >
> > > howabout \minorkey and \majorkey ? The above suggests that \key by
> > > itself has a third meaning.
> >
> > I don't agree. The key name for a musician is 'c major' or 'c minor',
> > and it is intuitive (IMHO) that the argument to the \key command is the
> > full key name. As a feature we could allow the shorthand
> > '\key c;' for '\key c major;'
>
> But that bites the national notename stuff, and "major"/"minor" seem
> rather arbitrary keywords. How about just reading an integer?
>
> \key c 0; % major
> \key c 1; % minor
>
> and use identifiers for the national stuff?
>
> major = 0
> maggiore = 0
>
> etc.
Certainly, but this raises again the bigger question, what in the syntax
is escaped with a backslash and what's not. For the implementers it is
clear namely (to quote an old mail by Jan)
Backslash is used for:
* Keywords
* Instantiation of a formerly defined variable
But for the ordinary user it's not that obvious if a clef name,
an engraver, major/minor, a.s.o are defined in an init/*.ly file
(i.e. should have a backslash) or are string constants (without
backslash). I don't see a good general solution. The only simple
(for the end user) rule I can think of is that all strings with
some meaning in the syntax apart from the note names should be
escaped.
I could imagine making more string constants than only the note names
customisable, as an example I thought of introducing some init-file
where you defined the clef names, something like
\clefs {
violin = G2 % or violin = G 2
tenore = G2_8 % tenore = G 2 _8
alto = C3 % alto = C 3
...
}
and still keep the user's syntax
\clef violin;
We could do the same with major/minor. Unfortunately there are some
drawbacks.
- Jan's simple (to him) rule won't hold any more
- The translation cannot be done in the lexer, what happens with
name scooping a.s.o. if it's done in the parser or in later
stages.
Many questions no good answers!
/Mats