[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme help request: How can else of an if-statement be made to do n
From: |
Jean Abou Samra |
Subject: |
Re: Scheme help request: How can else of an if-statement be made to do nothing? |
Date: |
Sat, 17 Oct 2020 19:39:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Hi,
Le 17/10/2020 à 19:27, Matthew Fong a écrit :
Hello Richard,
I just discovered your explanation is in fact the case, and also
concluded cond wouldn't work either.
I might have to settle for an empty markup block for now.
The point of interpret-markup is to turn a markup into a stencil, so I'd
use empty-stencil:
\version "2.20.0"
#(define-markup-command (print-if-defined layout props sym text)
(symbol? markup?)
(if (defined? sym)
(interpret-markup layout props
#{ \markup \with-color #'(0.8 0.2 0.2) #text #})
empty-stencil))
symA = "Something"
\markup {
\print-if-defined #'symA "Text"
\print-if-defined #'symB "More text"
}
Best,
Jean
- Scheme help request: How can else of an if-statement be made to do nothing?, Matthew Fong, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Matthew Fong, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Richard Shann, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Matthew Fong, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?,
Jean Abou Samra <=
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Thomas Morley, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Matthew Fong, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, David Kastrup, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Thomas Morley, 2020/10/17
- RE: Scheme help request: How can else of an if-statement be made to do nothing?, John Schlomann, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Thomas Morley, 2020/10/17
- Re: Scheme help request: How can else of an if-statement be made to do nothing?, Matthew Fong, 2020/10/17
- RE: Scheme help request: How can else of an if-statement be made to do nothing?, John Schlomann, 2020/10/17