summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-tst.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/node-tst.lua')
-rw-r--r--tex/context/base/mkiv/node-tst.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/node-tst.lua b/tex/context/base/mkiv/node-tst.lua
index 4832c048c..1109f28a3 100644
--- a/tex/context/base/mkiv/node-tst.lua
+++ b/tex/context/base/mkiv/node-tst.lua
@@ -32,6 +32,9 @@ local getprev = nuts.getprev
local getid = nuts.getid
local getchar = nuts.getchar
local getsubtype = nuts.getsubtype
+local getkern = nuts.getkern
+local getpenalty = nuts.getpenalty
+local getwidth = nuts.getwidth
local find_node_tail = nuts.tail
@@ -39,11 +42,11 @@ function nuts.leftmarginwidth(n) -- todo: three values
while n do
local id = getid(n)
if id == glue_code then
- return getsubtype(n) == leftskip_code and getfield(n,"width") or 0
+ return getsubtype(n) == leftskip_code and getwidth(n) or 0
elseif id == whatsit_code then
n = getnext(n)
elseif id == hlist_code then
- return getfield(n,"width")
+ return getwidth(n)
else
break
end
@@ -57,7 +60,7 @@ function nuts.rightmarginwidth(n)
while n do
local id = getid(n)
if id == glue_code then
- return getsubtype(n) == rightskip_code and getfield(n,"width") or 0
+ return getsubtype(n) == rightskip_code and getwidth(n) or 0
elseif id == whatsit_code then
n = getprev(n)
else
@@ -72,10 +75,9 @@ function nuts.somespace(n,all)
if n then
local id = getid(n)
if id == glue_code then
- return (all or ((getfield(n,"width") or 0) ~= 0)) and glue_code -- temp: or 0
- -- return (all or (getfield(n,"width") ~= 0)) and glue_code
+ return (all or (getwidth(n) ~= 0)) and glue_code -- temp: or 0
elseif id == kern_code then
- return (all or (getfield(n,"kern") ~= 0)) and kern
+ return (all or (getkern(n) ~= 0)) and kern
elseif id == glyph_code then
local category = chardata[getchar(n)].category
-- maybe more category checks are needed
@@ -90,7 +92,7 @@ function nuts.somepenalty(n,value)
local id = getid(n)
if id == penalty_code then
if value then
- return getfield(n,"penalty") == value
+ return getpenalty(n) == value
else
return true
end