diff options
author | Hans Hagen <pragma@wxs.nl> | 2016-11-22 20:44:35 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-11-22 20:44:35 +0100 |
commit | f4ff686750ca9405662c7615e9c4b04685b5be5c (patch) | |
tree | a9999aa6a9bdfdf5fa707b20e95e6ca6a405a4a1 /tex/context/base/mkiv/page-mix.lua | |
parent | ad79afc01bebd1a16f30f8c08b873ff52224bd19 (diff) | |
download | context-f4ff686750ca9405662c7615e9c4b04685b5be5c.tar.gz |
2016-11-22 20:10:00
Diffstat (limited to 'tex/context/base/mkiv/page-mix.lua')
-rw-r--r-- | tex/context/base/mkiv/page-mix.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/page-mix.lua b/tex/context/base/mkiv/page-mix.lua index 725073f55..b5e97da4d 100644 --- a/tex/context/base/mkiv/page-mix.lua +++ b/tex/context/base/mkiv/page-mix.lua @@ -15,6 +15,8 @@ if not modules then modules = { } end modules ["page-mix"] = { -- local trackers, logs, storage = trackers, logs, storage -- local number, table = number, table +-- todo: explore vsplit (for inserts) + local next, type = next, type local concat = table.concat local ceil, floor = math.ceil, math.floor @@ -106,8 +108,15 @@ local forcedbreak = -123 local function collectinserts(result,nxt,nxtid) local inserts, currentskips, nextskips, inserttotal = { }, 0, 0, 0 +local i = result.i +if not i then + i = 0 + result.i = i +end while nxt do if nxtid == insert_code then + i = i + 1 +result.i = i inserttotal = inserttotal + getfield(nxt,"height") -- height includes depth local s = getsubtype(nxt) local c = inserts[s] @@ -115,9 +124,11 @@ local function collectinserts(result,nxt,nxtid) report_state("insert of class %s found",s) end if not c then +local skip = structures.notes.check_spacing(s,i) -- before +local width = getfield(getskip(skip),"width") c = { } inserts[s] = c - local width = getfield(getskip(s),"width") +-- local width = getfield(getskip(s),"width") if not result.inserts[s] then currentskips = currentskips + width end |