summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua17
1 files changed, 7 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua
index ce8375eeaf7..7e69162a900 100644
--- a/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua
+++ b/Master/texmf-dist/tex/context/base/mkiv/typo-mar.lua
@@ -59,8 +59,6 @@ local v_paragraph = variables.paragraph
local v_line = variables.line
local nuts = nodes.nuts
-local nodepool = nuts.pool
-
local tonode = nuts.tonode
local hpack_nodes = nuts.hpack
@@ -82,7 +80,6 @@ local setshift = nuts.setshift
local getwidth = nuts.getwidth
local setwidth = nuts.setwidth
local getheight = nuts.getheight
-local getprop = nuts.getprop
local setattrlist = nuts.setattrlist
@@ -103,9 +100,8 @@ local userdefined_code = whatsitcodes.userdefined
local nodepool = nuts.pool
-local new_usernode = nodepool.usernode
local new_hlist = nodepool.hlist
-
+local new_usernode = nodepool.usernode
local latelua = nodepool.latelua
local texgetdimen = tex.getdimen
@@ -459,7 +455,8 @@ local function sa(specification) -- maybe l/r keys ipv left/right keys
end
p.p = true
p.y = true
- setposition('md:v',tag,p)
+ -- maybe settobesaved first
+ setposition("md:v",tag,p)
cache[tag] = nil -- do this later, per page a cleanup
end
end
@@ -592,7 +589,7 @@ local function inject(parent,head,candidate)
elseif previous == current then
firstonstack = false
elseif ap and ac and ap.p == ac.p then
- local distance = ap.y - ac.y
+ local distance = (ap.y or 0) - (ac.y or 0)
if trace_margindata then
report_margindata("distance %p",distance)
end
@@ -683,7 +680,7 @@ local function inject(parent,head,candidate)
setwidth(box,0) -- not needed when wrapped
--
if isstacked then
- setlink(box,addtoanchor(v_anchor,nofinjected))
+ setlink(box,addtoanchor(v_anchors,nofinjected))
box = new_hlist(box)
-- set height / depth ?
end
@@ -736,7 +733,7 @@ local function flushinline(parent,head)
-- for now we also check for inline+yes/continue, maybe someday no such check
-- will happen; we can assume most inlines are one line heigh; also this
-- together feature can become optional
- registertogether(tonode(parent),room) -- !! tonode
+ registertogether(parent,room)
end
end
end
@@ -771,7 +768,7 @@ local function flushed(scope,parent) -- current is hlist
continue = continue or con
nofstored = nofstored - 1
if room then
- registertogether(tonode(parent),room) -- !! tonode
+ registertogether(parent,room)
end
else
break