diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/page-mix.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/page-mix.lua | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/context/base/page-mix.lua b/Master/texmf-dist/tex/context/base/page-mix.lua index 2bf89f73778..61a4f944d9e 100644 --- a/Master/texmf-dist/tex/context/base/page-mix.lua +++ b/Master/texmf-dist/tex/context/base/page-mix.lua @@ -258,22 +258,22 @@ local function preparesplit(specification) -- a rather large function if splitmethod == v_none then splitmethod = false end - local options = settings_to_hash(specification.option or "") + local options = settings_to_hash(specification.option or "") local stripbottom = specification.alternative == v_local - local cycle = specification.cycle or 1 - local nofcolumns = specification.nofcolumns or 1 + local cycle = specification.cycle or 1 + local nofcolumns = specification.nofcolumns or 1 if nofcolumns == 0 then nofcolumns = 1 end local preheight = specification.preheight or 0 - local extra = specification.extra or 0 + local extra = specification.extra or 0 local maxheight = specification.maxheight - local optimal = originalheight/nofcolumns + local optimal = originalheight/nofcolumns if specification.balance ~= v_yes then optimal = maxheight end - local target = optimal + extra - local overflow = target > maxheight - preheight + local target = optimal + extra + local overflow = target > maxheight - preheight local threshold = specification.threshold or 0 if overflow then target = maxheight - preheight @@ -484,7 +484,15 @@ local function preparesplit(specification) -- a rather large function end height = height + depth + skip depth = 0 +if advance < 0 then + height = height + advance + skip = 0 + if height < 0 then + height = 0 + end +else skip = height > 0 and advance or 0 +end if trace_state then report_state("%-7s > column %s, height %p, depth %p, skip %p","glue",column,height,depth,skip) end @@ -602,7 +610,8 @@ local function preparesplit(specification) -- a rather large function local nxtid = nxt and getid(nxt) line = line + 1 local inserts, currentskips, nextskips, inserttotal = nil, 0, 0, 0 - local advance = getfield(current,"height") -- + getfield(current,"depth") + local advance = getfield(current,"height") +-- + getfield(current,"depth") -- when > strutdp if trace_state then report_state("%-7s > column %s, content: %s","line",column,listtoutf(getlist(current),true,true)) end |