From 47852e5715e7c0374bb6bc173c1728908549e1ed Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 24 Jul 2019 13:08:53 +0200 Subject: 2019-07-24 11:24:00 --- tex/context/base/mkiv/typo-bld.lua | 52 +++++++++----------------------------- 1 file changed, 12 insertions(+), 40 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 d6a4fd9fd..6874d385a 100644 --- a/tex/context/base/mkiv/typo-bld.lua +++ b/tex/context/base/mkiv/typo-bld.lua @@ -36,6 +36,11 @@ local texsetattribute = tex.setattribute local texnest = tex.nest local texlists = tex.lists +local texget = tex.get +local texset = tex.set + +local texgetdimen = tex.getdimen + local nodes = nodes local nodeidstostring = nodes.idstostring local nodepool = nodes.pool @@ -148,11 +153,11 @@ function parbuilders.constructors.methods.oneline(head,followed_by_display) -- when needed we will turn this into a helper local t = texnest[texnest.ptr] local h = hpack_node(head) - local d = tex.baselineskip.width - t.prevdepth - h.height + local d = texget("baselineskip",false) - t.prevdepth - h.height t.prevdepth = h.depth t.prevgraf = 1 - if d < tex.lineskiplimit then - return insert_node_before(h,h,new_lineskip(tex.lineskip)) + if d < texget("lineskiplimit") then + return insert_node_before(h,h,new_lineskip(texget("lineskip",false))) -- no stretch etc else return insert_node_before(h,h,new_baselineskip(d)) end @@ -225,14 +230,12 @@ local pageactions = nodes.tasks.actions("mvlbuilders") local function report(groupcode,head) report_page_builder("trigger: %s",groupcode) - report_page_builder(" vsize : %p",tex.vsize) - report_page_builder(" pagegoal : %p",tex.pagegoal) - report_page_builder(" pagetotal: %p",tex.pagetotal) + 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 "") end --- use tex.[sg]etlist - -- check why box is called before after_linebreak .. maybe make categories and -- call 'm less @@ -252,7 +255,7 @@ function builders.buildpage_filter(groupcode) head, done = pageactions(head,groupcode) stoptiming(builders) -- -- doesn't work here (not passed on?) - -- tex.pagegoal = tex.vsize - tex.dimen.d_page_floats_inserted_top - tex.dimen.d_page_floats_inserted_bottom + -- 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 @@ -374,34 +377,3 @@ trackers.register("builders.hpack.overflow",function(v) show = v registercallback("hpack_quality",(report or show) and hpack_quality or nil,"check hpack quality") end) - --- local ignoredepth = - 65536000 --- --- registercallback( --- "append_to_vlist_filter", --- function(box,location,prevdepth,mirrored), --- if prevdepth > ignoredepth then --- local b = tex.baselineskip --- local d = b.width - prevdepth --- local g = nil --- if mirrored then --- d = d - box.depth --- else --- d = d - box.height --- end --- if d < tex.lineskiplimit then --- g = nodes.pool.glue() --- g.spec = tex.lineskip --- else --- g = nodes.pool.baselineskip(d) --- end --- g.next = box --- box.prev = g --- return g, mirrored and box.height or box.depth --- else --- return box, mirrored and box.height or box.depth --- end --- end, --- "experimental prevdepth checking" --- ) - -- cgit v1.2.3