diff options
author | Marius <mariausol@gmail.com> | 2013-07-12 20:20:46 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-07-12 20:20:46 +0300 |
commit | b1d691809f3556327b45caf09444c50a77335b8f (patch) | |
tree | 8e85bb077d6680d1ea73a284a9ab3a0d26954628 /tex/context/base/pack-rul.lua | |
parent | b10c48bc0fe2e5be7305c0f31e41ea01f8596c30 (diff) | |
download | context-b1d691809f3556327b45caf09444c50a77335b8f.tar.gz |
beta 2013.07.12 19:10
Diffstat (limited to 'tex/context/base/pack-rul.lua')
-rw-r--r-- | tex/context/base/pack-rul.lua | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/tex/context/base/pack-rul.lua b/tex/context/base/pack-rul.lua index a990936e7..909c0c168 100644 --- a/tex/context/base/pack-rul.lua +++ b/tex/context/base/pack-rul.lua @@ -10,16 +10,21 @@ if not modules then modules = { } end modules ['pack-rul'] = { <p>An explanation is given in the history document <t>mk</t>.</p> --ldx]]-- -local texsetdimen, texsetcount, texbox = tex.setdimen, tex.setcount, tex.box -local hpack, free, copy, traverse_id = node.hpack, node.free, node.copy_list, node.traverse_id -local texdimen, texcount = tex.dimen, tex.count +local hpack = node.hpack +local free = node.free +local copy = node.copy_list +local traverse_id = node.traverse_id +local node_dimensions = node.dimensions local hlist_code = nodes.nodecodes.hlist local box_code = nodes.listcodes.box -local node_dimensions = node.dimensions + +local texsetdimen = tex.setdimen +local texsetcount = tex.setcount +local texgetbox = tex.getbox function commands.doreshapeframedbox(n) - local box = texbox[n] + local box = texgetbox(n) local noflines = 0 local firstheight = nil local lastdepth = nil @@ -76,17 +81,16 @@ function commands.doreshapeframedbox(n) end end end - -- print("reshape", noflines, firstheight or 0, lastdepth or 0) - texsetcount("global","framednoflines", noflines) - texsetdimen("global","framedfirstheight", firstheight or 0) - texsetdimen("global","framedlastdepth", lastdepth or 0) - texsetdimen("global","framedminwidth", minwidth) - texsetdimen("global","framedmaxwidth", maxwidth) - texsetdimen("global","framedaveragewidth", noflines > 0 and totalwidth/noflines or 0) + texsetcount("global","framednoflines",noflines) + texsetdimen("global","framedfirstheight",firstheight or 0) + texsetdimen("global","framedlastdepth",lastdepth or 0) + texsetdimen("global","framedminwidth",minwidth) + texsetdimen("global","framedmaxwidth",maxwidth) + texsetdimen("global","framedaveragewidth",noflines > 0 and totalwidth/noflines or 0) end function commands.doanalyzeframedbox(n) - local box = texbox[n] + local box = texgetbox(n) local noflines = 0 local firstheight = nil local lastdepth = nil @@ -102,8 +106,7 @@ function commands.doanalyzeframedbox(n) end end end - -- print("analyze", noflines, firstheight or 0, lastdepth or 0) - texsetcount("global","framednoflines", noflines) - texsetdimen("global","framedfirstheight", firstheight or 0) - texsetdimen("global","framedlastdepth", lastdepth or 0) + texsetcount("global","framednoflines",noflines) + texsetdimen("global","framedfirstheight",firstheight or 0) + texsetdimen("global","framedlastdepth",lastdepth or 0) end |