On 2020-08-04 8:27 am, David Sumbler wrote:
I had started off with lower-case Roman numerals, but that gives a
problem with 100 and 500, which are also note-names.  I suppose the
best solution is probably to use upper case C and D (and M, probably),
and lower case i, v, x and l, so that 1,444 would be MCDxliv.  That
doesn't look too bad, and should keep me, Lilypond and Scheme all
happy.
A lone Roman numeral as a variable name seems a little terse to me.  You 
might consider adding a prefix that more fully describes what the thing 
is.  For example, PsalmCLLLVI is more descriptive than just CLLLVI.
With a new* enough LilyPond, you can even do Psalm.136 to use Arabic 
numerals.
(* This change happened in the 2.19.x series, so it is valid in stable 
2.20.)
%%%%
\version "2.20.0"

FooMCCLLLIV = \markup { MCCLLLIV }
Foo.1234 = \markup { 1234 }

\FooMCCLLLIV
\Foo.1234
%%%%

There are some edge cases where the parser currently does not like the ".key" syntax, but a little escaping seems to do the trick as a temporary workaround:
%%%%
\markup \box \column { \FooMCCLLLIV ##{ \Foo.1234 #} }
%%%%

Just something to consider.


-- Aaron Hill

Reply via email to