Hello everyone,
I've been digging into guile/scheme and LilyPond, and it doesn't appear that else-statements can be empty. Any pointers would be appreciated in advance.
For the example below, I would prefer the else-statement here to do nothing, rather than print an empty markup: \markup { "" }, as doing so creates a small, but observable change in vertical spacing.
% Print markup if a symbol is defined
#(define-markup-command (PrintIfDefined layout props sym text) (symbol? markup?)
(if (defined? sym)
;; Do this if true
(interpret-markup layout props
#{ \markup \with-color #'(0.8 0.2 0.2) #text #})
;; How do I do nothing here? (empty statement preferred)
(interpret-markup layout props
#{ \markup "" #})
)
)
printInfo = 1
\markup \PrintIfDefined #'printInfo "Print this if symbol printInfo is defined"
Many thanks,
mattfong