diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-08-31 22:42:33 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-08-31 22:42:33 +0200 |
commit | 91db5eb6c95b185e3f1cc7aa0d04e1aeba1d4941 (patch) | |
tree | 5d4bb013051c1311118aac810d0d560fad54a648 /tex/context/base/mkiv/node-ltp.lua | |
parent | 0c426d0b6acb0d5595afd53f0fee52ee6ec6aa11 (diff) | |
download | context-91db5eb6c95b185e3f1cc7aa0d04e1aeba1d4941.tar.gz |
2020-08-31 22:04:00
Diffstat (limited to 'tex/context/base/mkiv/node-ltp.lua')
-rw-r--r-- | tex/context/base/mkiv/node-ltp.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/node-ltp.lua b/tex/context/base/mkiv/node-ltp.lua index 87a19de34..6a36adf68 100644 --- a/tex/context/base/mkiv/node-ltp.lua +++ b/tex/context/base/mkiv/node-ltp.lua @@ -346,6 +346,11 @@ local new_hlist = nodepool.hlist local getnormalizeline = nodes.getnormalizeline +local packing_exactly = "exactly" +local packing_additional = "additional" +local packing_expanded = CONTEXTLMTXMODE > 0 and "expanded" or "cal_expand_ratio" +local packing_substitute = CONTEXTLMTXMODE > 0 and "substiture" or "subst_ex_font" + -- helpers -- -- It makes more sense to move the somewhat messy dir state tracking @@ -1648,9 +1653,9 @@ do local finished_line = nil if adjust_spacing > 0 then statistics.nofadjustedlines = statistics.nofadjustedlines + 1 - finished_line = xpack_nodes(start,cur_width,"cal_expand_ratio",par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis) + finished_line = xpack_nodes(start,cur_width,packing_expanded,par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis) else - finished_line = xpack_nodes(start,cur_width,"exactly",par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis) + finished_line = xpack_nodes(start,cur_width,packing_exactly,par.par_break_dir,par.first_line,current_line) -- ,current_break.analysis) end if protrude_chars > 0 then statistics.nofprotrudedlines = statistics.nofprotrudedlines + 1 @@ -2958,7 +2963,7 @@ do setlist(hlist,head) end - local cal_expand_ratio = method == "cal_expand_ratio" or method == "subst_ex_font" + local cal_expand_ratio = method == packing_expanded or method == packing_substitute direction = direction or texget("textdir") @@ -3133,7 +3138,7 @@ do if pre_adjust_tail then pre_adjust_tail.next = nil -- todo end - if method == "additional" then + if method == packing_additional then width = width + natural end setwhd(hlist,width,height,depth) |