diff options
Diffstat (limited to 'tex/context/base/mkxl/typo-bld.lmt')
-rw-r--r-- | tex/context/base/mkxl/typo-bld.lmt | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/tex/context/base/mkxl/typo-bld.lmt b/tex/context/base/mkxl/typo-bld.lmt index 9c83adede..ae644d297 100644 --- a/tex/context/base/mkxl/typo-bld.lmt +++ b/tex/context/base/mkxl/typo-bld.lmt @@ -34,11 +34,12 @@ constructors.attribute = a_parbuilder local unsetvalue = attributes.unsetvalue local texsetattribute = tex.setattribute local texnest = tex.nest -local texlists = tex.lists - local texget = tex.get local texset = tex.set +local getspeciallist = nodes.nuts.getspeciallist +local setspeciallist = nodes.nuts.setspeciallist + local texgetdimen = tex.getdimen local nodes = nodes @@ -216,46 +217,32 @@ end local pageactions = nodes.tasks.actions("mvlbuilders") ----- lineactions = nodes.tasks.actions("linebuilders") -local function report(groupcode,head) - report_page_builder("trigger: %s",groupcode) +local function report(pagecontext,head) + report_page_builder("trigger: %s at level %i",pagecontext,texnest.ptr) report_page_builder(" vsize : %p",texget("vsize")) report_page_builder(" pagegoal : %p",texget("pagegoal")) report_page_builder(" pagetotal: %p",texget("pagetotal")) report_page_builder(" list : %s",head and nodeidstostring(head) or "<empty>") end --- check why box is called before after_linebreak .. maybe make categories and --- call 'm less - --- this will be split into contribute_filter for these 4 so at some point --- the check can go away +-- Watch out: contributehead can be any head (kind of) not per se the page one +-- but that needs to be intercepted when needed by groupcode and level. At some +-- point this one might be split by group. --- 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 contributehead or so. - -function builders.buildpage_filter(groupcode) - local head = texlists.contributehead +function builders.buildpage_filter(pagecontext) + local head, tail = getspeciallist("contributehead") if head then - local done = false - -- called quite often ... maybe time to remove timing - starttiming(builders) if trace_page_builder then - report(groupcode,head) + report(pagecontext,head) end - head, done = pageactions(head,groupcode) + starttiming(builders) + head = pageactions(head,pagecontext) -- todo: tail 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.contributehead = head or nil -- needs checking - -- tex.setlist("contributehead",head,head and nodes.tail(head)) - return done and head or true -- no return value needed + setspeciallist("contributehead", head) else - -- happens quite often if trace_page_builder then - report(groupcode) + report(pagecontext) end --- return nil, false -- no return value needed - return nil end end |