--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2018/02/18',
+ date = '2018/08/11',
description = 'Insertion process of JFM glues, [x]kanjiskip and others',
})
luatexja.jfmglue = luatexja.jfmglue or {}
end
local function calc_np_pbox(lp, last)
- local first, lpa, nc = (not Np.first), KINSOKU, nil
+ local first, nc = (not Np.first), nil
+ --local lpa = get_attr_icflag(lp)==PACKED and PACKED or KINSOKU -- KINSOKU: dummy
+ local lpa = get_attr_icflag(lp)
Np.first = Np.first or lp; Np.id = id_pbox
set_attr(lp, attr_icflag, get_attr_icflag(lp));
while lp ~=last and (lpa>=PACKED) and (lpa<BOXBDD) do
local lpi = getid(lp)
- if lpi==id_hlist or lpi==id_vlist then
+ if lpa==PACKED then
+ if lpi==id_rule then lp = node_next(lp) end
+ nc, lp = lp, node_next(lp)
+ elseif lpi==id_hlist or lpi==id_vlist then
head, lp, nc = ltjd_make_dir_whatsit(head, lp, list_dir, 'jfm pbox')
Np.first = first and nc or Np.first
- elseif (lpi==id_rule) and (lpa==PACKED) then
- lp = node_next(lp)
- nc, lp = lp, node_next(lp)
else
nc, lp = lp, node_next(lp)
end
return node_copy(g[1]), g.ratio, false, false, false
else
local f = node_new(id_glue)
- set_attr(f, attr_icflag, g.priority)
+ set_attr(f, attr_icflag, g.priority)
setglue(f, g.width, g.stretch, g.shrink)
return f, g.ratio, g.kanjiskip_natural, g.kanjiskip_stretch, g.kanjiskip_shrink
end