Re: [NTG-context] source code and result side by side
![](https://secure.gravatar.com/avatar/e5aa6984b53b8925e405ebbdbc051ad9.jpg?s=120&d=mm&r=g)
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