lilypond-user
[Top][All Lists]
Advanced

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

Re: LilyPond identifier restrictions


From: David Kastrup
Subject: Re: LilyPond identifier restrictions
Date: Fri, 14 Jun 2013 16:07:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Urs Liska <address@hidden> writes:

> So what is the definition of allowed characters then?
>
> http://www.lilypond.org/doc/v2.16/Documentation/notation/file-structure.
> html says:
> "The name of a variable should have alphabetic characters only; no
> numbers, underscores or dashes."
>
> And I think I'm not alone with the instant reaction: "Hey, alphabetic
> character, and not even numbers, this surely evaluates to [a-zA_Z]"

Well, things changed over time, and partly the documentation did not
reflect every change fully, partly it's not easy to come up with good
guidelines.  The above says "should", not "must".

Historically, what was allowed in variable names and identifiers (and
words) was different in different contexts.

In headers, there have been variables like output-scale, ragged-bottom
and similar.  Grob properties have names like line-count and
neutral-direction, though to be fair, those have always been called from
Scheme previous to version 2.17.6 and so their syntax is not as relevant
as that of header variables.

As of version 2.15.43, what constitutes a "word" has been unified across
different contexts.  Making digits a part of words is not a good idea
since dis4 needs to be recognized as dis followed by 4, and in lyrics,
which also recognize an even more permissive variant of words, durations
are also usually directly appended:

\lyricsmode { Praise1 un-2 to4. the8 Lord!1 }

-- 
David Kastrup




reply via email to

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