lilypond-user
[Top][All Lists]
Advanced

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

Re: if/then/else in Lilypond with config file


From: Hartmut Leister
Subject: Re: if/then/else in Lilypond with config file
Date: Tue, 24 Jun 2014 08:20:16 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hello Johan,

for the chords hiding this works perfectly, thank you.

However, it doesn't work on the header.
If I try to envelop header variables, it stops with an error:
> Starte lilypond-windows.exe 2.16.2 [score.ly]...
> »/Path_to_Dropbox/Temp/Lilypond_bool/score.ly« wird verarbeitet
> Analysieren...
> /Path_to_Dropbox/Temp/Lilypond_bool/score.ly:9:4: Fehler: syntax
error, unexpected MUSIC_FUNCTION
>     \ifDefinedThenElse #'displayHeader
> /Path_to_Dropbox/Temp/Lilypond_bool/score.ly:11:6: Fehler: syntax
error, unexpected STRING
>       title = "Some title"
> /Path_to_Dropbox/Temp/Lilypond_bool/score.ly:9:4: Fehler: Fehler
gefunden, musikalischer Ausdruck wird ignoriert
>     \ifDefinedThenElse #'displayHeader
> /Path_to_Dropbox/Temp/Lilypond_bool/score.ly:15:0: Fehler: syntax
error, unexpected '}'
> }
>
> schwerer Fehler: gescheiterte Dateien:
"/Path_to_Dropbox/Temp/Lilypond_bool/score.ly"

It also doesn't work with the whole header enveloped.
For minimal not-working example see [1] (also added error messages in
comments).

I've never written Scheme or LISP, so I can just speculate it's because
\ifDefinedThenElse is defined as a music function, whereas header and
header components aren't in music context.

So your solution helped along the way and is already included into my
newest project. Thank you for that.
Still, the header I have to uncomment manually (RegEx that is).

Best wishes
Hartmut

[1] https://www.dropbox.com/sh/w2ekud6e507asdh/AACeoYQVTP1_9qQjZ_eUyZDua

-- 
Hartmut Leister <address@hidden>



reply via email to

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