[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question_about CapsAndNames andDelimitersAndEscapes for-lilypond-items
From: |
Eyolf Ostrem |
Subject: |
Question_about CapsAndNames andDelimitersAndEscapes for-lilypond-items |
Date: |
Wed, 11 Oct 2006 16:01:59 +0200 |
User-agent: |
KMail/1.9.4 |
One of the things that has taken me the longest time to get my head around in
LP, and where I have made most mistakes with typos that I haven't understood
why they don't work, is the various combinations of CamelCase,
scheme-type-hyphenated-names, camelCaseWithLowercaseFirstLetter, and the
various one-word versions of these, which result in equal-looking names.
Furthermore, which naming schemes are REQUIRED in the various languages that
are involved and which are only conventions (in the manual, e.g.).
And, thirdly, which items are escaped with \ and which are not.
I've looked through the documentation, and then one gets a fairly clear
picture, but it would have been nice to have it summarized in one place in
the manual.
The patterns seem to be (but correct me if I'm wrong):
Music expressions, GROBs and Contexts: CamelCase
Music classes, music properties, Grob interfaces, and backend properties:
scheme-type
Engravers: Caps_and_underscores
Context properties: lowercaseAndCamelCase
backend properties: scheme-style (but X and Y are capitalized as first items!)
scheme functions: ly:plus-scheme-style
This results in the following variants for various bar-related commands:
Bar_engraver
barCheckSynchronize
BarLine
That's clear enough, I suppose. I still don't have a consistent understanding
of the difference between music properties and context properties, and why
they need different style, but I'll get there.
But there's more: in one place in the manual, there is an example where both
\consists Bar_engraver and
\consists "Volta_engraver"
appear. Why the quotation marks? Is this optional? In general? or is it a
typo?
Why \Score in some cases and \score in others? Is that optional? Or are they
in fact different types of names?
And the following, which I simply don't understand:
"9.1.5 Changing context default settings
\layout {
...
\context {
\Staff
...
}
}
Here \Staff takes the existing definition for context Staff from the
identifier \Staff."
Why is this an identifier, which usually (it seems) are lower-case? Why isn't
what follows it enclosed in {}? And, again, do the three "Staff"s in the
explaining sentence refer to three different (types of) objects? Is the first
\Staff a different item than the context Staff, which just happens to have
the same name? Is this \Staff the "identifier \Staff" which is mentioned
later in the sentence, or is it yet another thing with the same name?
I'm confused... Mostly because of the {}-less syntax, but also by the
same-same-but-different names.
Can someone enlighten me?
I feel that the documentation in many cases either gives simple examples
(where it is not evident what are simply randomly chosen names in the
examples and what is LP functions), or - in the program reference - is
extremely terse. The middle ground, which would connect the two, is often
missing, such as in the case of the naming conventions/rules.