summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-nut.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/node-nut.lua')
-rw-r--r--tex/context/base/mkiv/node-nut.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua
index b097fb8b1..f3877d5c9 100644
--- a/tex/context/base/mkiv/node-nut.lua
+++ b/tex/context/base/mkiv/node-nut.lua
@@ -203,6 +203,7 @@ nuts.vpack = direct.vpack
nuts.writable_spec = direct.writable_spec
nuts.write = direct.write
nuts.mlist_to_hlist = direct.mlist_to_hlist
+nuts.has_dimensions = direct.has_dimensions
if not nuts.mlist_to_hlist then
@@ -219,6 +220,17 @@ if not nuts.mlist_to_hlist then
end
+if not nuts.has_dimensions then
+
+ local getwhd = direct.getwhd
+
+ function nuts.has_dimensions(n)
+ local wd, ht, dp = getwhd(n)
+ return wd ~= 0 or (ht + dp) ~= 0
+ end
+
+end
+
local getfield = direct.getfield
local setfield = direct.setfield
@@ -254,6 +266,13 @@ nuts.setdisc = direct.setdisc
nuts.getdiscretionary = direct.getdisc
nuts.setdiscretionary = direct.setdisc
+nuts.getpre = direct.getpre
+nuts.setpre = direct.setpre
+nuts.getpost = direct.getpost
+nuts.setpost = direct.setpost
+nuts.getreplace = direct.getreplace
+nuts.setreplace = direct.setreplace
+
local getdata = direct.getdata
local setdata = direct.setdata
@@ -382,6 +401,23 @@ local remove = (CONTEXTLMTXMODE > 0 and LUATEXFUNCTIONALITY >= 20190704) and d_r
return head, current
end
+-- for now
+
+if not nuts.getpre then
+
+ local d_getdisc = direct.getdisc
+ local d_setfield = direct.setfield
+
+ function nuts.getpre(d) local h, _, _, t, _, _ = d_getdisc(d,true) return h, t end
+ function nuts.getpost(d) local _, h, _, _, t, _ = d_getdisc(d,true) return h, t end
+ function nuts.getreplace(d) local _, _, h, _, _, t = d_getdisc(d,true) return h, t end
+
+ function nuts.setpre(d,n) d_setfield("pre", n) end
+ function nuts.setpost(d,n) d_setfield("post", n) end
+ function nuts.setreplace(d,n) d_setfield("replace",n) end
+
+end
+
-- alias
nuts.getsurround = nuts.getkern