[NTG-context] arbitrary context commands in xml file

denis.maier at ub.unibe.ch denis.maier at ub.unibe.ch
Mon Mar 8 14:39:20 CET 2021


Indeed. That's very useful. Thanks!

Von: ntg-context <ntg-context-bounces at ntg.nl> Im Auftrag von Duncan Hothersall
Gesendet: Montag, 8. März 2021 14:06
An: Hans Hagen <j.hagen at xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context at ntg.nl>
Betreff: Re: [NTG-context] arbitrary context commands in xml file



On Mon, 8 Mar 2021 at 12:46, Hans Hagen <j.hagen at xs4all.nl<mailto:j.hagen at xs4all.nl>> wrote:
> I'd like to second Denis' request for support for XML processing
> instructions to execute ConTeXt code, rather than elements which can
> cause big problems if one is working to a fixed schema. It would be a
> boon to be able to drop in <?context \whatever{fdfd}?> in an XML source.
one of the things that can already be done ...

\def\xmltexdirective#1#2{\doif{#1}{command}{#2}}

\xmlinstalldirective{tex}{xmltexdirective}

         <?context-directive tex command \inframed{xxx} ?>
         <?context-directive tex command \page ?>

(the #2 is something without spaces btu one can work around that)

Aha. Useful, thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20210308/946d1cab/attachment-0001.htm>


More information about the ntg-context mailing list