summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-rul.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-11 00:41:24 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-05-11 00:41:24 +0200
commitcb364747722b9ce55d3301af24d5740fd511cf79 (patch)
tree7b6691a7dcd10e8b0021eb34494b14a315431096 /tex/context/base/mkiv/node-rul.lua
parente5703477ae326ba910515aeab93000828516954a (diff)
downloadcontext-cb364747722b9ce55d3301af24d5740fd511cf79.tar.gz
2016-05-10 23:48:00
Diffstat (limited to 'tex/context/base/mkiv/node-rul.lua')
-rw-r--r--tex/context/base/mkiv/node-rul.lua19
1 files changed, 12 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index e0649e99b..5ac43ea4a 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -11,7 +11,6 @@ if not modules then modules = { } end modules ['node-rul'] = {
--
-- todo: make robust for layers ... order matters
-
local attributes, nodes, node = attributes, nodes, node
local nuts = nodes.nuts
@@ -275,9 +274,13 @@ local data = rules.data
-- we implement user rules here as it takes less code this way
-local function userrule(t)
+local function userrule(t,noattributes)
local r = new_userrule(t.width or 0,t.height or 0,t.depth or 0)
- setfield(r,"attr",attribs())
+ if noattributes == false or noattributes == nil then
+ -- avoid fuzzy ones
+ else
+ setfield(r,"attr",attribs())
+ end
properties[r] = t
return tonode(r)
end
@@ -289,10 +292,12 @@ rules.ruleactions = ruleactions
callback.register("process_rule",function(n,h,v)
local n = tonut(n)
local p = properties[n]
- local i = p.type or "draw"
- local a = ruleactions[i]
- if a then
- a(p,h,v,i,n)
+ if p then
+ local i = p.type or "draw"
+ local a = ruleactions[i]
+ if a then
+ a(p,h,v,i,n)
+ end
end
end)