Re: [NTG-context] source code and result side by side
Am 2017-08-04 um 06:30 schrieb Henri Menke
On 08/04/2017 07:46 AM, Henning Hraban Ramm wrote:
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.
\typebuffer[whatever][option=tex]
\typebuffer[CodeExample][option=tex] doesn’t do anything, but \typeCodeExample[option=tex] actually works, I didn’t expect that. Thank you! Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
participants (1)
-
Henning Hraban Ramm