Re: [NTG-context] XML: calculations on attribute values before output

2022-05-05 Thread Duncan Hothersall via ntg-context
he lua side, because there the > attributes are just in a table entry of the argument node t ( t.at ): > > set up a lua function in the setups: > > \startxmlsetups xml:demo:base > \xmlsetsetup{#1}{*}{xml:demo:*} > \xmlsetfunction {\xmldocument}{entry}{userdata.xmlfunctions.entry} > \stopxm

Re: [NTG-context] XML: calculations on attribute values before output

2022-05-05 Thread Taco Hoekwater via ntg-context
bles in this way, that would also be great!) Not CALS, but I do a lot of HTML table processing. I find it all much easier on the lua side, because there the attributes are just in a table entry of the argument node t ( t.at ): set up a lua function in the setups: \startxmlsetups

Re: [NTG-context] xml in lua advice ?

2018-09-19 Thread Taco Hoekwater
nd function xml.functions.b(t) context.start() context.bf() lxml.flush(t) context.stop() context("{}") end function xml.functions.section(t) context.section("{") lxml.flush(t) context("}") end \stopluacode \startxmlsetups mysetups % to

Re: [NTG-context] processing style inside verbatim in XML

2011-10-24 Thread Hans Hagen
which displays fine in my browser, and it should look similar with ConTeXt. I have problems with literal typesetting of (that should have applied style instead), but maybe I only have wrong settings in my parser. When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I cannot color

[NTG-context] processing style inside verbatim in XML

2011-10-21 Thread Mojca Miklavec
should look similar with ConTeXt. I have problems with literal typesetting of (that should have applied style instead), but maybe I only have wrong settings in my parser. When I use \xmlsetfunction{main}{pre}{lxml.displayverbatim}, then I cannot color the numbers. When I use, according to

Re: [NTG-context] DocBook in ConTeXt - any new ideas?

2011-06-05 Thread Hans Hagen
aiks in docbook they embed the cals model, so it's not used as an independent definition). When in x-cals.lua the following is used in line 128 local prefix = namespace and namespace ~= "" and (namespace .. ":") or "" one can do this then: \startxmlset

Re: [NTG-context] HTML to Context with Regular Expressoin

2007-12-17 Thread Mojca Miklavec
rted with the idea. You don't need any regular expressions. You can anly compile it with "texexec --lua filename.tex". Mojca \startxmlsetups all:html \xmlsetsetup{main}{head|h1|h2|p|span|sub|table|b|tt|ul|li|div|img}{*} %\xmlsetfunction{main}{pre}{lxml.displayverbatim}

Re: [NTG-context] How to process simple HTML files with LuaTeX

2007-10-01 Thread Mojca Miklavec
to remove unneeded space? With \ignorespaces? - How to use the new verbatim code? I have tried to use \xmlsetfunction{main}{pre}{lxml.verbatim} but it didn't really work. % test.tex: \startxmlsetups all:html \xmlsetsetup{main}{h1|pre}{*} \stopxmlsetups \xmlregistersetup{all:html}