summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-09-06 23:21:08 +0000
committerKarl Berry <karl@freefriends.org>2015-09-06 23:21:08 +0000
commit63418fbbd680a1772e0c63b5043ae52de45e6e47 (patch)
treeed8310b4c6c06617ff889f6d1ca6312e4c967337 /Master/texmf-dist/tex/luatex
parent1d472d214213c24b5cd6fc136a8834c121ebf922 (diff)
luatexja (6sep15)
git-svn-id: svn://tug.org/texlive/trunk@38309 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ajmacros.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty10
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty22
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty10
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty12
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-zhfonts.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/lltjext.sty3
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua11
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua135
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua9
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua30
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty5
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty80
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty93
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty20
30 files changed, 272 insertions, 224 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
index b25e7060d39..1ba9cda333f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
@@ -64,7 +64,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-adjust}[2013/05/14]
+ \ProvidesPackage{luatexja-adjust}[2014/05/13]
\fi %</LaTeX>
% Load core module if not yet.
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ajmacros.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ajmacros.sty
index 89e0953cecb..016fda3055b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ajmacros.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ajmacros.sty
@@ -68,7 +68,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-ajmacros}[2013/05/14]
+ \ProvidesPackage{luatexja-ajmacros}[2014/07/02]
\fi %</LaTeX>
%%------------------
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
index 14f3e3b6172..3a4b3caf6ac 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-24.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec-24}[2015/01/15 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec-24}[2015/06/28 fontspec support of LuaTeX-ja]
\RequirePackage{l3keys2e,luatexja}
\ExplSyntaxOn
@@ -45,14 +45,6 @@
\cs_generate_variant:Nn \prg_new_conditional:Nnn {Nnx}
-%%%%%%%% \g_ltj_fontspec_scale_fp
-%% Default scale value for jfont.
-\fp_new:N \g_ltj_fontspec_scale_fp
-\group_begin:
-\fontsize{10}{10}\selectfont
-\fp_gset:Nn \g_ltj_fontspec_scale_fp {\zw / 10}
-\group_end:
-
%%%%%%%% Internal control sequences
%% Each CS is ltj_fontspec version that corresponds to original CS of fontspec.
\cs_new:Nn \ltj_fontspec_define_option:nn {
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
index 695ff385c66..d0b3c1306c1 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
@@ -3,25 +3,35 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec}[2015/01/15 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec}[2015/08/26 fontspec support of LuaTeX-ja]
\RequirePackage{l3keys2e,luatexja}
\ExplSyntaxOn
+%%%%%%%% \g_ltj_fontspec_scale_fp
+%% Default scale value for jfont.
+\fp_new:N \g_ltj_fontspec_scale_fp
+\group_begin:
+\fontsize{10}{10}\selectfont
+\fp_gset:Nn \g_ltj_fontspec_scale_fp {\zw / 10}
+\group_end:
+
\bool_new:N \ltj_fontspec_match
-\cs_set:Nn \ltj_fontspec_pass_opts: {}
\keys_define:nn { luatexja-fontspec }
{
match .bool_set:N = \ltj_fontspec_match_bool,
match .default:n = true,
- pass .code:n = \cs_set:Nn \ltj_fontspec_pass_opts: {#1},% 互換性
+ pass .code:n = \PassOptionsToPackage{#1} {fontspec},
+ % 互換性のために残したオプション
+ scale .fp_gset:N = \g_ltj_fontspec_scale_fp,
+ unknown .code:n = \PassOptionsToPackage { \l_keys_key_tl } {fontspec},
}
-\ProcessKeysOptions { luatexja-fontspec }
-\RequirePackage[\ltj_fontspec_pass_opts:]{fontspec}[2014/06/01]% v2.4
+\ProcessKeysOptions{ luatexja-fontspec }
+\RequirePackage{fontspec}[2014/06/01]% v2.4
\RequirePackage{luatexja-fontspec-24}
\ExplSyntaxOff
%%%%%%%% Now we completely ignore kanjifont definition file.
-\@ltj@use@fdfalse
+\def\@ltj@use@fd{false}
% We must redefine \try@load@fontshape to ignore kanjifont definitions at all.
\def\try@load@fontshape{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
index c23fb3fb4cb..9a8ee54c350 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
@@ -1,5 +1,5 @@
% luatexja-preset.sty
-\ProvidesPackage{luatexja-preset}[2015/04/05 Japanese font presets]
+\ProvidesPackage{luatexja-preset}[2015/06/28 Japanese font presets]
\RequirePackage{expl3}
\RequirePackage{luatexja}
@@ -26,6 +26,7 @@
\DeclareOption{deluxe}{\int_set:Nn \l_ltjpreset_deluxe_int { 2 }} % 6 fonts
\DeclareOption{nodeluxe}{\int_set:Nn \l_ltjpreset_deluxe_int { 0 }} % 2 fonts
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{luatexja-fontspec}}
% JFM
\cs_set:Npn \ltjpreset_use_jfm: {ujis} % 使用する JFM
%%% \DeclareOption{min}{\cs_set:Npn \ltjpreset_use_jfm: {min}} % min
@@ -205,13 +206,6 @@
\ExecuteOptions{ipaex}
-% match
-\DeclareOption{match} {
- \bool_if:NF \ltj_fontspec_match_bool {
- \ltj_fontspec_match_cmd
- \bool_set_true:N \ltj_fontspec_match_bool
- }
-}
\ProcessOptions*
%%%%%%%% main routine
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
index 1f73ea1b733..b40ec97800b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
@@ -4,7 +4,7 @@
% LaTeX only!
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-ruby}[2014/03/28 v0.21]
+\ProvidesPackage{luatexja-ruby}[2015/05/09 v0.22]
\RequirePackage{luatexja}
%%------------------
@@ -18,12 +18,12 @@
%% 引数:ルビ全角を単位とした実数
%% この文字への pre-, post-intrusion の許容量
\define@key[ltj]{japaram}{rubypreintrusion}{%
- \expandafter\ltj@@set@stack@real#1:{RIPRE}{0}{0x7FFFFFFF}}
+ \ltj@@set@stack@real{RIPRE}{0}{0x7FFFFFFF}#1 }
\define@key[ltj]{japaram}{rubypostintrusion}{%
- \expandafter\ltj@@set@stack@real#1:{RIPOST}{0}{0x7FFFFFFF}}
-\def\ltj@@set@stack@real#1,#2:#3#4#5{%
- \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.#3,
- \ltj@safe@num@or\ltj@defnum{#1},\ltj@safe@real{#2},#4,#5)}}
+ \ltj@@set@stack@real{RIPOST}{0}{0x7FFFFFFF}#1 }
+\def\ltj@@set@stack@real#1#2#3{%
+ \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.#1,
+ #2, #3, luatexja.token.scan_word)}}
% ルビ用のキー設定
\def\ltj@@rkeydef#1{
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-zhfonts.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-zhfonts.sty
index fd5f7741cda..8e215d3f6eb 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-zhfonts.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-zhfonts.sty
@@ -1,6 +1,6 @@
% luatexja-zhfonts.sty
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-zhfonts}[2013/05/20 Setting for Chinese fonts]
+\ProvidesPackage{luatexja-zhfonts}[2013/09/10 Setting for Chinese fonts]
\RequirePackage{luatexja-fontspec}
% SinoType 华文字体
diff --git a/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty b/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
index 5cf1849b92b..572863c70ff 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
@@ -3,8 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}
- [2014/09/06 v1.2-ltj-3 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2014/10/15 v1.2-ltj-3 Macros for vertical writing]
\RequirePackage{luatexja}
\let\ltj@lltjext@orig@tabular=\tabular
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
index b8b7855476f..1c7e3b7df1d 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
@@ -13,7 +13,7 @@
\ifltj@in@latex %<*LaTeX>
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{ltj-base}[2013/05/14]
+ \ProvidesPackage{ltj-base}[2014/07/18]
\fi %</LaTeX>
%%------------------ Tiny helpers
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
index c05d0ed6c35..b334ed46426 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
@@ -761,6 +761,8 @@ do
luatexja.direction.get_box_dim = get_box_dim
-- return value: (changed dimen of box itself?)
+ local scan_dimen, scan_int = luatexja.token.scan_dimen, luatexja.token.scan_int
+ local scan_keyword = luatexja.token.scan_keyword
local function set_box_dim_common(key, s, l_dir)
local s_dir, wh = get_box_dir(s, dir_yoko)
s_dir = s_dir%dir_math_mod
@@ -781,10 +783,10 @@ do
setfield(db, 'next', dnh)
setfield(wh, 'value',to_node(db))
end
- setfield(db, key, tex.getdimen('ltj@tempdima'))
+ setfield(db, key, scan_dimen())
return false
else
- setfield(s, key, tex.getdimen('ltj@tempdima'))
+ setfield(s, key, scan_dimen())
if wh then
-- change dimension of dir_nodes which are created "automatically"
local bw, bh, bd
@@ -803,8 +805,7 @@ do
end
end
local function set_box_dim(key)
- local n = tex_getcount('ltj@tempcnta')
- local s = getbox(n)
+ local s = getbox(scan_int()); scan_keyword('=')
if s then
local l_dir = (get_dir_count())%dir_math_mod
s = to_direct(s)
@@ -813,7 +814,7 @@ do
set_box_dim_common(key, s, l_dir)
elseif b_dir%dir_math_mod == l_dir then
-- s is dir_node
- setfield(s, key, tex.getdimen('ltj@tempdima'))
+ setfield(s, key, scan_dimen())
if b_dir<dir_node_manual then
set_attr(s, attr_dir, b_dir%dir_node_auto + dir_node_manual)
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
index cda9d1d33e0..62b0e329c3a 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
@@ -50,7 +50,7 @@ luatexbase.create_callback("luatexja.load_jfm", "data", function (ft, jn) return
local jfm_file_name, jfm_var
local defjfm_res
-local jfm_dir, is_def_jfont
+local jfm_dir, is_def_jfont, is_vert_enabled
function define_jfm(t)
local real_char -- Does current character class have the 'real' character?
@@ -280,6 +280,7 @@ do
chars = sz.chars, char_type = sz.char_type,
kanjiskip = sz.kanjiskip, xkanjiskip = sz.xkanjiskip,
chars_cbcache = {},
+ vert_activated = is_vert_enabled,
}
fmtable = luatexbase.call_callback("luatexja.define_jfont", fmtable, fn)
@@ -350,9 +351,12 @@ do
end
end
if jfm_dir == 'tate' then
+ is_vert_enabled = (not name:match('-vert')) and (not name:match('-vrt2'))
if not name:match('vert') and not name:match('vrt2') then
name = name .. ';vert;vrt2'
end
+ else
+ is_vert_enabled = nil
end
return name
end
@@ -377,7 +381,8 @@ end
------------------------------------------------------------------------
do
-- these function are called from ltj-latex.sty
- local kyenc_list, ktenc_list = {}, {}
+ local fenc_list, kyenc_list, ktenc_list = {}, {}, {}
+ function add_fenc_list(enc) fenc_list[enc] = 'true ' end
function add_kyenc_list(enc) kyenc_list[enc] = 'true ' end
function add_ktenc_list(enc) ktenc_list[enc] = 'true ' end
function is_kyenc(enc)
@@ -392,36 +397,57 @@ do
end
local kfam_list, Nkfam_list = {}, {}
- function add_kfam_list(enc, fam)
- if not kfam_list[enc] then kfam_list[enc] = {} end
- kfam_list[enc][fam] = 'true '
- end
- function add_Nkfam_list(enc, fam)
- if not Nkfam_list[enc] then Nkfam_list[enc] = {} end
- Nkfam_list[enc][fam] = 'true '
+ function add_kfam(fam)
+ kfam_list[fam]=true
+ end
+ function search_kfam(fam, use_fd)
+ if kfam_list[fam] then
+ tex.sprint(cat_lp, '\\let\\ifin@\\iftrue '); return
+ elseif Nkfam_list[fam] then
+ tex.sprint(cat_lp, '\\let\\ifin@\\iffalse '); return
+ elseif use_fd then
+ for i,_ in pairs(kyenc_list) do
+ if kpse.find_file(string.lower(i)..fam..'.fd') then
+ tex.sprint(cat_lp, '\\let\\ifin@\\iftrue '); return
+ end
+ end
+ for i,_ in pairs(ktenc_list) do
+ if kpse.find_file(string.lower(i)..fam..'.fd') then
+ tex.sprint(cat_lp, '\\let\\ifin@\\iftrue '); return
+ end
+ end
+ Nkfam_list[fam]=true; tex.sprint(cat_lp, '\\let\\ifin@\\iffalse '); return
+ else
+ tex.sprint(cat_lp, '\\let\\ifin@\\iffalse '); return
+ end
end
- function is_kfam(enc, fam)
- tex.sprint(cat_lp, '\\let\\ifin@\\if'
- .. (kfam_list[enc] and kfam_list[enc][fam] or 'false ')) end
- function is_Nkfam(enc, fam)
- tex.sprint(cat_lp, '\\let\\ifin@\\if'
- .. (Nkfam_list[enc] and Nkfam_list[enc][fam] or 'false ')) end
-
local ffam_list, Nffam_list = {}, {}
- function add_ffam_list(enc, fam)
- if not ffam_list[enc] then ffam_list[enc] = {} end
- ffam_list[enc][fam] = 'true '
- end
- function add_Nffam_list(enc, fam)
- if not Nffam_list[enc] then Nffam_list[enc] = {} end
- Nffam_list[enc][fam] = 'true '
+ function is_ffam(fam)
+ tex.sprint(cat_lp, '\\let\\ifin@\\if' .. (ffam_list[fam] or 'false '))
+ end
+ function add_ffam(fam)
+ ffam_list[fam]='true '
+ end
+ function search_ffam_declared()
+ local s = ''
+ for i,_ in pairs(fenc_list) do
+ s = s .. '\\cdp@elt{' .. i .. '}'
+ end
+ tex.sprint(cat_lp, s)
+ end
+ function search_ffam_fd(fam)
+ if Nffam_list[fam] then
+ tex.sprint(cat_lp, '\\let\\ifin@\\iffalse '); return
+ else
+ for i,_ in pairs(fenc_list) do
+ if kpse.find_file(string.lower(i)..fam..'.fd') then
+ tex.sprint(cat_lp, '\\let\\ifin@\\iftrue '); return
+ end
+ end
+ Nffam_list[fam]=true; tex.sprint(cat_lp, '\\let\\ifin@\\iffalse '); return
+ end
end
- function is_ffam(enc, fam)
- tex.sprint(cat_lp, '\\let\\ifin@\\if'
- .. (ffam_list[enc] and ffam_list[enc][fam] or 'false ')) end
- function is_Nffam(enc, fam)
- tex.sprint(cat_lp, '\\let\\ifin@\\if'
- .. (Nffam_list[enc] and Nffam_list[enc][fam] or 'false ')) end
+
end
------------------------------------------------------------------------
-- ALTERNATE FONTS
@@ -651,8 +677,9 @@ do
end
local sort = table.sort
- local function add_fl_table(dest, tg, unitable, glyphmax, asc_des, units)
- for i = 0, glyphmax-1 do
+ local function add_fl_table(dest, glyphs, unitable, asc_des, units)
+ local tg, glyphmin, glyphmax = glyphs.glyphs, glyphs.glyphmin or 0, glyphs.glyphmax
+ for i = glyphmin, glyphmax-1 do
local gv = tg[i]
if gv then
if gv.altuni then
@@ -711,12 +738,12 @@ do
local fl = fontloader.open(id.filename)
local unicodes = id.resources.unicodes
if fl.glyphs then
- dest = add_fl_table(dest, fl.glyphs, id.resources.unicodes, fl.glyphmax,
+ dest = add_fl_table(dest, fl, unicodes,
fl.ascent + fl.descent, fl.units_per_em)
end
if fl.subfonts then
for _,v in pairs(fl.subfonts) do
- dest = add_fl_table(dest, v.glyphs, id.resources.unicodes, v.glyphmax,
+ dest = add_fl_table(dest, v, unicodes,
fl.ascent + fl.descent, fl.units_per_em)
end
end
@@ -862,6 +889,34 @@ luatexbase.add_to_callback(
end, 1, 'ltj.v_advance'
)
end
+
+------------------------------------------------------------------------
+-- supply tounicode entries
+------------------------------------------------------------------------
+do
+ local ltjr_prepare_cid_font = ltjr.prepare_cid_font
+ luatexbase.add_to_callback(
+ 'luaotfload.patch_font',
+ function (tfmdata)
+ if tfmdata.cidinfo then
+ local rd = ltjr_prepare_cid_font(tfmdata.cidinfo.registry, tfmdata.cidinfo.ordering)
+ if rd then
+ local ru, rc = rd.resources.unicodes, rd.characters
+ for i,v in pairs(tfmdata.characters) do
+ local w = ru["Japan1." .. tostring(v.index)]
+ if w then
+ v.tounicode = v.tounicode or rc[w]. tounicode
+ end
+ end
+ end
+ end
+
+ return tfmdata
+ end,
+ 'ltj.supply_tounicode', 1)
+end
+
+
------------------------------------------------------------------------
-- MISC
------------------------------------------------------------------------
@@ -901,3 +956,17 @@ do
node_free(TEMP)
end
end
+
+------------------------------------------------------------------------
+-- VERT VARIANT TABLE
+------------------------------------------------------------------------
+vert_form_table = {
+ [0x2013]=0xFE32, [0x2014]=0xFE31, [0x2025]=0xFE30,
+ [0xFF08]=0xFE35, [0xFF09]=0xFE36, [0xFF5B]=0xFE37, [0xFF5D]=0xFE38,
+ [0x3014]=0xFE39, [0x3015]=0xFE3A, [0x3010]=0xFE3B, [0x3011]=0xFE3C,
+ [0x300A]=0xFE3D, [0x300B]=0xFE3E, [0x3008]=0xFE3F, [0x3009]=0xFE40,
+ [0x300C]=0xFE41, [0x300D]=0xFE42, [0x300E]=0xFE43, [0x300F]=0xFE44,
+ [0xFF3B]=0xFE47, [0xFF3D]=0xFE48, [0xFF3F]=0xFE33,
+}
+setmetatable(vert_form_table, {__index=function(t,k) return k end});
+
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
index 9fc3f307441..6b9c643ef7f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
@@ -12,7 +12,7 @@
\def\luatexjalatexLoaded{\endinput}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ltj-latex}[2015/02/22 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2015/03/17 LaTeX support of LuaTeX-ja]
% cleanup at end of the document
%\let\ltj@@orig@end=\@@end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
index 62cfcf7b19d..ad2c4ad6563 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
@@ -14,7 +14,7 @@
\ifltj@in@latex %<*LaTeX>
\NeedsTeXFormat{LaTeX2e}
\PackageWarning{ltj-plain}{Don't load this package directly; load luatexja.sty instead.}
- \ProvidesPackage{ltj-plain}[2015/02/22]
+ \ProvidesPackage{ltj-plain}[2015/08/29]
\fi %</LaTeX>
%%------------------
@@ -86,7 +86,7 @@
"1100-"11FF, "2F00-"2FFF, "3100-"31EF, "A000-"A4CF, "A830-"A83F,
"AC00-"D7FF}
\ltjdefcharrange{8}{"B4, "A8, "B1, "D7, "F7, "B0, "A7, "B6}
-\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, +8}}
+\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8}}
\directlua{for x=128,255 do luatexja.math.is_math_letters[x] = true end}
\let\ltj@@orig@end=\@@end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua
index c21de3ffdc5..42507758e02 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua
@@ -124,6 +124,8 @@ end
-- mode: true iff this function is called from hpack_filter
local ltjs_report_stack_level = ltjs.report_stack_level
+local ltjf_vert_form_table = ltjf.vert_form_table
+local ltjf_font_metric_table = ltjf.font_metric_table
local function set_box_stack_level(head, mode)
local box_set, cl = 0, tex.currentgrouplevel + 1
for _,p in pairs(wt) do
@@ -138,7 +140,12 @@ local function set_box_stack_level(head, mode)
if (has_attr(p, attr_icflag) or 0)<=0 and getfield(p, 'lang')==lang_ja then
local pfn = has_attr(p, attr_curtfnt) or getfont(p)
local pc = ltjs_orig_char_table[p]
- setfield(p, 'font', ltjf_replace_altfont(pfn, pc))
+ local nf = ltjf_replace_altfont(pfn, pc)
+ setfield(p, 'font', nf)
+ if ltjf_font_metric_table[nf].vert_activated then
+ pc = ltjf_vert_form_table [getchar(p)]
+ if font.getfont(nf).characters[pc] then setfield(p, 'char', pc) end
+ end
end
end
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
index 2430ef3f7c1..a4a06c77750 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
@@ -230,10 +230,18 @@ local function read_cid_font()
if not v.width then v.width = 655360 end
v.height, v.depth = 576716.8, 78643.2 -- optimized for jfm-ujis.lua
end
+ return cidfont_data[cid_name]
+ else
+ return nil
end
end
-- High-level
+local function prepare_cid_font(reg, ord)
+ cid_reg, cid_order, cid_name, cid_supp = reg, ord, reg .. '-' .. ord
+ return cidfont_data[cid_name] or read_cid_font()
+end
+
local definers = fonts.definers
local function mk_rml(name, size, id)
@@ -345,17 +353,13 @@ local function font_callback(name, size, id, fallback)
if not cid_reg then
cid_reg, cid_order = string.match(s, "^(.-)%-(.-)$")
end
- cid_name = cid_reg .. '-' .. cid_order
- if not cidfont_data[cid_name] then
- read_cid_font()
- if not cidfont_data[cid_name] then
- ltjb.package_error('luatexja',
- "bad cid key `" .. s .. "'",
- "I couldn't find any non-embedded font information for the CID\n" ..
- '`' .. s .. "'. For now, I'll use `Adobe-Japan1-6'.\n"..
- 'Please contact the LuaTeX-ja project team.')
- cid_name = "Adobe-Japan1"
- end
+ if not prepare_cid_font(cid_reg, cid_order) then
+ ltjb.package_error('luatexja',
+ "bad cid key `" .. s .. "'",
+ "I couldn't find any non-embedded font information for the CID\n" ..
+ '`' .. s .. "'. For now, I'll use `Adobe-Japan1-6'.\n"..
+ 'Please contact the LuaTeX-ja project team.')
+ cid_name = "Adobe-Japan1"
end
return mk_rml(basename, size, id)
else
@@ -368,10 +372,10 @@ local function font_callback(name, size, id, fallback)
end
luatexja.rmlgbm = {
+ prepare_cid_font = prepare_cid_font,
cidfont_data = cidfont_data,
font_callback = font_callback,
vert_addfunc = function () end, -- dummy, set in ltj-direction.lua
}
-cid_reg, cid_order, cid_name, cid_supp = 'Adobe', 'Japan1', 'Adobe-Japan1'
-read_cid_font()
+prepare_cid_font('Adobe', 'Japan1')
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua
index ef7a36926ee..72e8b8222f5 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua
@@ -20,6 +20,7 @@ local sid_user = node.subtype('user_defined')
local STCK = luatexja.userid_table.STCK
local fastcopy = table.fastcopy
local setcount = tex.setcount
+local scan_int, scan_keyword = luatexja.token.scan_int, luatexja.token.scan_keyword
hmode = 0 -- dummy
charprop_stack_table={};
@@ -62,8 +63,11 @@ end
local set_stack_table = set_stack_table
-- EXT
-function set_stack_perchar(m,c,p,lb,ub)
- if type(p)~='number' or p<lb or p>ub then
+function set_stack_perchar(m,lb,ub, getter)
+ local c = scan_int()
+ scan_keyword(',')
+ local p = tonumber((getter or scan_int)())
+ if p<lb or p>ub then
ltjb.package_error('luatexja',
"invalid code (".. tostring(p) .. ")",
"The code should in the range "..tostring(lb) .. '..' ..
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
index d24a48dabb9..e962e19c561 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjsarticle}
- [2015/01/07 ]
+ [2015/05/26 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -1137,9 +1137,9 @@
\advance\leftskip .0628\linewidth
\advance\rightskip .0628\linewidth
\vskip\abovecaptionskip
- \sbox\@tempboxa{#1\hskip1\zw\relax #2}%
+ \sbox\@tempboxa{#1{\hskip1\zw}#2}%
\ifdim \wd\@tempboxa <\hsize \centering \fi
- #1\hskip1\zw\relax #2\par
+ #1{\hskip1\zw}#2\par
\vskip\belowcaptionskip}}
\DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
\DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
index 861d97debf3..31c40552de3 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjsbook}
- [2015/01/07 ]
+ [2015/05/26 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -1200,9 +1200,9 @@
\advance\leftskip .0628\linewidth
\advance\rightskip .0628\linewidth
\vskip\abovecaptionskip
- \sbox\@tempboxa{#1\hskip1\zw\relax #2}%
+ \sbox\@tempboxa{#1{\hskip1\zw}#2}%
\ifdim \wd\@tempboxa <\hsize \centering \fi
- #1\hskip1\zw\relax #2\par
+ #1{\hskip1\zw}#2\par
\vskip\belowcaptionskip}}
\DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
\DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
index 5d5d3f6bf92..e8bfdf3484b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjskiyou}
- [2015/01/07 ]
+ [2015/05/26 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
@@ -1121,9 +1121,9 @@
\advance\leftskip .0628\linewidth
\advance\rightskip .0628\linewidth
\vskip\abovecaptionskip
- \sbox\@tempboxa{#1\hskip1\zw\relax #2}%
+ \sbox\@tempboxa{#1{\hskip1\zw}#2}%
\ifdim \wd\@tempboxa <\hsize \centering \fi
- #1\hskip1\zw\relax #2\par
+ #1{\hskip1\zw}#2\par
\vskip\belowcaptionskip}}
\DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
\DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
index 6bc3923f211..a640f22b67d 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
@@ -38,7 +38,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjspf}
- [2015/01/07 ]
+ [2015/05/26 ]
\RequirePackage{luatexja}
\newif\if@restonecol
\newif\if@titlepage
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty
index 687d395fb4a..3bba582fc4b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-compat}[2015/02/22 Compatibility with pTeX]
+ \ProvidesPackage{luatexja-compat}[2015/05/09 Compatibility with pTeX]
\fi %</LaTeX>
% Load core module if not yet.
@@ -107,8 +107,7 @@
\directlua{luatexja.compat.to_kansuji(luatexja.token.scan_int())}%
}
-\define@key[ltj]{japaram}{kansujichar}{%
- \expandafter\ltj@@set@stack#1:{KSJ}{0}{0x7FFFFFFF}}
+\define@key[ltj]{japaram}{kansujichar}{\ltj@@set@stack{KSJ}{0}{0x7FFFFFFF}#1 }
\ltjsetparameter{kansujichar={0,`〇}}
\ltjsetparameter{kansujichar={1,`一}}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index dd20eeead9f..69c409836df 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2015/05/03 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2015/05/17 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -263,15 +263,14 @@
\setbox\z@\box\voidb@x
% prebreakpenalty = {<char_code>, <penalty>}
-\define@key[ltj]{japaram}{kcatcode}{%
- \expandafter\ltj@@set@stack#1:{KCAT}{0}{0x7FFFFFFF}}
-\define@key[ltj]{japaram}{prebreakpenalty}{%
- \expandafter\ltj@@set@stack#1:{PRE}{-10000}{10000}}
-\define@key[ltj]{japaram}{postbreakpenalty}{%
- \expandafter\ltj@@set@stack#1:{POST}{-10000}{10000}}
-\def\ltj@@set@stack#1,#2:#3#4#5{%
- \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.#3,
- \ltj@safe@num@or{nil}{#1},\ltj@safe@num@or{nil}{#2},#4,#5)}}
+\define@key[ltj]{japaram}{kcatcode}{\ltj@@set@stack{KCAT}{0}{0x7FFFFFFF}#1\relax}
+\define@key[ltj]{japaram}{prebreakpenalty}{\ltj@@set@stack{PRE}{-10000}{10000}#1\relax}
+\define@key[ltj]{japaram}{postbreakpenalty}{\ltj@@set@stack{POST}{-10000}{10000}#1\relax}
+\def\ltj@@set@stack#1#2#3{%
+ \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.#1,#2,#3)}}
+%\def\ltj@@set@stack#1,#2:#3#4#5{%
+% \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.#3,
+% \ltj@safe@num@or{nil}{#1},\ltj@safe@num@or{nil}{#2},#4,#5)}}
% jatextfont = {<char_code>, <font_cs>}
% only horizontal font is supported
@@ -300,16 +299,16 @@
% yjabaselineshift = <dimen>
\define@key[ltj]{japaram}{yalbaselineshift}{%
\directlua{tex.setattribute(luatexja.isglobal,
- luatexbase.attributes['ltj@yablshift'], luatexja.token.scan_dimen())}#1}
+ luatexbase.attributes['ltj@yablshift'], luatexja.token.scan_dimen())}#1\relax}
\define@key[ltj]{japaram}{yjabaselineshift}{%
\directlua{tex.setattribute(luatexja.isglobal,
- luatexbase.attributes['ltj@ykblshift'], luatexja.token.scan_dimen())}#1}
+ luatexbase.attributes['ltj@ykblshift'], luatexja.token.scan_dimen())}#1\relax}
\define@key[ltj]{japaram}{talbaselineshift}{%
\directlua{tex.setattribute(luatexja.isglobal,
- luatexbase.attributes['ltj@tablshift'], luatexja.token.scan_dimen())}#1}
+ luatexbase.attributes['ltj@tablshift'], luatexja.token.scan_dimen())}#1\relax}
\define@key[ltj]{japaram}{tjabaselineshift}{%
\directlua{tex.setattribute(luatexja.isglobal,
- luatexbase.attributes['ltj@tkblshift'], luatexja.token.scan_dimen())}#1}
+ luatexbase.attributes['ltj@tkblshift'], luatexja.token.scan_dimen())}#1\relax}
% jaxspmode = {<char_code>, <mode>}
% mode: inhibit, preonly, postonly, allow
@@ -322,25 +321,13 @@
\def\ltj@tempa{preonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{1}\fi
\def\ltj@tempa{postonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{2}\fi
\def\ltj@tempa{allow}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{3}\fi
- \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.XSP,
- \ltj@safe@num@or{nil}{#1},
- \ltj@safe@num@or{nil}{\ltj@temp},0,3)}}
-
+ \ltj@@set@stack{XSP}03#1 \ltj@temp}
% alxspmode = {<char_code>, <mode>}
% mode: inhibit, preonly, postonly, allow
% or 0 1 2 3
\define@key[ltj]{japaram}{alxspmode}{% \inhibitxspcode
- \expandafter\ltj@set@alxspmode#1:\relax}
-\def\ltj@set@alxspmode#1,#2:{%
- \lowercase{\edef\ltj@temp{#2}}%
- \def\ltj@tempa{inhibit}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{0}\fi
- \def\ltj@tempa{preonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{1}\fi
- \def\ltj@tempa{postonly}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{2}\fi
- \def\ltj@tempa{allow}\ifx\ltj@temp\ltj@tempa\def\ltj@temp{3}\fi
- \directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.XSP,
- \ltj@safe@num@or{nil}{#1},
- \ltj@safe@num@or{nil}{\ltj@temp},0,3)}}
+ \expandafter\ltj@set@jaxspmode#1:\relax}% same code as jaxspmode
% autospacing = <bool> (default: true)
\define@boolkey[ltj]{japaram}{autospacing}[true]{%
@@ -359,8 +346,8 @@
\fi}
% [x]]kanjiskip = <skip>
- \define@key[ltj]{japaram}{kanjiskip}{\ltjsetkanjiskip #1}
- \define@key[ltj]{japaram}{xkanjiskip}{\ltjsetxkanjiskip #1}
+ \define@key[ltj]{japaram}{kanjiskip}{\ltjsetkanjiskip#1}
+ \define@key[ltj]{japaram}{xkanjiskip}{\ltjsetxkanjiskip#1}
\protected\def\ltjsetkanjiskip{% % SKIP
\directlua{%
local d = luatexja.token.scan_glue()
@@ -374,7 +361,7 @@
% jcharwidowpenalty = <count>
\define@key[ltj]{japaram}{jcharwidowpenalty}{% %COUNT
- \ltj@@set@stack0,#1:{JWP}{-10000}{10000}}
+ \ltj@@set@stack{JWP}{-10000}{10000}\z@#1 }
% differentjfm = { large | small | average | pleft | pright | paverage | both}
\define@choicekey*+[ltj]{japaram}{differentjfm}[\ltj@temp\ltj@tempr]%
@@ -471,18 +458,16 @@
\csname ltj@kcat6\endcsname="7FFFFFFF }%"
\protected\def\ltjjachar{\afterassignment\ltj@@jachar\ltj@tempcnta}
-\def\ltj@@jachar{{\directlua{tex.globaldefs = 0}\ltj@alljachar\ltj@@origchar\ltj@tempcnta}}
+\def\ltj@@jachar{{\directlua{tex.globaldefs=0}\ltj@alljachar\ltj@@origchar\ltj@tempcnta}}
\protected\def\ltjalchar{\afterassignment\ltj@@alchar\ltj@tempcnta}
-\def\ltj@@alchar{{\directlua{tex.globaldefs = 0}\ltj@allalchar\ltj@@origchar\ltj@tempcnta}}
+\def\ltj@@alchar{{\directlua{tex.globaldefs=0}\ltj@allalchar\ltj@@origchar\ltj@tempcnta}}
%%%%%%%% \ltjsetmathletter<number>, \ltjunsetmathletter<number>
\protected\def\ltjsetmathletter#1{%
- \ltj@tempcnta=#1
- \directlua{luatexja.math.is_math_letters[\the\ltj@tempcnta]=true}%
+ \directlua{luatexja.math.is_math_letters[luatexja.token.scan_int()]=true}#1\relax
}
\protected\def\ltjunsetmathletter#1{%
- \ltj@tempcnta=#1
- \directlua{luatexja.math.is_math_letters[\the\ltj@tempcnta]=false}%
+ \directlua{luatexja.math.is_math_letters[luatexja.token.scan_int()]=false}#1\relax
}
%%%%%%%% \ltjdeclarealtfont<base_font_cs><alt_font_cs>{100-200,3000-,5000,...}
@@ -677,24 +662,9 @@
\let\ltjgetwd=\ltj@@getwd\let\ltjgetht=\ltj@@getht\let\ltjgetdp=\ltj@@getdp
%%%%%%%% \ltjsetwd<box_num>=<dimen> etc.
-\protected\def\ltjsetwd{\begingroup
- \ltj@reset@globaldefs\afterassignment\ltj@@setwd@a\ltj@tempcnta}
-\def\ltj@@setwd@a{\afterassignment\ltj@@setwd@b\ltj@tempdima}
-\def\ltj@@setwd@b{%
- \directlua{luatexja.direction.set_box_dim('width')}%
- \ltj@restore@globaldefs\endgroup}
-\protected\def\ltjsetht{\begingroup
- \ltj@reset@globaldefs\afterassignment\ltj@@setht@a\ltj@tempcnta}
-\def\ltj@@setht@a{\afterassignment\ltj@@setht@b\ltj@tempdima}
-\def\ltj@@setht@b{%
- \directlua{luatexja.direction.set_box_dim('height')}%
- \ltj@restore@globaldefs\endgroup}
-\protected\def\ltjsetdp{\begingroup
- \ltj@reset@globaldefs\afterassignment\ltj@@setdp@a\ltj@tempcnta}
-\def\ltj@@setdp@a{\afterassignment\ltj@@setdp@b\ltj@tempdima}
-\def\ltj@@setdp@b{%
- \directlua{luatexja.direction.set_box_dim('depth')}%
- \ltj@restore@globaldefs\endgroup}
+\protected\def\ltjsetwd{\directlua{luatexja.direction.set_box_dim('width')}}
+\protected\def\ltjsetht{\directlua{luatexja.direction.set_box_dim('height')}}
+\protected\def\ltjsetdp{\directlua{luatexja.direction.set_box_dim('depth')}}
%%------------------ Load module for the format
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
index 29a839eb00b..496e28facd3 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
@@ -34,7 +34,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2013/05/14 Japanese Typesetting with LuaTeX]
+ \ProvidesPackage{luatexja}[2015/08/27 Japanese Typesetting with LuaTeX]
\fi %</LaTeX>
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
index 94254e77222..63ba2336175 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
@@ -4,7 +4,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2013/05/14 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2015/01/01 Patch to LaTeX2e Kernel for LuaTeX-ja]
\def\cleardoublepage{\clearpage\if@twoside
\ifodd\c@page
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
index 7eaf0c41bed..dac8b4eff92 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjdefs}[2015/02/22 Default font settings of LuaTeX-ja]
+\ProvidesPackage{lltjdefs}[2015/08/29 Default font settings of LuaTeX-ja]
\def\ltj@stdmcfont{IPAExMincho}
\def\ltj@stdgtfont{IPAExGothic}
@@ -70,7 +70,7 @@
"1100-"11FF, "2F00-"2FFF, "3100-"31EF, "A000-"A4CF, "A830-"A83F,
"AC00-"D7FF}
\ltjdefcharrange{8}{"A7, "A8, "B0, "B1, "B4, "B6, "D7, "F7}
-\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, +8}}
+\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8}}
\directlua{for x=128,255 do luatexja.math.is_math_letters[x] = true end}
\def\<{\inhibitglue}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
index e53384d88cf..4855f503306 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjfont}[2014/10/29 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2015/08/28 Patch to NFSS2 for LuaTeX-ja]
\let\k@encoding\@empty
\let\ck@encoding\@empty
@@ -44,6 +44,13 @@
\ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi}}
\def\zstrut{\relax\hbox{\tate
\ifmmode\copy\zstrutbox\else\unhcopy\zstrutbox\fi}}
+
+{%
+ \def\cdp@elt#1#2#3#4{%
+ \directlua{luatexja.jfont.add_fenc_list('\luatexluaescapestring{#1}')}}%
+ \cdp@list%
+}
+
\def\DeclareFontEncoding{%
\begingroup
\nfss@catcodes
@@ -57,7 +64,7 @@
{\default@family}{\default@series}%
{\default@shape}}%
\expandafter\let\csname#1-cmd\endcsname\@changed@cmd
- \def\enc@elt{\noexpand\enc@elt}%
+ \directlua{luatexja.jfont.add_fenc_list('\luatexluaescapestring{#1}')}%
\else
\@font@info{Redeclaring font encoding #1}%
\fi
@@ -88,7 +95,7 @@
{\default@k@family}{\default@k@series}%
{\default@k@shape}}%
\expandafter\let\csname#1-cmd\endcsname\@changed@kcmd
- \directlua{luatexja.jfont.add_kyenc_list('\luatexluaescapestring{#1}')}%
+ \directlua{luatexja.jfont.add_kyenc_list('\luatexluaescapestring{#1}')}%
\else
\@font@info{Redeclaring KANJI (yoko) font encoding #1}%
\fi
@@ -145,6 +152,7 @@
\@empty
\else \reserved@a
\fi
+ \directlua{luatexja.jfont.add_ffam('\luatexluaescapestring{#2}')}%
}%
}
\def\DeclareKanjiFamily#1#2#3{%
@@ -157,6 +165,7 @@
\@empty
\else \reserved@a
\fi
+ \directlua{luatexja.jfont.add_kfam('\luatexluaescapestring{#2}')}%
}%
}
\def\DeclareKanjiSubstitution#1#2#3#4{%
@@ -443,65 +452,39 @@
\newif\if@notkfam
\newif\if@notffam
\newif\if@tempswz
-\newif\if@ltj@use@fd
-\@ltj@use@fdtrue
+\def\@ltj@use@fd{true}
\DeclareRobustCommand\romanfamily[1]{\edef\f@family{#1}}
\DeclareRobustCommand\kanjifamily[1]{\edef\k@family{#1}}
\DeclareRobustCommand\fontfamily[1]{%
\@notkfamfalse\@notffamfalse
\edef\tmp@item{'\luatexluaescapestring{#1}'}%
- \edef\tmp@enc{'\luatexluaescapestring{\k@encoding}'}%
- \ifcsname \k@encoding+#1\endcsname % if \k@encoding+#1 is already defined
- \edef\k@family{#1}%
- \else\if@ltj@use@fd
- % search font definition file...
- \directlua{luatexja.jfont.is_kfam(\tmp@enc, \tmp@item)}%
- \ifin@\edef\k@family{#1}\else%
- \directlua{luatexja.jfont.is_Nkfam(\tmp@enc, \tmp@item)}%
- \ifin@\@notkfamtrue\else%
- % filename of font definition file is always lowercase
- \edef\@temp{\lowercase{\noexpand\IfFileExists{\k@encoding#1.fd}}}%
- \message{(I search kanjifont definition file)}%
- \@temp{\@tempswztrue}{\@tempswzfalse}%
- \if@tempswz
- \directlua{luatexja.jfont.add_kfam_list(\tmp@enc, \tmp@item)}%
- \edef\k@family{#1}%
- \else
- \directlua{luatexja.jfont.add_Nkfam_list(\tmp@enc, \tmp@item)}%
- \@notkfamtrue%
- \fi
- \fi
- \fi
- \else % do not use font definition file
- \@notkfamtrue%
- \fi\fi
- \edef\tmp@enc{'\luatexluaescapestring{\f@encoding}'}%
- \ifcsname \f@encoding+#1\endcsname
- \edef\f@family{#1}%
- \else % search font definition file...
- \directlua{luatexja.jfont.is_ffam(\tmp@enc, \tmp@item)}%
- \ifin@\edef\f@family{#1}\else
- \directlua{luatexja.jfont.is_Nffam(\tmp@enc, \tmp@item)}%
- \ifin@\@notffamtrue\else
- % filename of font definition file is always lowercase
- \edef\@temp{\lowercase{\noexpand\IfFileExists{\f@encoding#1.fd}}}%
- \message{(I search font definition file)}%
- \@temp{\@tempswztrue}{\@tempswzfalse}%
- \if@tempswz
- \directlua{luatexja.jfont.add_ffam_list(\tmp@enc, \tmp@item)}%
- \edef\f@family{#1}%
- \else
- \directlua{luatexja.jfont.add_Nffam_list(\tmp@enc, \tmp@item)}%
- \@notffamtrue%
- \fi
- \fi
- \fi
+ %
+ \directlua{luatexja.jfont.search_kfam(\tmp@item, \@ltj@use@fd)}%
+ \ifin@\edef\k@family{#1}\else\@notkfamtrue\fi
+ %
+ % alphabetic fonts part
+ \directlua{luatexja.jfont.is_ffam(\tmp@item)}%
+ \ifin@\edef\f@family{#1}\else
+ % checking is_stored_ffam is not sufficient,
+ % since LuaTeX-ja doesn't know whats fonts are defined before LuaTeX-ja is loaded.
+ \ifcsname \f@encoding+#1\endcsname % easy case
+ \directlua{luatexja.jfont.add_ffam(\tmp@item)}\edef\f@family{#1}%
+ \else
+ \@tempswafalse
+ \def\cdp@elt##1{\ifcsname ##1+#1\endcsname\@tempswatrue\fi}%
+ \directlua{luatexja.jfont.search_ffam_declared()}%
+ \if@tempswz
+ \directlua{luatexja.jfont.add_ffam(\tmp@item)}\edef\f@family{#1}%
+ \else
+ % now we search Nffam_list and font definition files.
+ \directlua{luatexja.jfont.search_ffam_fd(\tmp@item)}%
+ \ifin@\edef\f@family{#1}\else\@notffamtrue\fi
+ \fi
+ \fi
\fi
+ %
\if@notkfam\if@notffam
- {\ifcsname D@\k@encoding\endcsname\@nameuse{D@\k@encoding}\fi
- \xdef\@@temp{\default@family}}\edef\k@family{\@@temp}%
- {\ifcsname D@\f@encoding\endcsname\@nameuse{D@\f@encoding}\fi
- \xdef\@@temp{\default@family}}\edef\f@family{\@@temp}%
+ \edef\k@family{#1}\edef\f@family{#1}%
\fi\fi
}
\DeclareRobustCommand\romanseries[1]{\edef\f@series{#1}}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty
index 1ac1cc0bd4e..76c983a9e7b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-geometry}[2015/01/01 Patch to geometry for LuaTeX-ja with vertical writing mode]
+\ProvidesPackage{lltjp-geometry}[2015/01/04 Patch to geometry for LuaTeX-ja with vertical writing mode]
\RequirePackage{ifluatex}
\ifdefined\if@ltj@@geometry@tate\expandafter\endinput\fi
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
index d14a48801ac..f2fc58a2335 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-listings.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-listings}[2015/01/07 Patch to listings for LuaTeX-ja]
+\ProvidesPackage{lltjp-listings}[2015/01/08 Patch to listings for LuaTeX-ja]
\RequirePackage{listings,luatexbase-cctb}
%%%%%%%%%%%%%%%% Japanese support
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty
index 4498e824e1b..4f03d1ff751 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty
@@ -4,7 +4,7 @@
% \dimen...=\tbaselineshift ==> \dimen...=\ltj@tablshift sp
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-tascmac}[2014/12/17 Patch to (t)ascmac for LuaTeX-ja]
+\ProvidesPackage{lltjp-tascmac}[2014/12/18 Patch to (t)ascmac for LuaTeX-ja]
\RequirePackage{tascmac,luatexja}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
index d33e44f3787..0b6e5563733 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-unicode-math.sty
@@ -3,14 +3,30 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-unicode-math}[2013/05/14 Patch to unicode-math for LuaTeX-ja]
+\ProvidesPackage{lltjp-unicode-math}[2015/08/27 Patch to unicode-math for LuaTeX-ja]
\RequirePackage{unicode-math,luatexja}
\ExplSyntaxOn
\group_begin:
- \cs_gset:Npn \um_cs_set_eq_active_char:Nw #1 = "#2 \q_nil {%"
+ \tl_set:Nn \l_tmpa_tl { um_cs_set_eq_active_char:Nw }
+ \cs_if_exist:cT { __um_cs_set_eq_active_char:Nw } {
+ \tl_set:Nn \l_tmpa_tl { __um_cs_set_eq_active_char:Nw }
+ \cs_gset:Npn \use@mathgroup #1 #2
+ {
+ \mode_if_math:T % <- not sure if this is really necessary since we've just checked for mmode and raised an error if not!
+ {
+ \math@bgroup
+ \cs_if_eq:cNF {M@\f@encoding} #1 {#1}
+ \__um_switchto_literal:
+ \ltj@tempcnta=#2 \expandafter\ltj@@mathJapaneseFonts\string#1\relax%
+ \ifin@ \jfam #2 \relax \else \mathgroup #2 \relax \fi
+ \math@egroup
+ }
+ }
+ }
+ \cs_gset:cpn { \tl_use:N \l_tmpa_tl } #1 = "#2 \q_nil {%"
\group_begin:
%\typeout {um: \string#1, \int_from_hexadecimal:n {#2}, #2}% <- for debug
\char_set_lccode:nn { `! } { "#2 }%"