summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/node-bck.lua
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2011-06-01 08:54:21 +0000
committerTaco Hoekwater <taco@elvenkind.com>2011-06-01 08:54:21 +0000
commitd7ccb42582f85acf30568913610ccf4d602023fb (patch)
tree7292e3545a420676878e7451b68892d360c62cb6 /Master/texmf-dist/tex/context/base/node-bck.lua
parent2d62a6fe9b80def59c392268022f1f9a2d6e358f (diff)
commit context 2011.05.18
git-svn-id: svn://tug.org/texlive/trunk@22719 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/node-bck.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/node-bck.lua31
1 files changed, 19 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/context/base/node-bck.lua b/Master/texmf-dist/tex/context/base/node-bck.lua
index 94fbac85fd4..e1e4d46525e 100644
--- a/Master/texmf-dist/tex/context/base/node-bck.lua
+++ b/Master/texmf-dist/tex/context/base/node-bck.lua
@@ -9,15 +9,22 @@ if not modules then modules = { } end modules ['node-bck'] = {
-- beware, this one takes quite some runtime, so we need a status flag
-- maybe some page related state
-local hlist = node.id("hlist")
-local vlist = node.id("vlist")
+local attributes, nodes, node = attributes, nodes, node
-local has_attribute = node.has_attribute
-local set_attribute = node.set_attribute
-local traverse = node.traverse
+local nodecodes = nodes.nodecodes
-local new_rule = nodes.rule
-local new_glue = nodes.glue
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+
+local has_attribute = node.has_attribute
+local set_attribute = node.set_attribute
+local traverse = node.traverse
+
+local nodepool = nodes.pool
+local tasks = nodes.tasks
+
+local new_rule = nodepool.rule
+local new_glue = nodepool.glue
local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
@@ -26,11 +33,11 @@ local a_background = attributes.private('background')
local function add_backgrounds(head) -- boxes, inline will be done too
local id = head.id
- if id == vlist or id == hlist then
+ if id == vlist_code or id == hlist_code then
local current = head.list
while current do
local id = current.id
- if id == hlist then -- and current.list
+ if id == hlist_code then -- and current.list
local background = has_attribute(current,a_background)
if background then
-- direct to hbox
@@ -84,7 +91,7 @@ local function add_backgrounds(head) -- boxes, inline will be done too
add_backgrounds(current)
end
end
- elseif id == vlist then -- and current.list
+ elseif id == vlist_code then -- and current.list
-- direct to vbox
local background = has_attribute(current,a_background)
if background then
@@ -114,6 +121,6 @@ local function add_backgrounds(head) -- boxes, inline will be done too
return head, true
end
-nodes.add_backgrounds = add_backgrounds
+nodes.handlers.backgrounds = add_backgrounds
-tasks.appendaction("shipouts","normalizers","nodes.add_backgrounds")
+tasks.appendaction("shipouts","normalizers","nodes.handlers.backgrounds")