require('lualibs')
+tableunpack = table.unpack
------------------------------------------------------------------------
-- naming:
end
end
+-- check token library
+if newtoken then
+ luatexja.token = newtoken
+else
+ local luatex_version = status.list().luatex_version
+ if luatex_version >80 then
+ luatexja.token = token
+ end
+end
+
--- 以下は全ファイルで共有される定数
local icflag_table = {}
luatexja.icflag_table = icflag_table
local nullfunc = function (n) return n end
local to_node = (Dnode ~= node) and Dnode.tonode or nullfunc
local to_direct = (Dnode ~= node) and Dnode.todirect or nullfunc
- local tex_set_attr = tex.setattribute
+ local ensure_tex_attr = ltjb.ensure_tex_attr
+
-- mode = true iff main_process is called from pre_linebreak_filter
local function main_process(head, mode, dir, gc)
- tex_set_attr('global', attr_icflag, 0)
+ ensure_tex_attr(attr_icflag, 0)
if gc == 'fin_row' then return head
else
--luatexja.ext_show_node_list(head, 'T> ', print)
local function adjust_icflag(h)
-- kern from luaotfload will have icflag = 1
-- (same as italic correction)
- tex_set_attr('global', attr_icflag, 1)
+ ensure_tex_attr(attr_icflag, 1)
return h
end
end
+-- cleanup process
+function luatexja.ext_cleanup()
+ ltjf.cleanup_size_cache()
+ ltjd.remove_end_whatsit()
+end
+
+
-- debug
do