summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/luatexja.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.lua22
1 files changed, 20 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
index 988f51955e4..074d0502768 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/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