On 13/10/2025 18:12, YTG1234 wrote:
The trouble is that numbers and punctuation (…all that I've tried)
other than - are not allowed in LilyPond identifier syntax. In my own
projects, I've been using camelCase, - for hierarchy, and Roman
numerals for numbers: stuff like `\movementXVII-tenoreII-lyrics-it'
(not a real example). Roman numerals can get annoying very quickly,
though. So my question:
* Is there some way to express hierarchy other than in variable names?
* Is there some way to express hierarchy and plain Arabic numerals
in variable names, that can be used from LilyPond syntax directly
without relying on $?
You can write this:
\version "2.24.0"
movement.17.tenore.2.lyrics.it = \new Lyrics \lyricsto "v1" { Come si
chia -- ma? }
movement.17.tenore.2.notes = { a'2 4 4 1 }
<<
\new Voice="v1" { \movement.17.tenore.2.notes }
\movement.17.tenore.2.lyrics.it
>>
The full stop characters are not part of the variable name, but LilyPond
syntax that builds a nested structure of Scheme association lists. I
think commas work similarly. The part before the first full stop must be
a legal LilyPond variable name. Some more info in this thread
https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00046.html,
especially David Kastrup's comments.
--
Timothy Lanfear, Bristol, UK.