[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making markup functions parametric

From: Lukas-Fabian Moser
Subject: Re: Making markup functions parametric
Date: Sat, 4 Jul 2020 13:48:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Hi David,

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

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

Amazing, wonderfully elegant.

Is there a way to avoid the second "\markup" and "\etc" in \markup \test \markup \box \etc "whatever" ? Of course I can do

circlefunc = \markup\circle\etc
\markup \test \circlefunc "whatever"

but this requires an extra function definition, so it makes it harder to exchange \circle for something different. (In my own super-clumsy idea I could write \markup \test #'circle "whatever".)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]