Hi,
> it actually depends on what you do ... anyway here is some insight (as
> xml-tex old-timer you'll probably recognize the madness)
What I am mostly trying to do is to have as much of the xml processing in lua
as possible.
>
> % \enabletrackers[context*]
>
> \starttext
>
> % here is
My 2 cents:
local xmlflush = lxml.flush
local function text_or_xml(...)
for i,v in ipairs(arg) do
if "table" == type(v) then
xmlflush(v)
else
context(v)
end
end
end
function xml.functions.heading(t)
text_or_xml( "\\section{" , t , "}" )
end
Massimiliano
Il giorno
On 9/19/2018 2:50 PM, Taco Hoekwater wrote:
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â
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