lilypond-user
[Top][All Lists]
Advanced

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

Re: Workaround for (not-allowed) numbers in variable names?


From: Tom Brennan
Subject: Re: Workaround for (not-allowed) numbers in variable names?
Date: Fri, 5 Mar 2021 13:57:37 -0500

That's neat. I checked to see that unicode as well as whitespace seems to work via quoting, too.

\version "2.22"
"rødgrød med fløde 123
和毛泽东 <<重上井冈山>>. 严永欣, 一九八八年.

久有归天愿
终过鬼门关
千里来寻归宿
春华变苍颜
到处群魔乱舞
更有妖雾盘绕
暗道入阴间
过了阎王殿
险处不须看

风雷动
旌旗奋
忆人寰
八十三年过去
弹指一挥间
中原千军逐蒋
城楼万众检阅
褒贬满载还
世上无难事
只怕我癫痫
" = { a b c }

clarinet = \new Voice {
    \"rødgrød med fløde 123
和毛泽东 <<重上井冈山>>. 严永欣, 一九八八年.

久有归天愿
终过鬼门关
千里来寻归宿
春华变苍颜
到处群魔乱舞
更有妖雾盘绕
暗道入阴间
过了阎王殿
险处不须看

风雷动
旌旗奋
忆人寰
八十三年过去
弹指一挥间
中原千军逐蒋
城楼万众检阅
褒贬满载还
世上无难事
只怕我癫痫
"
}




On Fri, Mar 5, 2021, 11:45 stefano franchi <stefano.franchi@gmail.com> wrote:
>
> Right, so I'm stupid. All it takes is to enclose the variable_with_number names in quotes....
>
> On Fri, Mar 5, 2021 at 10:37 AM stefano franchi <stefano.franchi@gmail.com> wrote:
>>
>> Here is a question for anyone who may have been using lilypond for projects involving text and many, many, short and similar musical snippets.
>>
>> I am putting together a book that will contain many (very brief)  exercises, grouped thematically. I had thought a convenient and flexible way to organize the material and keep future maintenance under control would be to create top level variables names for the main musical categories and sub-categories and then assign each score snippet to progressively numbered variable. So I would have, CategA-1 = {"code for one exercise"} , CategB-2 = "code for another exercise"}, and so on. Clean structure, easy to maintain and rearrange, etc.
>>
>> Then I discovered that lilypond does not allow numbers in variable names.... :-(
>>
>> I'd be willing to bet my use case is not particularly weird---there must have been other people encountering the same problem.
>>
>> How have you guys managed it?
>>
>> Cheers,
>>
>> S.
>>
>>
>> --
>> __________________________________________________
>> Stefano Franchi
>>
>> stefano.franchi@gmail.com
>> https://www.researchgate.net/profile/Stefano_Franchi
>
>
>
> --
> __________________________________________________
> Stefano Franchi
>
> stefano.franchi@gmail.com
> https://www.researchgate.net/profile/Stefano_Franchi

reply via email to

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