diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-02-12 10:25:10 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-02-12 10:25:10 +0100 |
commit | e005748401471273a119724acf5e1567f2a04eee (patch) | |
tree | faa325320cbce7a475dd19050e9dcb79c8c71d4f /tex/context/base/mkiv/page-mix.lua | |
parent | f4c9d2d305f1214a144fcb23a66964761583234a (diff) | |
download | context-e005748401471273a119724acf5e1567f2a04eee.tar.gz |
2018-02-12 09:01:00
Diffstat (limited to 'tex/context/base/mkiv/page-mix.lua')
-rw-r--r-- | tex/context/base/mkiv/page-mix.lua | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/page-mix.lua b/tex/context/base/mkiv/page-mix.lua index b0e1783e4..107ac1410 100644 --- a/tex/context/base/mkiv/page-mix.lua +++ b/tex/context/base/mkiv/page-mix.lua @@ -69,6 +69,8 @@ local getpenalty = nuts.getpenalty local getwidth = nuts.getwidth local getheight = nuts.getheight local getdepth = nuts.getdepth +local traverse_id = nuts.traverse_id +local traverse = nuts.traverse local theprop = nuts.theprop @@ -277,10 +279,14 @@ local function preparesplit(specification) -- a rather large function if nofcolumns == 0 then nofcolumns = 1 end - local preheight = specification.preheight or 0 - local extra = specification.extra or 0 - local maxheight = specification.maxheight - local optimal = originalheight/nofcolumns + local preheight = specification.preheight or 0 + local extra = specification.extra or 0 + local maxheight = specification.maxheight + local optimal = originalheight/nofcolumns + local noteheight = specification.noteheight or 0 + + maxheight = maxheight - noteheight + if specification.balance ~= v_yes then optimal = maxheight end @@ -823,6 +829,23 @@ local function report_deltas(result,str) report_state("%s, cycles %s, deltas % | t",str,result.cycle or 1,t) end +-- local function xxcollectinserts(h) +-- local skips, total, order = 0, 0, 0 +-- print(h) +-- if h then +-- h = getlist(h) +-- for n in traverse(h) do +-- print(tonode(n)) +-- end +-- for n in traverse_id(insert_code,h) do +-- order = order + 1 +-- total = total + getheight(n) +-- skips = skips + structures.notes.check_spacing(getsubtype(n),order) +-- end +-- end +-- return skips, total +-- end + local function setsplit(specification) splitruns = splitruns + 1 if trace_state then @@ -1023,6 +1046,7 @@ implement { { "box", "integer" }, { "nofcolumns", "integer" }, { "maxheight", "dimen" }, + { "noteheight", "dimen" }, { "step", "dimen" }, { "cycles", "integer" }, { "preheight", "dimen" }, |