Indeed. That’s very useful. Thanks!
Von: ntg-context <ntg-context-bounces@ntg.nl>
Im Auftrag von Duncan Hothersall
Gesendet: Montag, 8. März 2021 14:06
An: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Betreff: Re: [NTG-context] arbitrary context commands in xml file
On Mon, 8 Mar 2021 at 12:46, Hans Hagen <j.hagen@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!