diff options
Diffstat (limited to 'tex/context/base/x-ct.mkiv')
-rw-r--r-- | tex/context/base/x-ct.mkiv | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/tex/context/base/x-ct.mkiv b/tex/context/base/x-ct.mkiv index 03a0e4b69..7836f5060 100644 --- a/tex/context/base/x-ct.mkiv +++ b/tex/context/base/x-ct.mkiv @@ -28,8 +28,10 @@ do justify = '', } - local texsprint = tex.sprint - local xmlsprint = xml.sprint + local texsprint = tex.sprint + local xmlsprint = xml.sprint + local xmlfilter = xml.filter + local ctxcatcodes = tex.ctxcatcodes local function roottemplate(root) local rt = root.at.template @@ -97,20 +99,20 @@ do defaulttemplate lxml.directives.before(root,'cdx') - texsprint(tex.ctxcatcodes, "\\bgroup") + texsprint(ctxcatcodes, "\\bgroup") lxml.directives.setup(root,'cdx') -- todo: head and foot - texsprint(tex.ctxcatcodes, string.format("\\starttabulate[%s]",template)) + texsprint(ctxcatcodes, string.format("\\starttabulate[%s]",template)) for e in xml.collected(root,bodyrowspec) do - texsprint(tex.ctxcatcodes, "\\NC ") + texsprint(ctxcatcodes, "\\NC ") for e in xml.collected(e,cellspec) do texsprint(xml.content(e)) - texsprint(tex.ctxcatcodes, "\\NC") + texsprint(ctxcatcodes, "\\NC") end - texsprint(tex.ctxcatcodes, "\\NR") + texsprint(ctxcatcodes, "\\NR") end - texsprint(tex.ctxcatcodes, "\\stoptabulate") - texsprint(tex.ctxcatcodes, "\\egroup") + texsprint(ctxcatcodes, "\\stoptabulate") + texsprint(ctxcatcodes, "\\egroup") lxml.directives.after(root,'cdx') end @@ -137,20 +139,19 @@ do local template = string.format("%s*%s", nx or 1, ny or 1) lxml.directives.before(root,'cdx') - texsprint(tex.ctxcatcodes, "\\bgroup") + texsprint(ctxcatcodes, "\\bgroup") lxml.directives.setup(root,'cdx') -- todo: alignments - texsprint(tex.ctxcatcodes, string.format("\\startcombination[%s]",template)) + texsprint(ctxcatcodes, "\\startcombination[",template,"]") for e in xml.collected(root,pairspec) do - texsprint(tex.ctxcatcodes,"{") - xmlsprint(xml.filter(e,contentspec) or "") - texsprint(tex.ctxcatcodes,"}") - texsprint(tex.ctxcatcodes,"{") - xmlsprint(xml.filter(e,captionspec) or "") - texsprint(tex.ctxcatcodes,"}") + texsprint(ctxcatcodes,"{") + xmlfilter(e,contentspec) + texsprint(ctxcatcodes,"}{") + xmlfilter(e,captionspec) + texsprint(ctxcatcodes,"}") end - texsprint(tex.ctxcatcodes, "\\stopcombination") - texsprint(tex.ctxcatcodes, "\\egroup") + texsprint(ctxcatcodes, "\\stopcombination") + texsprint(ctxcatcodes, "\\egroup") lxml.directives.after(root,'cdx') end |