Michael Scheer <[email protected]> writes:

> Hi Lilypond users,
>
> I want to have Lilypond print an additional book with a specific filename if a
> variable is set. But the following logic does not print the book, it does
> nothing. What am I not seeing?
>
> Thx
>
> %%% SNIPPET START %%%
> publishMode = 1
> [...]
> #(if (= publishMode 1)
>   #{
>     \book {
>       [...]
>     }
>   #}
> )
> %%% SNIPPET START %%%

The resulting value of # at top level is ignored because assignment-like
function calls might return something that could be interpreted.  So at
top level, you need to state explicitly "please interpret the value" by
writing

$(if ...)

instead of

#(if ...)

-- 
David Kastrup


Reply via email to