summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/pack-rul.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-01-27 16:14:16 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-01-27 16:14:16 +0100
commit95a1799032dc61dbca4a11e495be34b4397c8fec (patch)
tree4b24bf117a90ba704dedf19ab1b1a734d78f4e45 /tex/context/base/mkiv/pack-rul.lua
parent0cfeab235554eeee0dddd6c3f44d3939ab490ff1 (diff)
downloadcontext-95a1799032dc61dbca4a11e495be34b4397c8fec.tar.gz
2017-01-27 14:46:00
Diffstat (limited to 'tex/context/base/mkiv/pack-rul.lua')
-rw-r--r--tex/context/base/mkiv/pack-rul.lua27
1 files changed, 15 insertions, 12 deletions
diff --git a/tex/context/base/mkiv/pack-rul.lua b/tex/context/base/mkiv/pack-rul.lua
index eb15111b8..3279dca51 100644
--- a/tex/context/base/mkiv/pack-rul.lua
+++ b/tex/context/base/mkiv/pack-rul.lua
@@ -41,13 +41,14 @@ local getnext = nuts.getnext
local getprev = nuts.getprev
local getlist = nuts.getlist
local setlist = nuts.setlist
+local getwhd = nuts.getwhd
local getid = nuts.getid
local getsubtype = nuts.getsubtype
local getbox = nuts.getbox
local hpack = nuts.hpack
local traverse_id = nuts.traverse_id
-local node_dimensions = nuts.dimensions
+local list_dimensions = nuts.dimensions
local flush_node = nuts.flush
local checkformath = false
@@ -72,22 +73,23 @@ local function doreshapeframedbox(n)
local list = getlist(box)
if list then
local function check(n,repack)
+ local width, height, depth = getwhd(n)
if not firstheight then
- firstheight = getfield(n,"height")
+ firstheight = height
end
- lastdepth = getfield(n,"depth")
- noflines = noflines + 1
- local l = getlist(n)
+ lastdepth = depth
+ noflines = noflines + 1
+ local l = getlist(n)
if l then
if repack then
local subtype = getsubtype(n)
if subtype == box_code or subtype == line_code then
- lastlinelength = node_dimensions(l,getfield(n,"dir"))
+ lastlinelength = list_dimensions(l,getfield(n,"dir"))
else
- lastlinelength = getfield(n,"width")
+ lastlinelength = width
end
else
- lastlinelength = getfield(n,"width")
+ lastlinelength = width
end
if lastlinelength > maxwidth then
maxwidth = lastlinelength
@@ -168,11 +170,12 @@ local function doanalyzeframedbox(n)
local list = getlist(box)
if list then
local function check(n)
+ local width, height, depth = getwhd(n)
if not firstheight then
- firstheight = getfield(n,"height")
+ firstheight = height
end
- lastdepth = getfield(n,"depth")
- noflines = noflines + 1
+ lastdepth = depth
+ noflines = noflines + 1
end
for h in traverse_id(hlist_code,list) do
check(h)
@@ -210,7 +213,7 @@ local function maxboxwidth(box)
if repack then
local subtype = getsubtype(n)
if subtype == box_code or subtype == line_code then
- lastlinelength = node_dimensions(l,getfield(n,"dir"))
+ lastlinelength = list_dimensions(l,getfield(n,"dir"))
else
lastlinelength = getfield(n,"width")
end