Urs Liska <li...@openlilylib.org> writes:

> In the following markup command definition
>
> #(define-markup-command (test layout props enclosure content)
>   (scheme? markup?)
>    (interpret-markup layout props (markup #:circle content)))
>
> I would like to make the #:circle parametric, i.e. I want to pass
> something into the function (e.g. as the 'enclosure' argument) and
> apply the corresponding markup function within the markup expression.
> The argument could be a function directly or a symbol from which it is
> referenced.
>
> Howeve, I would like to dynamically apply the markup function here
> rather than create a structure that chooses a complete markup
> expression based on the desirec markup type.
>
> Unfortunately I don't really have an idea what "#:circle" actually
> *is*, so I have no clue about getting where I need to.
>
> BestUrs

test =
#(define-scheme-function (enclosure content)
  (markup-function? markup?)
  (list enclosure #{ \markup \box #content #}))

\markup \test \markup \circle \with-color #red \etc "whatever"


-- 
David Kastrup

Reply via email to