Thomas Morley <thomasmorle...@gmail.com> writes: > Am Sa., 17. Okt. 2020 um 19:39 Uhr schrieb Jean Abou Samra > <j...@abou-samra.fr>: >> >> 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" >> } >> > > An empty stencil will still be spaced (unless removed by other > markup-commands).
empty-stencil will typically not trigger additional spacing. That's typically what distinguishes it from point-stencil . -- David Kastrup