--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2014/1/21',
+ date = '2014/02/01',
description = 'Insertion process of JFM glues and kanjiskip',
})
module('luatexja.jfmglue', package.seeall)
local ltjf_find_char_class = ltjf.find_char_class
local node_new = Dnode.new
local node_copy = Dnode.copy
-local node_remove = Dnode.remove
+local node_remove = luatexja.Dnode_remove -- Dnode.remove
local node_tail = Dnode.tail
local node_free = Dnode.free
local node_end_of_math = Dnode.end_of_math
pid = getid(p) -- p must be non-nil
end
if pid==id_kern then
- if get_attr_icflag(p)==IC_PROCESSED then
+ local pa = get_attr_icflag(p)
+ --if pa==IC_PROCESSED or pa == PACKED then
+ if pa==IC_PROCESSED then
-- do nothing
elseif getsubtype(p)==2 then
p = node_next(node_next(p));
first_char = p; find_first_char = false
end
last_char = p; found_visible_node = true
+ --elseif pid==id_rule and get_attr_icflag(p)==PACKED then -- do nothing
elseif not (pid==id_ins or pid==id_mark
or pid==id_adjust or pid==id_whatsit
or pid==id_penalty) then
do
local KANJI_SKIP = luatexja.icflag_table.KANJI_SKIP
local XKANJI_SKIP = luatexja.icflag_table.XKANJI_SKIP
+ local KSK = luatexja.stack_table_index.KSK
+ local XSK = luatexja.stack_table_index.XSK
init_var = function (mode)
-- 1073741823: max_dimen
Bp, widow_Bp, widow_Np = {}, {}, {first = nil}
table_current_stack = ltjs.table_current_stack
kanji_skip = node_new(id_glue)
- setfield(kanji_skip, 'spec', skip_table_to_spec('kanjiskip'))
+ setfield(kanji_skip, 'spec', skip_table_to_spec(KSK))
set_attr(kanji_skip, attr_icflag, KANJI_SKIP)
get_kanjiskip = (getfield(getfield(kanji_skip, 'spec'), 'width') == 1073741823)
and get_kanjiskip_jfm or get_kanjiskip_normal
xkanji_skip = node_new(id_glue)
- setfield(xkanji_skip, 'spec', skip_table_to_spec('xkanjiskip'))
+ setfield(xkanji_skip, 'spec', skip_table_to_spec(XSK))
set_attr(xkanji_skip, attr_icflag, XKANJI_SKIP)
get_xkanjiskip = (getfield(getfield(xkanji_skip, 'spec'), 'width') == 1073741823)
and get_xkanjiskip_jfm or get_xkanjiskip_normal