summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/node-res.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-15 11:15:07 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-02-15 11:15:07 +0100
commita036ac2dd19b592316e1b479360e9e6c6700e935 (patch)
tree321156a4e2af995a7f401e1b773fd8813e3928da /tex/context/base/mkiv/node-res.lua
parentd73f5987ca04dbdf0a134236c3314dadd7a73565 (diff)
downloadcontext-a036ac2dd19b592316e1b479360e9e6c6700e935.tar.gz
2016-02-15 10:29:00
Diffstat (limited to 'tex/context/base/mkiv/node-res.lua')
-rw-r--r--tex/context/base/mkiv/node-res.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua
index 91de6171d..5bc414b68 100644
--- a/tex/context/base/mkiv/node-res.lua
+++ b/tex/context/base/mkiv/node-res.lua
@@ -167,6 +167,7 @@ local noad = register_nut(new_nut("noad"))
local rule = register_nut(new_nut("rule")) setfield(rule, "dir","TLT")
local emptyrule = register_nut(new_nut("rule",rulecodes.empty)) setfield(rule, "dir","TLT")
+local userrule = register_nut(new_nut("rule",rulecodes.user)) setfield(rule, "dir","TLT")
local hlist = register_nut(new_nut("hlist")) setfield(hlist,"dir","TLT")
local vlist = register_nut(new_nut("vlist")) setfield(vlist,"dir","TLT")
@@ -374,6 +375,23 @@ function nutpool.emptyrule(width,height,depth,dir) -- w/h/d == nil will let them
return n
end
+function nutpool.userrule(width,height,depth,dir) -- w/h/d == nil will let them adapt
+ local n = copy_nut(userrule)
+ if width then -- also 0 else adapt
+ setfield(n,"width",width)
+ end
+ if height then -- also 0 else adapt
+ setfield(n,"height",height)
+ end
+ if depth then -- also 0 else adapt
+ setfield(n,"depth",depth)
+ end
+ if dir then
+ setfield(n,"dir",dir)
+ end
+ return n
+end
+
function nutpool.latelua(code)
local n = copy_nut(latelua)
setfield(n,"string",code)