summaryrefslogtreecommitdiff
path: root/tex/context/base/node-res.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-06-10 11:22:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-06-10 11:22:00 +0200
commit1f8c4726d3da14ebb6071bdba5888ebe763329d0 (patch)
treea25a7aea1d7c9561afbab306db7971eae12dc71b /tex/context/base/node-res.lua
parent5b6956e57c33bd35c0ac1e4118cdb1b183d77499 (diff)
downloadcontext-1f8c4726d3da14ebb6071bdba5888ebe763329d0.tar.gz
beta 2009.06.10 11:22
Diffstat (limited to 'tex/context/base/node-res.lua')
-rw-r--r--tex/context/base/node-res.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/tex/context/base/node-res.lua b/tex/context/base/node-res.lua
index c8d815be4..b84e5b105 100644
--- a/tex/context/base/node-res.lua
+++ b/tex/context/base/node-res.lua
@@ -59,6 +59,7 @@ local glue = nodes.register(new_node("glue"))
local glue_spec = nodes.register(new_node("glue_spec"))
local glyph = nodes.register(new_node("glyph",0))
local textdir = nodes.register(new_node("whatsit",7))
+local rule = nodes.register(new_node("rule"))
function nodes.glyph(fnt,chr)
local n = copy_node(glyph)
@@ -100,6 +101,13 @@ function nodes.textdir(dir)
t.dir = dir
return t
end
+function nodes.rule(w,h,d)
+ local n = copy_node(rule)
+ if w then n.width = w end
+ if h then n.height = h end
+ if d then n.depth = d end
+ return n
+end
statistics.register("cleaned up reserved nodes", function()
return format("%s nodes, %s lists of %s", nodes.cleanup_reserved(tex.count["lastallocatedbox"]))