local qs = getfield(q, 'spec')
if not getfield(qs, 'writable') then return 0 end
if gs == 1 then -- stretching
- if getfield(qs, 'stretch_order') == go then
- return getfield(qs, 'stretch')
+ if getfield(qs, 'stretch_order') == go then
+ return getfield(qs, 'stretch')
+ else return 0
end
else -- shrinking
if getfield(qs, 'shrink_order') == go then
return getfield(qs, 'shrink')
+ else return 0
end
end
end
local function aw_step1(p, res, total)
local head = getlist(p)
local x = node_tail(head); if not x then return false end
+ -- x: \rightskip
x = node_prev(x); if not x then return false end
- -- 本当の行末の node を格納
if getid(x) == id_glue and getsubtype(x) == 15 then
-- 段落最終行のときは,\penalty10000 \parfillskip が入るので,
-- その前の node が本来の末尾文字となる
return false-- それ以外は対象外.
end
local xk = ltjf_font_metric_table[getfont(xc)]
- xk = xk.char_type[has_attr(xc, attr_jchar_class) or 0]
- xk = xk['end_' .. res.name] or 0
+ xk = xk.char_type[has_attr(xc, attr_jchar_class) or 0]
+ xk = xk['end_' .. res.name] or 0
if xk>0 and total>=xk then
total = total - xk