From 7ecbcaaf68d152851591dbb5931a6eb15d155019 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 25 Nov 2019 23:15:50 +0100 Subject: 2019-11-25 17:37:00 --- tex/context/base/mkiv/node-ltp.lua | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'tex/context/base/mkiv/node-ltp.lua') diff --git a/tex/context/base/mkiv/node-ltp.lua b/tex/context/base/mkiv/node-ltp.lua index 0b2790cc7..3e4fea0b1 100644 --- a/tex/context/base/mkiv/node-ltp.lua +++ b/tex/context/base/mkiv/node-ltp.lua @@ -286,8 +286,6 @@ local protrusionboundary_code = boundarycodes.protrusion local leaders_code = leadercodes.leaders -local localpar_code = nodecodes.localpar - local userkern_code = kerncodes.userkern local italickern_code = kerncodes.italiccorrection local fontkern_code = kerncodes.fontkern @@ -2845,8 +2843,6 @@ do local adjust_tail = adjust_head and find_tail(adjust_head) local pre_adjust_tail = pre_adjust_head and find_tail(pre_adjust_head) - new_dir_stack(hpack_dir) - local checked_expansion = false if cal_expand_ratio then @@ -2983,7 +2979,7 @@ do end adjust_tail = find_tail(list) elseif id == dir_code then - hpack_dir = checked_line_dir(stack,current) or hpack_dir + -- no need to deal with directions here (as we only support two) elseif id == marginkern_code then local width = getwidth(current) if cal_expand_ratio then @@ -3018,9 +3014,7 @@ do local delta = width - natural if delta == 0 then - setfield(hlist,"glue_sign",0) - setfield(hlist,"glue_order",0) - setfield(hlist,"glue_set",0) + setglue(hlist,0,0,0) -- set order sign elseif delta > 0 then -- natural width smaller than requested width local order = (total_stretch[4] ~= 0 and 4 or total_stretch[3] ~= 0 and 3) or @@ -3057,13 +3051,9 @@ do end local tso = total_stretch[order] if tso ~= 0 then - setfield(hlist,"glue_sign",1) - setfield(hlist,"glue_order",order) - setfield(hlist,"glue_set",delta/tso) + setglue(hlist,delta/tso,order,1) -- set order sign else - setfield(hlist,"glue_sign",0) - setfield(hlist,"glue_order",order) - setfield(hlist,"glue_set",0) + setglue(hlist,0,order,0) -- set order sign end if font_expand_ratio ~= 0 then -- todo @@ -3113,13 +3103,9 @@ do end local tso = total_shrink[order] if tso ~= 0 then - setfield(hlist,"glue_sign",2) - setfield(hlist,"glue_order",order) - setfield(hlist,"glue_set",-delta/tso) + setglue(hlist,-delta/tso,order,2) -- set order sign else - setfield(hlist,"glue_sign",0) - setfield(hlist,"glue_order",order) - setfield(hlist,"glue_set",0) + setglue(hlist,0,order,0) -- set order sign end if font_expand_ratio ~= 0 then -- todo -- cgit v1.2.3