From 669436bb34437aee17f1823836cbbb16c570a505 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 25 Jul 2018 20:24:04 +0200 Subject: 2018-07-25 19:49:00 --- tex/context/base/mkiv/node-ini.lua | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'tex/context/base/mkiv/node-ini.lua') diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua index 9b35f29f6..47c1b88e1 100644 --- a/tex/context/base/mkiv/node-ini.lua +++ b/tex/context/base/mkiv/node-ini.lua @@ -385,7 +385,7 @@ nodes.pdfliteralvalues = pdfliteralvalues dirvalues.lefttoright = 0 dirvalues.righttoleft = 1 -nodes.subtypes = { +nodes.subtypes = allocate { [nodecodes.accent] = accentcodes, [nodecodes.boundary] = boundarycodes, [nodecodes.dir] = dircodes, @@ -405,6 +405,12 @@ nodes.subtypes = { [nodecodes.whatsit] = whatcodes, } +table.setmetatableindex(nodes.subtypes,function(t,k) + local v = { } + t[k] = v + return v +end) + nodes.skipcodes = gluecodes -- more friendly nodes.directioncodes = dircodes -- more friendly nodes.whatsitcodes = whatcodes -- more official @@ -492,3 +498,30 @@ end if node.fix_node_lists then node.fix_node_lists(false) end + +-- a temp hack + +if LUATEXFUNCTIONALITY < 6866 then + + local texnest = tex.nest + local texlist = tex.list + + function tex.getnest(k) + if not k or k == "top" then + return texnest[texnest.ptr] + end + if k == "ptr" then + return texnest.ptr + end + return texnest[k] + end + + function tex.getlist(k) + return texlist[k] + end + + function tex.setlist(k,v) + texlist[k] = v + end + +end -- cgit v1.2.3