diff options
Diffstat (limited to 'macros/luatex/generic/luatexja/src/luatexja.lua')
-rw-r--r-- | macros/luatex/generic/luatexja/src/luatexja.lua | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/macros/luatex/generic/luatexja/src/luatexja.lua b/macros/luatex/generic/luatexja/src/luatexja.lua index 988f51955e..074d050276 100644 --- a/macros/luatex/generic/luatexja/src/luatexja.lua +++ b/macros/luatex/generic/luatexja/src/luatexja.lua @@ -347,6 +347,22 @@ do end end +do + local cache_ver = 1 -- must be same as ltj-kinsoku.tex + local cache_outdate_fn = function (t) return t.version~=cache_ver end + local t = ltjs.charprop_stack_table + function luatexja.load_kinsoku() + for i,_ in pairs(t) do t[i]=nil end + local kinsoku = ltjb.load_cache('ltj-kinsoku_default',cache_outdate_fn) + if kinsoku and kinsoku[1] then + t[0] = kinsoku[1] + else + t[0] = {}; tex.print(cat_lp, '\\input ltj-kinsoku.tex\\relax') + end + luatexja.load_kinsoku=nil + end +end + -- debug do @@ -372,8 +388,7 @@ local function debug_show_node_X(p,print_fn, limit, inner_depth) local k = prefix local s local pt, pic = node_type(p.id), (has_attr(p, attr_icflag) or 0) % icflag_table.PROCESSED_BEGIN_FLAG - local base = prefix .. string.format('%X', pic) - .. ' ' .. pt .. ' ' .. tostring(p.subtype) .. ' ' + local base = prefix .. string.format('%X', pic) .. ' ' .. pt .. ' ' .. tostring(p.subtype) .. ' ' if pt == 'glyph' then s = base .. ' ' .. (p.char<0xF0000 and utfchar(p.char) or '') @@ -505,6 +520,9 @@ local function debug_show_node_X(p,print_fn, limit, inner_depth) for i=1,#p.data do print_fn(s .. ' [' .. i .. '] = ' .. tostring(p.data[i].csname)) end + elseif p.subtype==16 then + s = s .. ' mode=' .. p.mode .. ', literal="' .. p.data .. '"' + print_fn(s) else print_fn(s) end |