[NTG-context] xml in lua advice ?

Taco Hoekwater taco at elvenkind.com
Wed Sep 19 14:50:36 CEST 2018


Hi,

Is there a more elegant way to feed an xml tree into a context() command
that what I have below?


\startluacode
function xml.functions.heading(t)
   context.section("{")
   lxml.flush(t)
   context("}")
end
\stopluacode

The subtree in ’t’ could have embedded xml tags that should be processed, 
so just stripping it clean will not do.

(this is not about \section as such, I just needed an example. \startsection
would be more modern, but it would not help fix the issue )

Thanks for any help,

Taco






More information about the ntg-context mailing list