Hi Urs,

I have tried various things, but I don't seem to understand how that
primitive-eval actually works here. Your solution does only work when
the input is a simple markup (string), not when it is wrapped in other
markup commands.

It seems to work quite robustly if you draw the given content markup into a stencil and insert this stencil in the markup expression that will be fly-evaluated:

\version "2.20"

#(define (get-scheme-markup-function func)
   (symbol-append 'make- func '-markup))

#(define-markup-command (enclose layout props func content)(symbol? markup?)
   (interpret-markup layout props
                     (primitive-eval
                      (list 'markup
                            (list
                             (get-scheme-markup-function func)
                             `(make-stencil-markup ,(interpret-markup layout props content)))))))

\markup \enclose #'box "C"
\markup \enclose #'circle \italic \concat { "Camel" "Case" }
\markup \enclose #'circle \enclose #'box \italic "E"

Does this help?

Best
Lukas



Reply via email to