[NTG-context] issue with environment and Lua

Hans Hagen j.hagen at xs4all.nl
Tue May 26 21:01:59 CEST 2020

On 5/26/2020 8:24 PM, Pablo Rodriguez wrote:

> I have added an \xmlflushcontext to a non-minimal environment file and
> it crashes again and again.

then you probably use the wrong command

> I get the following errors:
> lua error       > lua error on line 8 in file cont-yes.mkiv:
> function call [560]:
> ...ext/tex/texmf-context/tex/context/base/mkiv/lxml-tex.lua:918: bad
> argument #2 to 'lpegmatch' (string expected, got table)
> <empty file>
> mtx-context     | fatal error: return code: 256
> Is there any way to be able to know which XML code outputs a table
> instead of the string ConTeXt expects and complaints about?

hard to say as in xml there can be strings as well as tables so it all 
depends on what you do .. normally ther eis checking but not for cases 
where we're sure wat to expect (no need for overhead)

> I already spent three hours and I got nothing.
> In cases like that, it would be useful that ConTeXt could translate XML
> + environments to ConTeXt sources.


in the xml setups that you use, something \xmlshow{#1} will give you a 
clue of what you're dealing with


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

More information about the ntg-context mailing list