summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/page-str.lua
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2014-05-05 20:29:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2014-05-05 20:29:55 +0000
commitba9a57343987f1c2c72396e7c38f1fa30352c24c (patch)
tree66a8b12cdf67427ce96770fd0e9e581759aade1c /Master/texmf-dist/tex/context/base/page-str.lua
parent15242121b8ddf7d4a041fb3998d295dd8232e1eb (diff)
ConTeXt 2014.04.28 23:24
git-svn-id: svn://tug.org/texlive/trunk@33856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/page-str.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/page-str.lua34
1 files changed, 21 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/context/base/page-str.lua b/Master/texmf-dist/tex/context/base/page-str.lua
index f6314657f01..f2ac27cd9c1 100644
--- a/Master/texmf-dist/tex/context/base/page-str.lua
+++ b/Master/texmf-dist/tex/context/base/page-str.lua
@@ -12,18 +12,25 @@ if not modules then modules = { } end modules ['page-str'] = {
local concat, insert, remove = table.concat, table.insert, table.remove
-local find_tail, write_node, free_node, copy_nodelist = node.slide, node.write, node.free, node.copy_list
-local vpack_nodelist, hpack_nodelist = node.vpack, node.hpack
-local texdimen, texbox = tex.dimen, tex.box
-local settings_to_array = utilities.parsers.settings_to_array
-
local nodes, node = nodes, node
-local nodepool = nodes.pool
-local tasks = nodes.tasks
+local nodepool = nodes.pool
+local tasks = nodes.tasks
+
+local new_kern = nodepool.kern
+local new_glyph = nodepool.glyph
+
+local slide_nodelist = node.slide
+local write_node = node.write
+local free_node = node.free
+local copy_nodelist = node.copy_list
+local vpack_nodelist = node.vpack
+local hpack_nodelist = node.hpack
+
+local settings_to_array = utilities.parsers.settings_to_array
-local new_kern = nodepool.kern
-local new_glyph = nodepool.glyph
+local texgetdimen = tex.getdimen
+local texgetbox = tex.getbox
local trace_collecting = false trackers.register("streams.collecting", function(v) trace_collecting = v end)
local trace_flushing = false trackers.register("streams.flushing", function(v) trace_flushing = v end)
@@ -66,7 +73,7 @@ function streams.collect(head,where)
end
local last = dana[#dana]
if last then
- local tail = find_tail(last)
+ local tail = slide_nodelist(last)
tail.next, head.prev = head, tail
elseif last == false then
dana[#dana] = head
@@ -175,7 +182,8 @@ function streams.synchronize(list) -- this is an experiment !
if trace_flushing then
report_streams("slot %s has max height %p and max depth %p",m,height,depth)
end
- local strutht, strutdp = texdimen.globalbodyfontstrutheight, texdimen.globalbodyfontstrutdepth
+ local strutht = texgetdimen("globalbodyfontstrutheight")
+ local strutdp = texgetdimen("globalbodyfontstrutdepth")
local struthtdp = strutht + strutdp
for i=1,#list do
local name = list[i]
@@ -194,11 +202,11 @@ function streams.synchronize(list) -- this is an experiment !
else
-- this is not yet ok as we also need to keep an eye on vertical spacing
-- so we might need to do some splitting or whatever
- local tail = vbox.list and find_tail(vbox.list)
+ local tail = vbox.list and slide_nodelist(vbox.list)
local n, delta = 0, delta_height -- for tracing
while delta > 0 do
-- we need to add some interline penalties
- local line = copy_nodelist(tex.box.strutbox)
+ local line = copy_nodelist(texgetbox("strutbox"))
line.height, line.depth = strutht, strutdp
if tail then
tail.next, line.prev = line, tail