From cd05787a9d41bac345695564011d333974afe1d9 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 5 Mar 2021 12:17:06 +0100 Subject: 2021-03-05 11:16:00 --- tex/context/base/mkiv/typo-bld.lua | 77 +++++++++++--------------------------- 1 file changed, 21 insertions(+), 56 deletions(-) (limited to 'tex/context/base/mkiv/typo-bld.lua') diff --git a/tex/context/base/mkiv/typo-bld.lua b/tex/context/base/mkiv/typo-bld.lua index 269386e6c..305032772 100644 --- a/tex/context/base/mkiv/typo-bld.lua +++ b/tex/context/base/mkiv/typo-bld.lua @@ -242,65 +242,30 @@ end -- this will be split into contribute_filter for these 4 so at some point -- the check can go away -if CONTEXTLMTXMODE > 0 then - - -- Todo: contrib_head can be any head (kind of) not per se the page one so maybe I will - -- intercept that in the engine with page_contribute_head or so. - - function builders.buildpage_filter(groupcode) - local head = texlists.contribute_head - if head then - local done = false - -- called quite often ... maybe time to remove timing - starttiming(builders) - if trace_page_builder then - report(groupcode,head) - end - head, done = pageactions(head,groupcode) - stoptiming(builders) - -- -- doesn't work here (not passed on?) - -- texset("pagegoal,texget("vsize") - texgetdimen("d_page_floats_inserted_top") - texgetdimen("d_page_floats_inserted_bottom") - texlists.contribute_head = head or nil -- needs checking - -- tex.setlist("contribute_head",head,head and nodes.tail(head)) - return done and head or true -- no return value needed - else - -- happens quite often - if trace_page_builder then - report(groupcode) - end - -- return nil, false -- no return value needed - return nil +function builders.buildpage_filter(groupcode) + local head = texlists.contrib_head + if head then + local done = false + -- called quite often ... maybe time to remove timing + starttiming(builders) + if trace_page_builder then + report(groupcode,head) end - end - -else - - function builders.buildpage_filter(groupcode) - local head = texlists.contrib_head - if head then - local done = false - -- called quite often ... maybe time to remove timing - starttiming(builders) - if trace_page_builder then - report(groupcode,head) - end - head, done = pageactions(head,groupcode) - stoptiming(builders) - -- -- doesn't work here (not passed on?) - -- texset("pagegoal,texget("vsize") - texgetdimen("d_page_floats_inserted_top") - texgetdimen("d_page_floats_inserted_bottom") - texlists.contrib_head = head or nil -- needs checking - -- tex.setlist("contrib_head",head,head and nodes.tail(head)) - return done and head or true -- no return value needed - else - -- happens quite often - if trace_page_builder then - report(groupcode) - end - -- return nil, false -- no return value needed - return nil + head, done = pageactions(head,groupcode) + stoptiming(builders) + -- -- doesn't work here (not passed on?) + -- texset("pagegoal,texget("vsize") - texgetdimen("d_page_floats_inserted_top") - texgetdimen("d_page_floats_inserted_bottom") + texlists.contrib_head = head or nil -- needs checking + -- tex.setlist("contrib_head",head,head and nodes.tail(head)) + return done and head or true -- no return value needed + else + -- happens quite often + if trace_page_builder then + report(groupcode) end +-- return nil, false -- no return value needed + return nil end - end registercallback('vpack_filter', builders.vpack_filter, "vertical spacing etc") -- cgit v1.2.3