summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/driv-usr.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-06-01 17:45:33 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-06-01 17:45:33 +0200
commit268cc2e9f10c887b29ac2136e9a0cdf40e464796 (patch)
treea91fa89364a765592fd6602308dc875c812da5a3 /tex/context/base/mkxl/driv-usr.lmt
parent316fec3fcb4b5e6f352a3a58db1656e08659202c (diff)
downloadcontext-268cc2e9f10c887b29ac2136e9a0cdf40e464796.tar.gz
2021-06-01 17:02:00
Diffstat (limited to 'tex/context/base/mkxl/driv-usr.lmt')
-rw-r--r--tex/context/base/mkxl/driv-usr.lmt12
1 files changed, 11 insertions, 1 deletions
diff --git a/tex/context/base/mkxl/driv-usr.lmt b/tex/context/base/mkxl/driv-usr.lmt
index e9d24b3c2..2dc3cda73 100644
--- a/tex/context/base/mkxl/driv-usr.lmt
+++ b/tex/context/base/mkxl/driv-usr.lmt
@@ -100,6 +100,7 @@ hlist_out = function(this_box,current)
local ref_r = pos_r
pos_r = getdirection(this_box)
local cur_h = 0
+ local cur_b
for current, id, subtype in nextnode, current do
if id == glyph_code then -- or id == kern_code
@@ -221,7 +222,11 @@ hlist_out = function(this_box,current)
if subtype == userdefined_code then
local action = userdefined[getprop(current,"id")]
if action then
- action(current,pos_h,pos_v)
+ if not cur_b then
+ local wd, ht, dp = getwhd(this_box)
+ cur_b = { wd, ht, dp, ref_h, ref_v, ref_r }
+ end
+ action(current, pos_h,pos_v, cur_b)
end
end
elseif id == disc_code then
@@ -256,6 +261,7 @@ vlist_out = function(this_box,current)
local top_edge = cur_v
pos_h = ref_h
pos_v = ref_v - cur_v
+ local cur_b
for current, id, subtype in nextnode, current do
if id == glue_code then
@@ -322,6 +328,10 @@ vlist_out = function(this_box,current)
if subtype == userdefined_code then
local action = userdefined[getprop(current,"id")]
if action then
+ if not cur_b then
+ local wd, ht, dp = getwhd(this_box)
+ cur_b = { wd, ht, dp, ref_h, ref_v, ref_r }
+ end
action(current,pos_h,pos_v)
end
end