Am 2017-07-31 um 03:26 schrieb Aditya Mahajan
You can't do that with buffers. If you need to define your own macros that behave like buffers, you need to use \grabbufferdata (see buff-ini.mkiv). But in this case, there is a simpler solution:
\defineframed [CodeExampleFramed] [ frame=off, width=0.5\textwidth, align=normal, ]
\definebuffer [CodeExample]
\define\stopCodeExample {\placesidebyside {\CodeExampleFramed{\typeCodeExample}} {\CodeExampleFramed{\getCodeExample}}}
Oh, I overlooked something: Can I get pretty printing back, like in \startTEX ... \stopTEX? I couldn’t find any suitable setup options. This doesn’t work: \setupbuffer[CodeExampleB][before={\startTEX},after={\stopTEX}] Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD