Am 29.07.23 um 23:16 schrieb Hans Hagen:
On 7/29/2023 10:35 PM, Henning Hraban Ramm wrote:
The setup for MyCode is not applied to \typeMyBuffer, and I don’t know how it could; something like \typeMyBuffer[MyCode] doesn’t work.
These commands inherit from buffer, so \setupbuffer will work. But as I need to prevent you to come up with some ugly hack (after all your upcoming book should be hack free) ...
;-D I’m not sure my book will even go so deep, it’s already too big and will never contain everything I’d like it to. For the code examples therein I used some hacks (getting rid of them one by one), but I’m working on a module (more like a LaTeX-style document class) for DANTE’s DTK, to be able to write my articles about ConTeXt in ConTeXt and have them included as PDFs. For other authors, I’d like the syntax to be as simple as possible (using generic ConTeXt macros), so I use \setuptyping for the general style with a background box. But that conflicts with the setups for special cases like code and result side by side. I guess I’ll also include this in the CGJ setup.
... attached an extension that supports inheritance (via category), still honors 'buffer' otherwise and accepts an optional category instead of settings. take your choice ...
You can put the patch in cont-new.mkxl assuming you wikify it too.
Thank you! Will do. I guess it’ll be in the next upload, too? Hraban