diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-04-12 18:03:49 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-04-12 18:03:49 +0200 |
commit | 171f7b525a5f7ddfb1631501cbc2d09722de4018 (patch) | |
tree | 594ab978abdaf0b3b42b1a5da96d2954e0d06159 /tex/context/base/mkiv/node-res.lua | |
parent | 64f6e8fc0c6cb9254a6fe3db0b4ab31c51cf8524 (diff) | |
download | context-171f7b525a5f7ddfb1631501cbc2d09722de4018.tar.gz |
2019-04-12 17:51:00
Diffstat (limited to 'tex/context/base/mkiv/node-res.lua')
-rw-r--r-- | tex/context/base/mkiv/node-res.lua | 21 |
1 files changed, 11 insertions, 10 deletions
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 |