Pridie Nonas Augustas MMXV scripsit unlabeled :
> Thank you all so much, i'm just getting into lilypond and
trying to figure
> out how to make it work for my workflow. i have a solution
i like to this,
> or similar, issue, which i will share soon. meanwhile, i
have a question
> that will help me finish it:
> is there such a thing as a null0if, or a ternary operator
that can be used
> inline? I want to do something like this:
>
> \header {
> title = \title
> }
>
> but if \title hasn't been defined (because I'm running an
ily outside its
> container), then it fails. Would like to do something like
title = \title ||
> "" (to borrow _javascript_ syntax - use \title var if it
exists, else use an
> empty string).
>
> I guess if not, I can write a scheme function, but haven't
delved into that
> yet, and trying to figure out the simplest approach.
I think the easiest way is to scheme it:
(warning, I cannot test the code below right now):
#(if (not (defined? 'title)) (set! title ""))
You can even meta-scheme it:
#(define (define-default symbol)
(if (not (defined? symbol)) (module-add! (current-module) symbol
"")))
#(map define-default '(title subtitle instrument composer))
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
To unsubscribe from Pull in external LilyPond files into a score
of movements,
click
here.
NAML