From: Hironori Kitagawa Date: Wed, 3 Aug 2016 23:16:22 +0000 (+0900) Subject: ltj-adjust.lua: support the case when the allowed stretch (or shrink) amount in a... X-Git-Tag: 20160905.0~29 X-Git-Url: http://git.osdn.net/view?p=luatex-ja%2Fluatexja.git;a=commitdiff_plain;h=623156dfc392f3e85222acf67ef8ac68270e6ad8 ltj-adjust.lua: support the case when the allowed stretch (or shrink) amount in a line is zero. --- diff --git a/src/ltj-adjust.lua b/src/ltj-adjust.lua index 49a4334..afb7bab 100644 --- a/src/ltj-adjust.lua +++ b/src/ltj-adjust.lua @@ -101,8 +101,14 @@ local function get_total_stretched(p, line) end total_sh[a] = total_sh[a]+getfield(q, 'shrink') end - for i=4,0,-1 do if total_st[i*65536]~=0 then total_st.order=i; break end; end - for i=4,0,-1 do if total_sh[i*65536]~=0 then total_sh.order=i; break end; end + for i=4,1,-1 do if total_st[i*65536]~=0 then total_st.order=i; break end; end + if not total_st.order then + total_st.order, total_st[-65536] = -1,0.1 -- dummy + end + for i=4,1,-1 do if total_sh[i*65536]~=0 then total_sh.order=i; break end; end + if not total_sh.order then + total_sh.order, total_sh[-65536] = -1,0.1 -- dummy + end if gs==0 then return 0, gf else