Show the contents of the macro as well as keep it callable

Say I have a macro:

\define something()
<$list some-params>
pseudo-code
<\$list>
\end

I would like to be able to call something as usual but in addition, (given a parameter maybe?), it would be replaced with the contents of the macro wrapped in triple ticks instead. Is that possible?

Try this:

<$codeblock code=<<something>>/>

Note that this will only show the contents of the macro, but not the \define something(...) or \end syntax.

1 Like

This is exactly what I needed!

This is so cool! Thank you Eric!