From 171f7b525a5f7ddfb1631501cbc2d09722de4018 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 12 Apr 2019 18:03:49 +0200 Subject: 2019-04-12 17:51:00 --- tex/context/base/mkiv/node-res.lua | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'tex/context/base/mkiv/node-res.lua') diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua index 5b4961683..4b8187fa3 100644 --- a/tex/context/base/mkiv/node-res.lua +++ b/tex/context/base/mkiv/node-res.lua @@ -96,6 +96,7 @@ local setsubtype = nuts.setsubtype local setleader = nuts.setleader local setdata = nuts.setdata +local setruledata = nuts.setruledata local setvalue = nuts.setvalue local copy_nut = nuts.copy @@ -172,7 +173,7 @@ local savepos = register_nut(new_nut(whatsit_code,whatsitcodes.savepos local user_node = new_nut(whatsit_code,whatsitcodes.userdefined) -if CONTEXTLMTXMODE < 2 then +if CONTEXTLMTXMODE == 0 then setfield(user_node,"type",usercodes.number) end @@ -394,7 +395,7 @@ function nutpool.outlinerule(width,height,depth,line) -- w/h/d == nil will let t setwhd(n,width,height,depth) end if line then - if CONTEXTLMTXMODE > 1 then setdata(n,line) else setfield(n,"transform",line) end + setruledata(n,line) end return n end @@ -414,11 +415,16 @@ function nutpool.savepos() return copy_nut(savepos) end -if CONTEXTLMTXMODE > 1 then +if CONTEXTLMTXMODE == 0 then function nutpool.latelua(code) local n = copy_nut(latelua) - nodeproperties[n] = { data = code } + if type(code) == "table" then + local action = code.action + local specification = code.specification or code + code = function() action(specification) end + end + setdata(n,code) return n end @@ -426,12 +432,7 @@ else function nutpool.latelua(code) local n = copy_nut(latelua) - if type(code) == "table" then - local action = code.action - local specification = code.specification or code - code = function() action(specification) end - end - setdata(n,code) + nodeproperties[n] = { data = code } return n end -- cgit v1.2.3