summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-05 22:50:45 +0000
committerKarl Berry <karl@freefriends.org>2017-05-05 22:50:45 +0000
commita99860c7820133400dc5b3c3e7e165627f2c6298 (patch)
tree2aeec817f4184ab0e11145731771dbff492c89cd /Master/texmf-dist/tex/luatex
parentaf94f399b2a355396d222eb693423beb6294a683 (diff)
luatexja (5may17)
git-svn-id: svn://tug.org/texlive/trunk@44217 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.sty4
-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.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-25c.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty24
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/lltjext.sty112
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua75
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua29
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua93
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua2
-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.cls6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty223
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.lua1
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.sty8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty15
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty91
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty2
-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-stfloats.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.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty2
40 files changed, 404 insertions, 365 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 be15fbba183..0416a3ebd77 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-adjust.sty
@@ -64,14 +64,14 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-adjust}[2016/05/15]
+ \ProvidesPackage{luatexja-adjust}[2017/05/05]
\fi %</LaTeX>
% Load core module if not yet.
% xkeyval.sty is already required in luatexja.sty.
\ifx\luatexjacoreLoaded\@undefined
\ifltj@in@latex %<*LaTeX>
- \RequirePackage{luatexja}[2016/05/15]
+ \RequirePackage{luatexja}
\else %<*!LaTeX>
\input luatexja.sty %
\fi %</LaTeX>
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 e7cb900ac9b..8ca804f8a11 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}[2014/07/02]
+ \ProvidesPackage{luatexja-ajmacros}[2017/05/05]
\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 38ca8eedaca..dd6bd5b284c 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}[2016/01/30 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec-24}[2017/04/19 fontspec support of LuaTeX-ja]
\RequirePackage{l3keys2e,luatexja}
\ExplSyntaxOn
@@ -138,7 +138,7 @@
}
\clist_set:Nx \g__fontspec_default_fontopts_clist {
YokoFeatures = { JFM=ujis }, TateFeatures = { JFM=ujisv },
- Scale=\fp_use:N \g_ltj_fontspec_scale_fp, Kerning=Off,
+ Scale=\fp_use:N \g_ltj_fontspec_scale_fp, Kerning=Off, Script=CJK,
\g__ltj_fontspec_default_fontopts_clist
}
\prop_set_eq:NN \g__fontspec_fontopts_prop \g__ltj_fontspec_fontopts_prop
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-25c.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-25c.sty
index 4403f4ec20f..edb8da8f3ed 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-25c.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-25c.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec-25c}[2017/01/23 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec-25c}[2017/05/05 fontspec support of LuaTeX-ja]
\RequirePackage{l3keys2e,luatexja}
\ExplSyntaxOn
@@ -140,7 +140,7 @@
}
\clist_set:Nx \g__fontspec_default_fontopts_clist {
YokoFeatures = { JFM=ujis }, TateFeatures = { JFM=ujisv },
- Scale=\fp_use:N \g_ltj_fontspec_scale_fp, Kerning=Off,
+ Scale=\fp_use:N \g_ltj_fontspec_scale_fp, Kerning=Off, Script=CJK,
\g__ltj_fontspec_default_fontopts_clist
}
\prop_set_eq:NN \g__fontspec_fontopts_prop \g__ltj_fontspec_fontopts_prop
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 5ca4c48662b..c3ae22a79f2 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec}[2017/01/23 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec}[2017/05/05 fontspec support of LuaTeX-ja]
\RequirePackage{l3keys2e,luatexja}
\ExplSyntaxOn
diff --git a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty
index defef8e1cef..845b1a2aa74 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-otf.sty
@@ -64,13 +64,13 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-otf}[2016/05/15]
+ \ProvidesPackage{luatexja-otf}[2017/05/05]
\fi %</LaTeX>
% Load core module if not yet.
\ifx\luatexjacoreLoaded\@undefined
\ifltj@in@latex %<*LaTeX>
- \RequirePackage{luatexja}[2016/05/15]
+ \RequirePackage{luatexja}
\else %<*!LaTeX>
\input luatexja.sty %
\fi %</LaTeX>
@@ -94,7 +94,7 @@
%% Load ajmacros
\ifltj@in@latex %<*LaTeX>
- \RequirePackage{luatexja-ajmacros}[2014/07/02]
+ \RequirePackage{luatexja-ajmacros}
\else %<*!LaTeX>
\input luatexja-ajmacros.sty %
\fi %</LaTeX>
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 41ba2361467..6a71e23d24f 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}[2017/03/21 Japanese font presets]
+\ProvidesPackage{luatexja-preset}[2017/05/05 Japanese font presets]
\RequirePackage{expl3,l3keys2e}
\RequirePackage{luatexja}
@@ -227,6 +227,19 @@
}
}
+% Source Han {Serif,Sans}
+\ltjpreset_declare_option:nn{sourcehan}{
+ \ltjpreset_set_multi:n {
+ Source~Han~Serif~Regular, % mc/m
+ Source~Han~Serif~Bold, % mc/bx
+ Source~Han~Sans~Normal, % gt/m (multi)
+ Source~Han~Sans~Bold, % gt/bx
+ Source~Han~Sans~Medium, % gt/m (uni)
+ Source~Han~Sans~Heavy, % gt/eb
+ Source~Han~Sans~Heavy % mg/m
+ }
+}
+
% ipa, ipaex, ms
\ltjpreset_declare_option:nn{ipa}{
@@ -379,23 +392,23 @@
\DeclareFontShape{JY3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_yoko_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl
- ; script=latn \bool_if:NT \l_ltjpreset_expert_bool { ;+hkna }}
+ ; script=cjk \bool_if:NT \l_ltjpreset_expert_bool { ;+hkna }}
} {}
\DeclareFontShape{JT3}{#1}{#2}{n}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_tate_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl;
- ; script=latn \bool_if:NT \l_ltjpreset_expert_bool { ;+vkna }}
+ ; script=cjk \bool_if:NT \l_ltjpreset_expert_bool { ;+vkna }}
} {}
\bool_if:NT \l_ltjpreset_expert_bool {
\DeclareFontShape{JY3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_yoko_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby
- ; script=kana}
+ ; script=kana }
} {}
\DeclareFontShape{JT3}{#1}{#2}{rb}{ <-> s*[\fp_use:N \l_ltjpreset_scale_fp]
{\bool_if:NT \l_ltjpreset_noembed_bool {psft:} "#3"
: jfm=\tl_use:N \ltjpreset_use_jfm_tate_tl ;-kern;\tl_use:N \l_ltjpreset_kanji_shape_tl ;+ruby
- ; script=kana}
+ ; script=kana }
} {}
}
}
@@ -463,6 +476,7 @@
\tl_use:N \l_ltjpreset_kanji_shape_tl,
YokoFeatures = { JFM = \tl_use:N \ltjpreset_use_jfm_yoko_tl },
TateFeatures = { JFM = \tl_use:N \ltjpreset_use_jfm_tate_tl },
+ Script=CJK,
}
\bool_if:NT \l_ltjpreset_expert_bool {
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 2da6d5974dc..813ab31a430 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}[2015/12/29 v0.23]
+\ProvidesPackage{luatexja-ruby}[2017/05/05 v0.23]
\RequirePackage{luatexja}
%%------------------
diff --git a/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty b/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
index 2e48f319973..cc8f8a4c4c8 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}[2017/03/28 v1.2f-ltj-5 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2017/05/05 v1.2g-ltj-5 Macros for vertical writing]
\RequirePackage{luatexja}
{\catcode`\*=11
@@ -78,36 +78,35 @@
% \begin{itemize}
% \item 周囲の組方向が横組かつ組方向が|<y>|, |<z>|指定の場合
% \begin{itemize}
-% \item |[t]|指定のとき、\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
-% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
-% \item |[b]|指定のとき、\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
+% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
+% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
% \end{itemize}
% \item 周囲の組方向が横組かつ組方向が|<t>|指定の場合
% \begin{itemize}
-% \item |[t]|指定のとき、\\表組の上端が周囲の和文ベースラインと一致
-% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
-% \item |[b]|指定のとき、\\表組の下端が周囲の和文ベースラインと一致
+% \item |[t]|指定のとき\\表組の上端が周囲の和文ベースラインと一致
+% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\表組の下端が周囲の和文ベースラインと一致
% \end{itemize}
% \item 周囲の組方向が縦組かつ組方向が|<y>|指定の場合
% \begin{itemize}
-% \item |[t]|指定のとき、\\表組の上端が周囲の和文ベースラインと一致
-% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
-% \item |[b]|指定のとき、\\表組の下端が周囲の和文ベースラインと一致
+% \item |[t]|指定のとき\\表組の上端が周囲の和文ベースラインと一致
+% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\表組の下端が周囲の和文ベースラインと一致
% \end{itemize}
% \item 周囲の組方向が縦組かつ組方向が|<t>|指定の場合
% \begin{itemize}
-% \item |[t]|指定のとき、\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
-% \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
-% \item |[b]|指定のとき、\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
+% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
+% \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致(罫線の場合は和文ベースラインの位置)
% \end{itemize}
% \item 周囲の組方向が縦組かつ組方向が|<z>|指定の場合
% [TODO] 未定!
%^^A \begin{itemize}
-%^^A \item |[t]|指定のとき、\\表組の上端が周囲の和文ベースラインと一致
-%^^A \item |[c]|指定のとき、\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
-%^^A \item |[b]|指定のとき、\\表組の下端が周囲の和文ベースラインと一致
+%^^A \item |[t]|指定のとき\\表組の上端が周囲の和文ベースラインと一致
+%^^A \item |[c]|指定のとき\\表組の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+%^^A \item |[b]|指定のとき\\表組の下端が周囲の和文ベースラインと一致
%^^A \end{itemize}
-% \end{itemize}
\def\fork@array@option<#1>[#2]{%
\ifnum\ltjgetparameter{direction}=4 % yoko
\ifx\box@dir\yoko
@@ -124,10 +123,10 @@
\else
\if #2t\relax
\def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}%
- \let\@end@alignbox\egroup%
+ \let\@end@alignbox\egroup
\else\if #2b\relax
- \let\@begin@alignbox\vbox
- \let\@end@alignbox\relax
+ \def\@begin@alignbox{\vbox\bgroup\vbox}%
+ \def\@end@alignbox{\kern\z@\egroup}%
\else
\let\@begin@alignbox\vcenter
\let\@end@alignbox\relax
@@ -137,10 +136,10 @@
\ifx\box@dir\yoko
\if #2t\relax
\def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}%
- \def\@end@alignbox{\egroup}%
+ \let\@end@alignbox\egroup
\else\if #2b\relax
- \let\@begin@alignbox\vbox
- \let\@end@alignbox\relax
+ \def\@begin@alignbox{\vbox\bgroup\vbox}%
+ \def\@end@alignbox{\kern\z@\egroup}%
\else
\let\@begin@alignbox\vcenter
\let\@end@alignbox\relax
@@ -172,7 +171,7 @@
\ifx\box@dir\yoko
\if #2t\relax
\def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}%
- \def\@end@alignbox{\egroup}%
+ \let\@end@alignbox\egroup
\else\if #2b\relax
\def\@begin@alignbox{\vbox\bgroup\vbox}%
\def\@end@alignbox{\kern\z@\egroup}%
@@ -415,6 +414,41 @@
\let\hss\vss\let\unhbox\unvbox
\csname bm@#4\endcsname}\@end@parbox
\@end@tempboxa}
+% コミュニティ版では、アスキー版で不自然だった|\parbox|の箱と
+% 周囲の本文との揃え位置を修正し、以下のように設計しました。
+% \begin{itemize}
+% \item 周囲の組方向が横組かつ組方向が|<y>|, |<z>|指定の場合
+% \begin{itemize}
+% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致
+% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致
+% \end{itemize}
+% \item 周囲の組方向が横組かつ組方向が|<t>|指定の場合
+% \begin{itemize}
+% \item |[t]|指定のとき\\箱の上端が周囲の和文文字の高さと一致
+% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\箱の下端が周囲の和文文字の深さと一致
+% \end{itemize}
+% \item 周囲の組方向が縦組かつ組方向が|<y>|指定の場合
+% \begin{itemize}
+% \item |[t]|指定のとき\\箱の上端が周囲の和文文字の高さと一致
+% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\箱の下端が周囲の和文文字の深さと一致
+% \end{itemize}
+% \item 周囲の組方向が縦組かつ組方向が|<t>|指定の場合
+% \begin{itemize}
+% \item |[t]|指定のとき\\一行目のベースラインが周囲のそれと一致
+% \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+% \item |[b]|指定のとき\\最終行のベースラインが周囲のそれと一致
+% \end{itemize}
+% \item 周囲の組方向が縦組かつ組方向が|<z>|指定の場合
+% [TODO] 未定!
+%^^A \begin{itemize}
+%^^A \item |[t]|指定のとき\\箱の上端が周囲の和文ベースラインと一致
+%^^A \item |[c]|指定のとき\\箱の中心が周囲の数式軸を通る(欧文ベースラインシフトの影響下)
+%^^A \item |[b]|指定のとき\\箱の下端が周囲の和文ベースラインと一致
+%^^A \end{itemize}
+% \end{itemize}
\def\fork@parbox@option<#1>[#2]{%
\let\box@dir\relax
\if #1z\relax
@@ -436,7 +470,6 @@
\else \let\box@dir\utod
\fi
\fi
-%%% now almost same as \fork@array@option
\ifnum\ltjgetparameter{direction}=4 % yoko
\ifx\box@dir\yoko
\if #2t\relax
@@ -455,11 +488,11 @@
\fi\fi
\else
\if #2t\relax
- \def\@begin@parbox{\vtop\bgroup\kern\z@\vbox}%
- \def\@end@parbox{\egroup}%
+ \def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vbox}%
+ \let\@end@parbox\egroup
\else\if #2b\relax
- \let\@begin@parbox\vbox
- \let\@end@parbox\relax
+ \def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}%
+ \def\@end@parbox{\kern\z@\egroup}%
\else
\ifmmode
\let\@begin@parbox\vcenter\let\@end@parbox\relax
@@ -472,11 +505,11 @@
\else\ifnum\ltjgetparameter{direction}=1 % dtou
\ifx\box@dir\yoko
\if #2t\relax
- \def\@begin@parbox{\vtop\bgroup\kern\z@\vbox}
- \def\@end@parbox{\egroup}
+ \def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vbox}%
+ \let\@end@parbox\egroup
\else\if #2b\relax
- \let\@begin@parbox\vbox
- \let\@end@parbox\relax
+ \def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}%
+ \def\@end@parbox{\kern\z@\egroup}%
\else
\ifmmode
\let\@begin@parbox\vcenter\let\@end@parbox\relax
@@ -519,10 +552,10 @@
\else % tate, utod
\ifx\box@dir\yoko
\if #2t\relax
- \def\@begin@parbox{\vtop\bgroup\kern\z@\vbox}%
- \def\@end@parbox{\egroup}%
+ \def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vbox}%
+ \let\@end@parbox\egroup
\else\if #2b\relax
- \def\@begin@parbox{\vbox\bgroup\vbox}%
+ \def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}%
\def\@end@parbox{\kern\z@\egroup}%
\else
\ifmmode
@@ -567,7 +600,7 @@
}
%%% pbox
-\def\pbox{\leavevmode\@ifnextchar<{\X@makePbox}{\X@makePbox<Z>}}
+\DeclareRobustCommand\pbox{\leavevmode\@ifnextchar<{\X@makePbox}{\X@makePbox<Z>}}
\def\X@makePbox<#1>{%
\@ifnextchar[{\@imakePbox<#1>}{\@imakePbox<#1>[-5\p@]}}
\def\@imakePbox<#1>[#2]{\@ifnextchar[%]
@@ -593,8 +626,9 @@
\else \let\box@dir\utod
\fi
\fi
- \ifdim #2 <\z@ \hbox{\box@dir#4}\else
- \hbox to#2{\box@dir
+ \setlength{\@tempdima}{#2}%
+ \ifdim\@tempdima<\z@ \hbox{\box@dir#4}\else
+ \hb@xt@\@tempdima{\box@dir
\if #3l\relax\else\hss\fi
#4\relax
\if #3r\relax\else\hss\fi}\fi\egroup}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.sty
index 918e7979026..57826133c4b 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}[2016/05/15]
+ \ProvidesPackage{ltj-base}[2017/05/05]
\fi %</LaTeX>
%%------------------ Tiny helpers
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua
index 277b4dd9f48..d8825934b87 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-charrange.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.charrange',
- date = '2014/06/03',
+ date = '2017/05/05',
description = 'Handling the range of Japanese characters',
})
module('luatexja.charrange', package.seeall)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
index 3477b09c893..93e92ab5dec 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2016/04/03',
+ date = '2017/05/05',
description = 'Insertion process of JFM glues and kanjiskip',
})
module('luatexja.jfmglue', package.seeall)
@@ -28,22 +28,28 @@ local getfont = node.direct.getfont
local getlist = node.direct.getlist
local getchar = node.direct.getchar
local getsubtype = node.direct.getsubtype
-
+local if_lang_ja
+do
+ local lang_ja = luatexja.lang_ja
+ local getlang = node.direct.getlang
+ if_lang_ja = getlang
+ and function (n) return getlang(n)==lang_ja end
+ or function (n) return getfield(n,'lang')==lang_ja end
+end
+
local has_attr = node.direct.has_attribute
local set_attr = node.direct.set_attribute
local insert_before = node.direct.insert_before
local insert_after = node.direct.insert_after
local node_next = node.direct.getnext
-local round = tex.round
local ltjd_make_dir_whatsit = ltjd.make_dir_whatsit
local ltjf_font_metric_table = ltjf.font_metric_table
local ltjf_find_char_class = ltjf.find_char_class
local node_new = node.direct.new
local node_copy = node.direct.copy
-local node_remove = node.direct.remove
local node_tail = node.direct.tail
local node_free = node.direct.free
-local node_end_of_math = node.direct.end_of_math
+local node_remove = node.direct.remove
local id_glyph = node.id('glyph')
local id_hlist = node.id('hlist')
@@ -64,12 +70,6 @@ local id_box_like = 256 -- vbox, shifted hbox
local id_pbox = 257 -- already processed nodes (by \unhbox)
local id_pbox_w = 258 -- cluster which consists of a whatsit
local sid_user = node.subtype('user_defined')
-local lang_ja = luatexja.lang_ja
-
-local sid_start_link = node.subtype('pdf_start_link')
-local sid_start_thread = node.subtype('pdf_start_thread')
-local sid_end_link = node.subtype('pdf_end_link')
-local sid_end_thread = node.subtype('pdf_end_thread')
local ITALIC = luatexja.icflag_table.ITALIC
local PACKED = luatexja.icflag_table.PACKED
@@ -235,7 +235,7 @@ function check_box_high(Nx, box_ptr, box_end)
local first_char = first_char
if first_char then
if getid(first_char)==id_glyph then
- if getfield(first_char, 'lang') == lang_ja then
+ if if_lang_ja(first_char) then
set_np_xspc_jachar_hbox(Nx, first_char)
else
set_np_xspc_alchar(Nx, getchar(first_char),first_char, 1)
@@ -304,7 +304,7 @@ local min, max = math.min, math.max
local function calc_np_aux_glyph_common(lp, acc_flag)
Np.nuc = lp
Np.first= (Np.first or lp)
- if getfield(lp, 'lang') == lang_ja then
+ if if_lang_ja(lp) then
Np.id = id_jglyph
local m, mc, cls = set_np_xspc_jachar(Np, lp)
local npi, npf
@@ -329,7 +329,7 @@ local function calc_np_aux_glyph_common(lp, acc_flag)
lp=lx; break
else
local lid = getid(lx)
- if lid==id_glyph and getfield(lx, 'lang') ~= lang_ja then
+ if lid==id_glyph and not if_lang_ja(lx) then
-- 欧文文字
last_glyph = lx; set_attr(lx, attr_icflag, PROCESSED); Np.last = lx
y_adjust = has_attr(lx,attr_ablshift) or 0
@@ -397,7 +397,12 @@ local function calc_np_aux_glyph_common(lp, acc_flag)
end
local calc_np_auxtable
do
+local node_end_of_math = node.direct.end_of_math
local dir_tate = luatexja.dir_table.dir_tate
+local sid_start_link = node.subtype('pdf_start_link')
+local sid_start_thread = node.subtype('pdf_start_thread')
+local sid_end_link = node.subtype('pdf_end_link')
+local sid_end_thread = node.subtype('pdf_end_thread')
calc_np_auxtable = {
[id_glyph] = calc_np_aux_glyph_common,
[id_hlist] = function(lp)
@@ -599,12 +604,11 @@ do
c = getchar(x)
Nx.pre = table_current_stack[PRE + c] or 0
Nx.post = table_current_stack[POST + c] or 0
- Nx.xspc = table_current_stack[XSP + c] or 3
else
Nx.pre, Nx.post = 0, 0
- Nx.xspc = table_current_stack[XSP - 1] or 3
end
Nx.met = nil
+ Nx.xspc = table_current_stack[XSP + c] or 3
Nx.auto_xspc = (has_attr(x, attr_autoxspc)==1)
end
local set_np_xspc_alchar = set_np_xspc_alchar
@@ -615,7 +619,7 @@ do
local s = Nx.last_char
if s then
if getid(s)==id_glyph then
- if getfield(s, 'lang') == lang_ja then
+ if if_lang_ja(s) then
set_np_xspc_jachar_hbox(Nx, s)
else
set_np_xspc_alchar(Nx, getchar(s), s, 2)
@@ -731,6 +735,7 @@ end
-------------------- 和文文字間空白量の決定
local calc_ja_ja_aux
do
+ local round = tex.round
local bg_ag = 2*id_glue - id_glue
local bg_ak = 2*id_glue - id_kern
local bk_ag = 2*id_kern - id_glue
@@ -1001,7 +1006,7 @@ end
-- (anything) .. (和文文字で始まる hlist)
local function handle_np_ja_hlist()
local qid = Nq.id
- if qid==id_jglyph or ((qid==id_pbox or Nq.id == id_pbox_w) and Nq.met) then
+ if qid==id_jglyph or ((qid==id_pbox or qid == id_pbox_w) and Nq.met) then
local g = non_ihb_flag and get_OB_skip(0) or get_kanjiskip() -- O_B->K
handle_penalty_normal(Nq.post, 0, g); real_insert(g)
elseif Nq.met then -- Nq.id==id_hlist
@@ -1205,6 +1210,7 @@ end
do
local IHB = luatexja.userid_table.IHB
local BPAR = luatexja.userid_table.BPAR
+ local BOXB = luatexja.userid_table.BOXB
local node_prev = node.direct.getprev
local node_write = node.direct.write
@@ -1227,11 +1233,32 @@ do
node_write(tn)
end
+ -- Node for indicating a head/end of a box
+ function create_boxbdd_node()
+ local tn = node_new(id_whatsit, sid_user)
+ setfield(tn, 'user_id', BOXB)
+ setfield(tn, 'type', 100)
+ setfield(tn, 'value', 1)
+ node_write(tn)
+ end
+
local function whatsit_callback(Np, lp, Nq)
if Np and Np.nuc then return Np
elseif Np and getfield(lp, 'user_id') == BPAR then
Np.first = lp; Np.nuc = lp; Np.last = lp
return Np
+ elseif Np and getfield(lp, 'user_id') == BOXB then
+ Np.first = lp; Np.nuc = lp; Np.last = lp
+ if Nq then
+ if Nq.met then
+ Np.class = fast_find_char_class('parbdd', Nq.met)
+ end
+ Np.met = Nq.met; Np.pre = 0; Np.post = 0; Np.xspc = 0
+ Np.auto_xspc = false
+ end
+ return Np
+ else
+ return Np
end
end
@@ -1247,6 +1274,18 @@ do
Nq.auto_xspc = false
end
head = node_remove(head, y)
+ node_free(y)
+ elseif not s and getfield(Nq.nuc, 'user_id') == BOXB then
+ local x, y = node_prev(Nq.nuc), Nq.nuc
+ Nq.first, Nq.nuc, Nq.last = x, x, x
+ if Np then
+ if Np.met then
+ Nq.class = fast_find_char_class('boxbdd', Np.met)
+ end
+ Nq.met = Np.met; Nq.pre = 0; Nq.post = 0; Nq.xspc = 0
+ Nq.auto_xspc = false
+ end
+ head = node_remove(head, y)
node_free(y)
end
return s
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
index 86d553a7e80..77855f5374a 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfont',
- date = '2016/04/03',
+ date = '2017/05/05',
description = 'Loader for Japanese fonts',
})
module('luatexja.jfont', package.seeall)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
index c66c208a036..16b5c2b38dc 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}[2017/03/12 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2017/05/05 LaTeX support of LuaTeX-ja]
% LaTeX2e 2017/05/01 で行われる対策
\ifx\document@default@language \@undefined
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-plain.sty
index 95b225c7020..2707a0e71c6 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}[2016/05/15]
+ \ProvidesPackage{ltj-plain}[2017/05/05]
\fi %</LaTeX>
%%------------------
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua
index 99b8d60f686..9ff46ebb9f2 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua
@@ -17,6 +17,7 @@ local getfont = node.direct.getfont
local getchar = node.direct.getchar
local getfield = node.direct.getfield
local getsubtype = node.direct.getsubtype
+local getlang = node.direct.getlang or function (n) return getfield(n,'lang') end
local pairs = pairs
local floor = math.floor
@@ -51,6 +52,10 @@ local PROCESSED_BEGIN_FLAG = luatexja.icflag_table.PROCESSED_BEGIN_FLAG
local dir_tate = luatexja.dir_table.dir_tate
local lang_ja = luatexja.lang_ja
+local setlang = node.direct.setlang or function(n,l) setfield(n,'lang',l) end
+local setfont = node.direct.setfont or function(n,l) setfield(n,'font',l) end
+local setchar = node.direct.setchar or function(n,l) setfield(n,'char',l) end
+
------------------------------------------------------------------------
-- MAIN PROCESS STEP 1: replace fonts
------------------------------------------------------------------------
@@ -97,10 +102,9 @@ do
local pid = getid(p)
while pid==id_glyph do
local pc = getchar(p)
- if (has_attr(p, attr_icflag) or 0)<=0 and is_ucs_in_japanese_char(p, pc) then
- setfield(p, 'font',
- ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc))
- setfield(p, 'lang', lang_ja)
+ if has_attr(p, attr_icflag, 0) and is_ucs_in_japanese_char(p, pc) then
+ setfont(p, ltjf_replace_altfont(has_attr(p, attr_curjfnt) or getfont(p), pc))
+ setlang(p, lang_ja)
ltjs_orig_char_table[p] = pc
end
p = node_next(p); pid = getid(p)
@@ -126,8 +130,12 @@ local ltjf_font_metric_table = ltjf.font_metric_table
local font_getfont = font.getfont
local function set_box_stack_level(head, mode)
local box_set, cl = 0, tex.currentgrouplevel + 1
- for _,p in pairs(wt) do
- if mode and getfield(p, 'value')==cl then box_set = 1 end; node_free(p)
+ if mode then
+ for _,p in pairs(wt) do
+ if getfield(p, 'value')==cl then box_set = 1 end; node_free(p)
+ end
+ else
+ for _,p in pairs(wt) do node_free(p) end
end
ltjs_report_stack_level(tex_getcount('ltj@@stack') + box_set)
for _,p in pairs(wtd) do
@@ -135,14 +143,13 @@ local function set_box_stack_level(head, mode)
end
if ltjs.list_dir == dir_tate then
for p in node.direct.traverse_id(id_glyph,to_direct(head)) do
- if (has_attr(p, attr_icflag) or 0)<=0 and getfield(p, 'lang')==lang_ja then
- local pc = ltjs_orig_char_table[p]
- local nf = ltjf_replace_altfont( has_attr(p, attr_curtfnt) or getfont(p) , pc)
- setfield(p, 'font', nf)
+ if has_attr(p, attr_icflag, 0) and getlang(p)==lang_ja then
+ local nf = ltjf_replace_altfont( has_attr(p, attr_curtfnt) or getfont(p) , ltjs_orig_char_table[p])
+ setfont(p, nf)
if ltjf_font_metric_table[nf].vert_activated then
local pc = getchar(p)
pc = (ltjf_font_extra_info[nf] and ltjf_font_extra_info[nf][pc] and ltjf_font_extra_info[nf][pc].vform)
- if pc and font_getfont(nf).characters[pc] then setfield(p, 'char', pc) end
+ if pc and font_getfont(nf).characters[pc] then setchar(p, pc) end
end
end
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
index 85f7568dbcf..1237cea4628 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.ruby',
- date = '2015/09/18',
+ date = '2017/05/05',
description = 'Ruby annotation',
})
module('luatexja.ruby', package.seeall)
@@ -673,9 +673,9 @@ luatexbase.add_to_callback('hpack_filter', post_high_hbox, 'ltj.ruby.post_hbox',
----------------------------------------------------------------
do
local RIPRE = luatexja.stack_table_index.RIPRE
- local function whatsit_callback(Np, lp, Nq, bsl)
+ local function whatsit_callback(Np, lp, Nq)
if Np.nuc then return Np
- elseif getfield(lp, 'user_id') == RUBY_PRE then
+ elseif getfield(lp, 'user_id') == RUBY_PRE then
Np.first, Np.nuc, Np.last = lp, lp, lp
local lpv = getfield(lp, 'value')
local x = node_next(node_next(lpv))
@@ -711,6 +711,8 @@ do
set_attr(lpv, attr_ruby_maxprep, 0)
end
return Np
+ else
+ return Np
end
end
luatexbase.add_to_callback("luatexja.jfmglue.whatsit_getinfo", whatsit_callback,
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
index 2b0c29b8d36..007ccb05441 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
@@ -14,6 +14,19 @@ local getfont = node.direct.getfont
local getlist = node.direct.getlist
local getchar = node.direct.getchar
local getsubtype = node.direct.getsubtype
+local getdepth = node.direct.getdepth or function(n) return getfield(n,'depth') end
+local getwhd = node.direct.getwhd or function(n)
+ return getfield(n,'width'), getfield(n,'height'),getfield(n,'depth') end
+
+local setwhd = node.direct.setwhd or function(n,w,h,d)
+ setfield(n,'width',w); setfield(n,'height',h); setfield(n,'depth',d) end
+local setchar = node.direct.setchar or function(n,c) setfield(n,'char',c) end
+local setnext = node.direct.setnext or function(n,c) setfield(n,'next',c) end
+local setdir = node.direct.setdir or function(n,c) setfield(n,'dir',c) end
+local setoffsets = node.direct.setoffsets or function(n,x,y)
+ setfield(n,'xoffset',x); setfield(n,'yoffset',y) end
+local getoffsets = node.direct.getoffsets or function(n)
+ return getfield(n,'xoffset'), getfield(n,'yoffset') end
local node_traverse_id = node.direct.traverse_id
local node_traverse = node.direct.traverse
@@ -21,7 +34,7 @@ local node_new = node.direct.new
local node_copy = node.direct.copy
local node_remove = node.direct.remove
local node_tail = node.direct.tail
-local node_next = node.direct.getnext or node.next
+local node_next = node.direct.getnext
local has_attr = node.direct.has_attribute
local set_attr = node.direct.set_attribute
local node_insert_before = node.direct.insert_before
@@ -83,29 +96,26 @@ local function capsule_glyph_yoko(p, met, char_data, head, dir)
local kbl = has_attr(p, attr_ykblshift) or 0
--
-- f*: whd specified in JFM
- local fwidth, pwidth = char_data.width, getfield(p, 'width')
- fwidth = fwidth or pwidth
- local fheight, pheight = char_data.height, getfield(p, 'height')
- fheight = fheight or pheight
- local fdepth, pdepth = char_data.depth,getfield(p, 'depth')
- fdepth = fdepth or pdepth
+ local pwidth, pheight,pdepth = getwhd(p)
+ local fwidth = char_data.width or pwidth
+ local fheight= char_data.height or pheight
+ local fdepth = char_data.depth or pdepth
if pwidth==fwidth then
-- 補正後glyph node は ht: p.height - kbl - down, dp: p.depth + min(0, kbl+down) を持つ
-- 設定されるべき寸法: ht: fheight - kbl, dp: fdepth + kbl
local ht_diff = fheight + fshift.down - pheight
local dp_diff = fdepth + kbl - pdepth - min(kbl + fshift.down, 0)
if ht_diff == 0 and dp_diff ==0 then -- offset only
- set_attr(p, attr_icflag, PROCESSED)
- setfield(p, 'xoffset', getfield(p, 'xoffset') - fshift.left)
- setfield(p, 'yoffset', getfield(p, 'yoffset') - kbl - fshift.down)
+ set_attr(p, attr_icflag, PROCESSED)
+ local xo, yo = getoffsets(p)
+ setoffsets(p, xo - fshift.left, yo - kbl - fshift.down)
return node_next(p), head, p
elseif ht_diff >= 0 and dp_diff >=0 then -- rule
local box = node_new(id_rule,rule_subtype)
- setfield(p, 'yoffset', getfield(p, 'yoffset') - kbl - fshift.down)
- setfield(box, 'width', 0)
- setfield(box, 'height', fheight - kbl)
- setfield(box, 'depth', fdepth + kbl)
- setfield(box, 'dir', dir)
+ local xo, yo = getoffsets(p)
+ setoffsets(p, xo, yo - kbl - fshift.down)
+ setwhd(box, 0, fheight - kbl, fdepth + kbl)
+ setdir(box, dir)
set_attr(box, attr_icflag, PACKED)
set_attr(p, attr_icflag, PROCESSED)
head = p and node_insert_before(head, p, box)
@@ -116,17 +126,15 @@ local function capsule_glyph_yoko(p, met, char_data, head, dir)
local q
head, q = node_remove(head, p)
- setfield(p, 'yoffset', getfield(p, 'yoffset') -fshift.down);
- setfield(p, 'next', nil)
- setfield(p, 'xoffset', getfield(p, 'xoffset')
- + char_data.align*(fwidth-pwidth) - fshift.left)
+ local xo, yo = getoffsets(p)
+ setoffsets(p, xo + char_data.align*(fwidth-pwidth) - fshift.left,
+ yo - fshift.down);
+ setnext(p, nil)
local box = node_new(id_hlist)
- setfield(box, 'width', fwidth)
- setfield(box, 'height', fheight)
- setfield(box, 'depth', fdepth)
+ setwhd(box, fwidth, fheight, fdepth)
setfield(box, 'head', p)
setfield(box, 'shift', kbl)
- setfield(box, 'dir', dir)
+ setdir(box, dir)
set_attr(box, attr_icflag, PACKED)
head = q and node_insert_before(head, q, box)
or node_insert_after(head, node_tail(head), box)
@@ -143,7 +151,7 @@ local function capsule_glyph_tate(p, met, char_data, head, dir)
do
local pf = getfont(p)
local pc = getchar(p)
- setfield(p, 'char', pc)
+ setchar(p, pc)
pwidth = ltjf_font_extra_info[pf] and ltjf_font_extra_info[pf][pc]
and ltjf_font_extra_info[pf][pc].vwidth
and ltjf_font_extra_info[pf][pc].vwidth * met.size or (ascent+descent)
@@ -155,20 +163,17 @@ local function capsule_glyph_tate(p, met, char_data, head, dir)
fshift = call_callback("luatexja.set_width", fshift, met, char_data)
local fheight = char_data.height or 0
local fdepth = char_data.depth or 0
- local y_shift
- = getfield(p, 'xoffset') + (has_attr(p,attr_tkblshift) or 0)
+ local xo, yo = getoffsets(p)
+ local y_shift = xo + (has_attr(p,attr_tkblshift) or 0)
local q
head, q = node_remove(head, p)
local box = node_new(id_hlist)
- setfield(box, 'width', fwidth)
- setfield(box, 'height', fheight)
- setfield(box, 'depth', fdepth)
+ setwhd(box, fwidth, fheight, fdepth)
setfield(box, 'shift', y_shift)
- setfield(box, 'dir', dir)
+ setdir(box, dir)
- setfield(p, 'xoffset', - fshift.down)
- setfield(p, 'yoffset', getfield(p, 'yoffset') -(ascent
- + char_data.align*(fwidth-pwidth) - fshift.left) )
+ setoffsets(p, -fshift.down,
+ yo -(ascent + char_data.align*(fwidth-pwidth) - fshift.left) )
local ws = node_new(id_whatsit, sid_save)
local wm = node_new(id_whatsit, sid_matrix)
setfield(wm, 'data', '0 1 -1 0')
@@ -177,9 +182,9 @@ local function capsule_glyph_tate(p, met, char_data, head, dir)
local k3 = node_new(id_kern, 1); setfield(k3, 'kern', -getfield(p, 'width')-pwnh)
local wr = node_new(id_whatsit, sid_restore)
setfield(box, 'head', ws)
- setfield(ws, 'next', wm); setfield(wm, 'next', k2);
- setfield(k2, 'next', p); setfield(p, 'next', k3);
- setfield(k3, 'next', wr);
+ setnext(ws, wm); setnext(wm, k2);
+ setnext(k2, p); setnext(p, k3);
+ setnext(k3, wr);
set_attr(box, attr_icflag, PACKED)
head = q and node_insert_before(head, q, box)
@@ -200,12 +205,10 @@ local function capsule_glyph_math(p, met, char_data)
setfield(p, 'yoffset', -fshift.down)
setfield(p, 'xoffset', getfield(p, 'xoffset') + char_data.align*(fwidth-pwidth) - fshift.left)
local box = node_new(id_hlist);
- setfield(box, 'width', fwidth)
- setfield(box, 'height', fheight)
- setfield(box, 'depth', fdepth)
+ setwhd(box, fwidth, fheight, fdepth)
setfield(box, 'head', p)
setfield(box, 'shift', y_shift)
- setfield(box, 'dir', tex.mathdir)
+ setdir(box, tex.mathdir)
set_attr(box, attr_icflag, PACKED)
return box
end
@@ -223,7 +226,7 @@ function luatexja.setwidth.apply_ashift_math(head, last, attr_ablshift)
elseif pid==id_rule then
local v = has_attr(p,attr_ablshift) or 0
setfield(p, 'height', getfield(p, 'height')-v)
- setfield(p, 'depth', getfield(p, 'depth')+v)
+ setfield(p, 'depth', getdepth(p)+v)
set_attr(p, attr_icflag, PROCESSED)
elseif pid==id_glyph then
-- 欧文文字; 和文文字は pid == id_hlist の場合で処理される
@@ -248,14 +251,14 @@ do
local y_adjust, node_depth, adj_depth = 0, 0, 0
for lp in node_traverse_id(id_glyph, head) do
y_adjust = has_attr(lp,attr_ablshift) or 0
- node_depth = max(getfield(lp, 'depth') + min(y_adjust, 0), node_depth)
- adj_depth = (y_adjust>0) and max(getfield(lp, 'depth') + y_adjust, adj_depth) or adj_depth
+ local ld = getdepth(lp)
+ node_depth = max(ld + min(y_adjust, 0), node_depth)
+ adj_depth = (y_adjust>0) and max(ld + y_adjust, adj_depth) or adj_depth
setfield(lp, 'yoffset', getfield(lp, 'yoffset') - y_adjust)
end
if adj_depth>node_depth then
local r = node_new(id_rule,rule_subtype)
- setfield(r, 'width', 0); setfield(r, 'height', 0)
- setfield(r, 'depth', adj_depth); setfield(r, 'dir', tex_dir)
+ setwhd(r, 0, 0, adj_depth); setdir(r, tex_dir)
set_attr(r, attr_icflag, PROCESSED)
if field=='post' then
node_insert_after(head, head, r)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua
index b71b6611d3e..c9f80c4686f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-stack.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.stack',
- date = '2014/05/08',
+ date = '2017/05/05',
description = 'LuaTeX-ja stack system',
})
module('luatexja.stack', package.seeall)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
index 6238240d23e..a40613cc775 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsarticle.cls
@@ -837,7 +837,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}%
\begingroup \@svsechd \endgroup
\unskip
\@tempskipa #1\relax
- \hskip -\@tempskipa\@inhibitglue
+ \hskip -\@tempskipa\ltjfakeparbegin
\else
\clubpenalty \@clubpenalty
\everypar{}%
@@ -1402,7 +1402,7 @@ class has defined the old font commands like\MessageBreak
\parindent 1\zw
\noindent
\llap{\@makefnmark\hskip0.3\zw}#1}
-\protected\def\@inhibitglue{\directlua{luatexja.jfmglue.create_beginpar_node()}}
+\let\@inhibitglue=\ltjfakeparbegin
\def\@item[#1]{%
\if@noparitem
\@donoparitem
@@ -1445,7 +1445,7 @@ class has defined the old font commands like\MessageBreak
\else
\clubpenalty \@clubpenalty
\everypar{}%
- \fi\@inhibitglue}%
+ \fi\ltjfakeparbegin}%
\if@noitemarg
\@noitemargfalse
\if@nmbrlist
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
index 35222362cf2..f2169cf0678 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsbook.cls
@@ -852,7 +852,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}%
\begingroup \@svsechd \endgroup
\unskip
\@tempskipa #1\relax
- \hskip -\@tempskipa\@inhibitglue
+ \hskip -\@tempskipa\ltjfakeparbegin
\else
\clubpenalty \@clubpenalty
\everypar{}%
@@ -1495,7 +1495,7 @@ class has defined the old font commands like\MessageBreak
\parindent 1\zw
\noindent
\llap{\@makefnmark\hskip0.3\zw}#1}
-\protected\def\@inhibitglue{\directlua{luatexja.jfmglue.create_beginpar_node()}}
+\let\@inhibitglue=\ltjfakeparbegin
\def\@item[#1]{%
\if@noparitem
\@donoparitem
@@ -1538,7 +1538,7 @@ class has defined the old font commands like\MessageBreak
\else
\clubpenalty \@clubpenalty
\everypar{}%
- \fi\@inhibitglue}%
+ \fi\ltjfakeparbegin}%
\if@noitemarg
\@noitemargfalse
\if@nmbrlist
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
index a05f882104d..f8f52e19208 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjskiyou.cls
@@ -799,7 +799,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}%
\begingroup \@svsechd \endgroup
\unskip
\@tempskipa #1\relax
- \hskip -\@tempskipa\@inhibitglue
+ \hskip -\@tempskipa\ltjfakeparbegin
\else
\clubpenalty \@clubpenalty
\everypar{}%
@@ -1367,7 +1367,7 @@ class has defined the old font commands like\MessageBreak
\parindent 1\zw
\noindent
\llap{\@makefnmark\hskip0.3\zw}#1}
-\protected\def\@inhibitglue{\directlua{luatexja.jfmglue.create_beginpar_node()}}
+\let\@inhibitglue=\ltjfakeparbegin
\def\@item[#1]{%
\if@noparitem
\@donoparitem
@@ -1410,7 +1410,7 @@ class has defined the old font commands like\MessageBreak
\else
\clubpenalty \@clubpenalty
\everypar{}%
- \fi\@inhibitglue}%
+ \fi\ltjfakeparbegin}%
\if@noitemarg
\@noitemargfalse
\if@nmbrlist
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
index 37a1c4dfd11..fefbdd21c2e 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjspf.cls
@@ -727,7 +727,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}%
\begingroup \@svsechd \endgroup
\unskip
\@tempskipa #1\relax
- \hskip -\@tempskipa\@inhibitglue
+ \hskip -\@tempskipa\ltjfakeparbegin
\else
\clubpenalty \@clubpenalty
\everypar{}%
@@ -1261,7 +1261,7 @@ class has defined the old font commands like\MessageBreak
\parindent 1\zw
\noindent
\llap{\@makefnmark\hskip0.3\zw}#1}
-\protected\def\@inhibitglue{\directlua{luatexja.jfmglue.create_beginpar_node()}}
+\let\@inhibitglue=\ltjfakeparbegin
\def\@item[#1]{%
\if@noparitem
\@donoparitem
@@ -1304,7 +1304,7 @@ class has defined the old font commands like\MessageBreak
\else
\clubpenalty \@clubpenalty
\everypar{}%
- \fi\@inhibitglue}%
+ \fi\ltjfakeparbegin}%
\if@noitemarg
\@noitemargfalse
\if@nmbrlist
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls
index 1ab34dd5d6c..4d8c57e17ca 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsreport.cls
@@ -825,7 +825,7 @@ option, since LuaTeX does not support \string\mag\MessageBreak in pdf output}%
\begingroup \@svsechd \endgroup
\unskip
\@tempskipa #1\relax
- \hskip -\@tempskipa\@inhibitglue
+ \hskip -\@tempskipa\ltjfakeparbegin
\else
\clubpenalty \@clubpenalty
\everypar{}%
@@ -1488,7 +1488,7 @@ class has defined the old font commands like\MessageBreak
\parindent 1\zw
\noindent
\llap{\@makefnmark\hskip0.3\zw}#1}
-\protected\def\@inhibitglue{\directlua{luatexja.jfmglue.create_beginpar_node()}}
+\let\@inhibitglue=\ltjfakeparbegin
\def\@item[#1]{%
\if@noparitem
\@donoparitem
@@ -1531,7 +1531,7 @@ class has defined the old font commands like\MessageBreak
\else
\clubpenalty \@clubpenalty
\everypar{}%
- \fi\@inhibitglue}%
+ \fi\ltjfakeparbegin}%
\if@noitemarg
\@noitemargfalse
\if@nmbrlist
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty
index a179013de4d..a8d27a912d1 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-compat.sty
@@ -65,13 +65,13 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-compat}[2015/05/09 Compatibility with pTeX]
+ \ProvidesPackage{luatexja-compat}[2017/05/05 Compatibility with pTeX]
\fi %</LaTeX>
% Load core module if not yet.
\ifx\luatexjacoreLoaded\@undefined
\ifltj@in@latex %<*LaTeX>
- \RequirePackage{luatexja-core}[2013/05/14]
+ \RequirePackage{luatexja-core}
\else %<*!LaTeX>
\input luatexja-core.sty %
\fi %</LaTeX>
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index 6df5aeb25e7..ce109e42706 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}[2016/05/15 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2017/05/05 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -189,7 +189,7 @@
%%%%%%%% Load all sub-packages.
\ifltj@in@latex %<*LaTeX>
- \RequirePackage{ltj-base} [2016/05/15]
+ \RequirePackage{ltj-base}
\else %<*!LaTeX>
\input ltj-base.sty %
\fi %</LaTeX>
@@ -198,23 +198,24 @@
\def\asluastring#1{'\luatexluaescapestring{\detokenize{#1}}'}
%%%%%%%% Redefine \/
-\protected\def\/{\relax\directlua{luatexja.jfont.append_italic()}}
+\newluafunction\ltj@@italic@inner
+\directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@italic@inner] = luatexja.jfont.append_italic
+}
+\protected\def\/{\relax\luafunction\ltj@@italic@inner}
%%%%%%%% \jfont\CS={...:...;jfm=metric;...}, \globaljfont
\protected\def\jfont#1{%
\afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(false, 'yoko','\luatexluaescapestring{\noexpand#1}')}}
\protected\def\globaljfont#1{%
\afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(true, 'yoko','\luatexluaescapestring{\noexpand#1}')}}
-\ifdefined\newluafunction
- \newluafunction\ltj@@jfont@inner
- \directlua{
- local t = lua.get_functions_table()
- t[\the\ltj@@jfont@inner] = luatexja.jfont.jfontdefY
- }
- \def\ltj@@jfont{\luafunction\ltj@@jfont@inner}
-\else
- \def\ltj@@jfont{\directlua{luatexja.jfont.jfontdefY()}}
-\fi
+\newluafunction\ltj@@jfont@inner
+\directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@jfont@inner] = luatexja.jfont.jfontdefY
+}
+\def\ltj@@jfont{\luafunction\ltj@@jfont@inner}
%%%%%%%% \tfont\CS={...:...;jfm=metric;...}, \globaltfont
\protected\def\tfont#1{%
@@ -223,44 +224,38 @@
\afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(true, 'tate','\luatexluaescapestring{\noexpand#1}')}}
%%%%%%%% \zw, \zh
-\ifdefined\newluafunction
- \newluafunction\ltj@zw@inner
- \newluafunction\ltj@zh@inner
- \directlua{
- local t, setdimen, ltjf = lua.get_functions_table(), tex.setdimen, luatexja.jfont
- t[\the\ltj@zw@inner] = function() setdimen('ltj@zw', ltjf.get_zw()) end
- t[\the\ltj@zh@inner] = function() setdimen('ltj@zh', ltjf.get_zh()) end
- }
- \protected\def\zw{\luafunction\ltj@zw@inner\ltj@zw}
- \protected\def\zh{\luafunction\ltj@zh@inner\ltj@zh}
-\else
- \protected\def\zw{\directlua{tex.setdimen('ltj@zw', luatexja.jfont.get_zw())}\ltj@zw}
- \protected\def\zh{\directlua{tex.setdimen('ltj@zh', luatexja.jfont.get_zh())}\ltj@zh}
-\fi
+\newluafunction\ltj@zw@inner
+\newluafunction\ltj@zh@inner
+\directlua{
+ local t, setdimen, ltjf = lua.get_functions_table(), tex.setdimen, luatexja.jfont
+ t[\the\ltj@zw@inner] = function() setdimen('ltj@zw', ltjf.get_zw()) end
+ t[\the\ltj@zh@inner] = function() setdimen('ltj@zh', ltjf.get_zh()) end
+}
+\protected\def\zw{\luafunction\ltj@zw@inner\ltj@zw}
+\protected\def\zh{\luafunction\ltj@zh@inner\ltj@zh}
%%%%%%%% \inhibitglue
-\ifdefined\newluafunction
- \newluafunction\ltj@reset@globaldefs@inner
- \newluafunction\ltj@restore@globaldefs@inner
- \newluafunction\ltj@@ihb@inner
- \directlua{
- local t = lua.get_functions_table()
- t[\the\ltj@reset@globaldefs@inner]
- = function() luatexja.global_temp = tex.globaldefs; tex.globaldefs = 0 end
- t[\the\ltj@restore@globaldefs@inner]
- = function() tex.globaldefs = luatexja.global_temp end
- t[\the\ltj@@ihb@inner] = luatexja.jfmglue.create_inhibitglue_node
- }
- \protected\def\ltj@reset@globaldefs{\luafunction\ltj@reset@globaldefs@inner}
- \protected\def\ltj@restore@globaldefs{\luafunction\ltj@restore@globaldefs@inner}
- \protected\def\inhibitglue{\ifhmode\relax\luafunction\ltj@@ihb@inner\fi}
-\else
- \protected\def\ltj@reset@globaldefs{%
- \directlua{luatexja.global_temp = tex.globaldefs; tex.globaldefs = 0}}
- \protected\def\ltj@restore@globaldefs{\directlua{tex.globaldefs = luatexja.global_temp}\relax}
- \protected\def\inhibitglue{\ifhmode\ltj@@ihb\fi}
- \def\ltj@@ihb{\relax\directlua{luatexja.jfmglue.create_inhibitglue_node()}}
-\fi
+\newluafunction\ltj@reset@globaldefs@inner
+\newluafunction\ltj@restore@globaldefs@inner
+\newluafunction\ltj@@ihb@inner
+\newluafunction\ltj@@fakeparbegin@inner
+\newluafunction\ltj@@fakeboxbdd@inner
+\directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@reset@globaldefs@inner]
+ = function() luatexja.global_temp = tex.globaldefs; tex.globaldefs = 0 end
+ t[\the\ltj@restore@globaldefs@inner]
+ = function() tex.globaldefs = luatexja.global_temp end
+ t[\the\ltj@@ihb@inner] = luatexja.jfmglue.create_inhibitglue_node
+ t[\the\ltj@@fakeparbegin@inner] = luatexja.jfmglue.create_beginpar_node
+ t[\the\ltj@@fakeboxbdd@inner] = luatexja.jfmglue.create_boxbdd_node
+}
+\protected\def\ltj@reset@globaldefs{\luafunction\ltj@reset@globaldefs@inner}
+\protected\def\ltj@restore@globaldefs{\luafunction\ltj@restore@globaldefs@inner}
+\protected\def\inhibitglue{\ifhmode\relax\luafunction\ltj@@ihb@inner\fi}
+\protected\def\ltjfakeparbegin{\ifhmode\relax\luafunction\ltj@@fakeparbegin@inner\fi}
+\protected\def\ltjfakeboxbdd{\ifhmode\relax\luafunction\ltj@@fakeboxbdd@inner\fi}
+
%%%%%%%% \ltjdefcharrange<name>{100-200,3000-,5000,...}
\protected\def\ltjdefcharrange#1#2{%
@@ -384,33 +379,21 @@
% [x]]kanjiskip = <skip>
\define@key[ltj]{japaram}{kanjiskip}{\ltjsetkanjiskip#1}
\define@key[ltj]{japaram}{xkanjiskip}{\ltjsetxkanjiskip#1}
-\ifdefined\newluafunction
- \newluafunction\ltjsetkanjiskip@inner
- \newluafunction\ltjsetxkanjiskip@inner
- \directlua{
- local t, scan_glue = lua.get_functions_table(), token.scan_glue
- local sss, sti = luatexja.stack.set_stack_skip, luatexja.stack_table_index
- t[\the\ltjsetkanjiskip@inner] = function()
- local d = scan_glue(); sss(sti.KSK, d); node.free(d)
- end
- t[\the\ltjsetxkanjiskip@inner] = function()
- local d = scan_glue(); sss(sti.XSK, d); node.free(d)
- end
- }
- \protected\def\ltjsetkanjiskip{\luafunction\ltjsetkanjiskip@inner}
- \protected\def\ltjsetxkanjiskip{\luafunction\ltjsetxkanjiskip@inner}
-\else
- \protected\def\ltjsetkanjiskip{% % SKIP
- \directlua{%
- local d = token.scan_glue()
- luatexja.stack.set_stack_skip(luatexja.stack_table_index.KSK, d); node.free(d)
- }}
- \protected\def\ltjsetxkanjiskip{% % SKIP
- \directlua{%
- local d = token.scan_glue()
- luatexja.stack.set_stack_skip(luatexja.stack_table_index.XSK, d); node.free(d)
- }}
-\fi
+\newluafunction\ltjsetkanjiskip@inner
+\newluafunction\ltjsetxkanjiskip@inner
+\directlua{
+ local t, scan_glue = lua.get_functions_table(), token.scan_glue
+ local sss, sti = luatexja.stack.set_stack_skip, luatexja.stack_table_index
+ t[\the\ltjsetkanjiskip@inner] = function()
+ local d = scan_glue(); sss(sti.KSK, d); node.free(d)
+ end
+ t[\the\ltjsetxkanjiskip@inner] = function()
+ local d = scan_glue(); sss(sti.XSK, d); node.free(d)
+ end
+}
+\protected\def\ltjsetkanjiskip{\luafunction\ltjsetkanjiskip@inner}
+\protected\def\ltjsetxkanjiskip{\luafunction\ltjsetxkanjiskip@inner}
+
% jcharwidowpenalty = <count>
\define@key[ltj]{japaram}{jcharwidowpenalty}{% %COUNT
\ltj@@set@stack{JWP}{-10000}{10000}\z@#1 }
@@ -611,76 +594,42 @@
}
\setbox\z@\box\voidb@x
\ifltj@everyhook@avail% using everyhook package
- \ifdefined\newluafunction
- \newluafunction\ltj@@box@dirhook
- \directlua{
- local t, ltjd = lua.get_functions_table(), luatexja.direction
- t[\the\ltj@@box@dirhook]
- = function() ltjd.set_list_direction_hook() end
- }
+ \newluafunction\ltj@@box@dirhook
+ \directlua{
+ local t, ltjd = lua.get_functions_table(), luatexja.direction
+ t[\the\ltj@@box@dirhook]
+ = function() ltjd.set_list_direction_hook() end
+ }
\PushPreHook{hbox}{\luafunction\ltj@@box@dirhook\aftergroup\ltj@@reset@badness}
\PushPreHook{vbox}{\luafunction\ltj@@box@dirhook\aftergroup\ltj@@reset@badness}
- \else
- \PushPreHook{hbox}{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- }
- \PushPreHook{vbox}{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- }
- \fi
\else
\let\ltj@@everyhbox=\everyhbox\let\ltj@@everyvbox=\everyvbox
\newtoks\ltj@@i@everyhbox\newtoks\ltj@@i@everyvbox
\let\everyhbox=\ltj@@i@everyhbox\let\everyvbox=\ltj@@i@everyvbox
- \ifdefined\newluafunction
- \newluafunction\ltj@@box@dirhook
- \directlua{
- local t, ltjd = lua.get_functions_table(), luatexja.direction
- t[\the\ltj@@box@dirhook]
- = function() ltjd.set_list_direction_hook() end
- }
- \ltj@@everyhbox{\luafunction\ltj@@box@dirhook
- \aftergroup\ltj@@reset@badness\the\ltj@@i@everyhbox}
- \ltj@@everyvbox{\luafunction\ltj@@box@dirhook
- \aftergroup\ltj@@reset@badness\the\ltj@@i@everyvbox}
- \else
- \ltj@@everyhbox{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- \the\ltj@@i@everyhbox}
- \ltj@@everyvbox{%
- \directlua{luatexja.direction.set_list_direction_hook()}%
- \aftergroup\ltj@@reset@badness
- \the\ltj@@i@everyvbox}
- \fi
-\fi
-
-\ifdefined\newluafunction
- \newluafunction\ltj@@reset@badness@inner
+ \newluafunction\ltj@@box@dirhook
\directlua{
- local t = lua.get_functions_table()
- t[\the\ltj@@reset@badness@inner] = function()
- if luatexja.global_temp then
- tex.hbadness= tex.hbadness or luatexja.hbadness_temp
- tex.vbadness= tex.vbadness or luatexja.vbadness_temp
- tex.globaldefs= luatexja.global_temp or tex.globaldefs
- end
- end}
- \protected\def\ltj@@reset@badness{\luafunction\ltj@@reset@badness@inner}
-\else
- \protected\def\ltj@@reset@badness{%
- \directlua{%
- if luatexja.global_temp then
- tex.hbadness= tex.hbadness or luatexja.hbadness_temp
- tex.vbadness= tex.vbadness or luatexja.vbadness_temp
- tex.globaldefs= luatexja.global_temp or tex.globaldefs
- end
- }%
+ local t, ltjd = lua.get_functions_table(), luatexja.direction
+ t[\the\ltj@@box@dirhook]
+ = function() ltjd.set_list_direction_hook() end
}
+ \ltj@@everyhbox{\luafunction\ltj@@box@dirhook
+ \aftergroup\ltj@@reset@badness\the\ltj@@i@everyhbox}
+ \ltj@@everyvbox{\luafunction\ltj@@box@dirhook
+ \aftergroup\ltj@@reset@badness\the\ltj@@i@everyvbox}
\fi
+\newluafunction\ltj@@reset@badness@inner
+\directlua{
+ local t = lua.get_functions_table()
+ t[\the\ltj@@reset@badness@inner] = function()
+ if luatexja.global_temp then
+ tex.hbadness= tex.hbadness or luatexja.hbadness_temp
+ tex.vbadness= tex.vbadness or luatexja.vbadness_temp
+ tex.globaldefs= luatexja.global_temp or tex.globaldefs
+ end
+ end}
+\protected\def\ltj@@reset@badness{\luafunction\ltj@@reset@badness@inner}
+
\AtBeginShipout{\directlua{luatexja.direction.finalize()}}
%%%% \raise, \lower, \moveleft, \moveright
@@ -765,7 +714,7 @@
%%------------------ Load module for the format
\ifltj@in@latex %<*LaTeX>
- \RequirePackage{ltj-latex}[2016/05/15]
+ \RequirePackage{ltj-latex}
\else\ifltj@in@plain %<*plain>
\input ltj-plain.sty %
\fi\fi %</LaTeX|plain>
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
index b966e8393bd..28c1a98d913 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
@@ -82,6 +82,7 @@ userid_table.IHB = luatexbase.newuserwhatsitid('inhibitglue', 'luatexja') -- \
userid_table.STCK = luatexbase.newuserwhatsitid('stack_marker', 'luatexja') -- スタック管理
userid_table.BPAR = luatexbase.newuserwhatsitid('begin_par', 'luatexja') -- 「段落始め」
userid_table.DIR = luatexbase.newuserwhatsitid('direction', 'luatexja') -- 組方向
+userid_table.BOXB = luatexbase.newuserwhatsitid('box_boundary', 'luatexja') -- 「ボックス始め・終わり」
local dir_table = {}
luatexja.dir_table = dir_table
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
index fe5cf235f5a..4dc2125e6df 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
@@ -34,16 +34,18 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2016/05/12 Japanese Typesetting with Lua(La)TeX]
+ \ProvidesPackage{luatexja}[2017/05/05 Japanese Typesetting with Lua(La)TeX]
\fi %</LaTeX>
+%%%% VERSION
+\def\LuaTeXjaversion{20170505.0}
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
%% Load all sub-packages.
\ifltj@in@latex %<*LaTeX>
%% \RequirePackage{expl3} needed if the version of l3kernel is v6111
- \RequirePackage{luatexja-core} [2016/05/15]
- \RequirePackage{luatexja-compat}[2013/05/14]
+ \RequirePackage{luatexja-core}
+ \RequirePackage{luatexja-compat}
\else %<*!LaTeX>
\input luatexja-core.sty %
\input luatexja-compat.sty %
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
index 4b9a9c967db..2e0be5dc847 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2017/03/12 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2017/05/05 Patch to LaTeX2e Kernel for LuaTeX-ja]
\def\cleardoublepage{\clearpage\if@twoside
\ifodd\c@page
@@ -290,5 +290,18 @@
\ignorespaces
\fi}
+\def\@no@lnbk #1[#2]{%
+ \ifvmode
+ \@nolnerr
+ \else
+ \@tempskipa\lastskip
+ \unskip
+ \penalty #1\@getpen{#2}%
+ \hskip\z@\relax %% added (2017/05/03)
+ \ifdim\@tempskipa>\z@
+ \hskip\@tempskipa
+ \ignorespaces
+ \fi
+ \fi}
\endinput
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
index f9629cc82b1..837e2ac1ec8 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}[2016/05/05 Default font settings of LuaTeX-ja]
+\ProvidesPackage{lltjdefs}[2017/05/05 Default font settings of LuaTeX-ja]
\def\ltj@stdmcfont{IPAExMincho}
\def\ltj@stdgtfont{IPAExGothic}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
index f55a93f0d52..cfff0f06b7c 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}[2017/04/01 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2017/05/05 Patch to NFSS2 for LuaTeX-ja]
\def\ltj@chardef@text@cmd#1{%
\let\@ifdefinable\@@ifdefinable%
@@ -405,65 +405,40 @@
\@height.7\baselineskip \@depth.3\baselineskip}%
\let\size@update\relax}}
-\ifdefined\newluafunction
- \newluafunction\ltj@@adjust@baseline@inner
- \begingroup\catcode`\~=12
- \directlua{%
- local nulltable = {}
- local t = lua.get_functions_table()
- local getfont, dir_tate = font.getfont, luatexja.dir_table.dir_tate
- local fmt, get_attr = luatexja.jfont.font_metric_table, tex.getattribute
- local setdimen, set_attr = tex.setdimen, tex.setattribute
- local dir = luatexja.unary_pars.direction
- t[\the\ltj@@adjust@baseline@inner] = function()
- local ft = fmt[get_attr('ltj@curtfnt')] or nulltable
+\newluafunction\ltj@@adjust@baseline@inner
+\begingroup\catcode`\~=12
+\directlua{%
+ local nulltable = {}
+ local t = lua.get_functions_table()
+ local getfont, dir_tate = font.getfont, luatexja.dir_table.dir_tate
+ local fmt, get_attr = luatexja.jfont.font_metric_table, tex.getattribute
+ local setdimen, set_attr = tex.setdimen, tex.setattribute
+ local dir = luatexja.unary_pars.direction
+ t[\the\ltj@@adjust@baseline@inner] = function()
+ local ft = fmt[get_attr('ltj@curtfnt')] or nulltable
+ ft = ft and ft.char_type or nulltable
+ local fk = ft and ft[0] or nulltable
+ local ht, dp, wd = fk.height or 0, fk.depth or 0,
+ fk.width or ft.zw or 0
+ local fm
+ = ((getfont(font.current()) or nulltable)
+ .characters or nulltable)[77] or nulltable %% 'M'
+ set_attr('ltj@tablshift',
+ 0.5*((fm.height or 0)- (fm.depth or 0) - ht+ dp))
+ if dir() ~= dir_tate then
+ ft = fmt[get_attr('ltj@curjfnt')] or nulltable
ft = ft and ft.char_type or nulltable
- local fk = ft and ft[0] or nulltable
- local ht, dp, wd = fk.height or 0, fk.depth or 0,
- fk.width or ft.zw or 0
- local fm
- = ((getfont(font.current()) or nulltable)
- .characters or nulltable)[77] or nulltable %% 'M'
- set_attr('ltj@tablshift',
- 0.5*((fm.height or 0)- (fm.depth or 0) - ht+ dp))
- if dir() ~= dir_tate then
- ft = fmt[get_attr('ltj@curjfnt')] or nulltable
- ft = ft and ft.char_type or nulltable
- fk = ft and ft[0] or nulltable
- ht, dp, wd = fk.height or 0, fk.depth or 0,
- fk.width or ft.zw or 0
- end
- setdimen('cht', ht); setdimen('cdp', dp)
- setdimen('cwd', wd); setdimen('chs', wd)
- setdimen('cHT', ht+dp)
+ fk = ft and ft[0] or nulltable
+ ht, dp, wd = fk.height or 0, fk.depth or 0,
+ fk.width or ft.zw or 0
end
- }\endgroup
- \def\adjustbaseline{\luafunction\ltj@@adjust@baseline@inner
- \cvs\normalbaselineskip}
-\else
- \newbox\adjust@box
- \newbox\adjust@box@aux
- \newdimen\adjust@dimen
- \def\adjustbaseline{%
- \setbox\adjust@box\hbox{%
- \ltj@ykblshift\z@\ltj@tkblshift\z@ 漢}%
- \cht\ht\adjust@box
- \cdp\dp\adjust@box
- \cwd\wd\adjust@box
- \cvs\normalbaselineskip
- \chs\cwd
- \cHT\cht \advance\cHT\cdp
- \setbox\adjust@box@aux\hbox{\tate\ltj@tkblshift\z@ 漢}%
- \setbox\adjust@box\hbox{\tate\ltj@tablshift\z@ M}%
- \adjust@dimen\ht\adjust@box
- \advance\adjust@dimen\dp\adjust@box
- \advance\adjust@dimen-\ht\adjust@box@aux
- \divide\adjust@dimen\tw@
- \advance\adjust@dimen0.5\dp\adjust@box@aux
- \advance\adjust@dimen-\dp\adjust@box
- \ltj@tablshift=\adjust@dimen
- }
-\fi
+ setdimen('cht', ht); setdimen('cdp', dp)
+ setdimen('cwd', wd); setdimen('chs', wd)
+ setdimen('cHT', ht+dp)
+ end
+}\endgroup
+\def\adjustbaseline{\luafunction\ltj@@adjust@baseline@inner
+ \cvs\normalbaselineskip}
\DeclareRobustCommand\romanencoding[1]{%
\expandafter\ifx\csname T@#1\endcsname\relax
\@latex@error{Encoding scheme `#1' unknown}\@eha
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty
index f0b0cacb627..19478aca489 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec-immediate.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-fontspec-immediate}[2017/01/28 Patch to fontspec for LuaTeX-ja]
+%%% \ProvidesPackage{lltjp-fontspec-immediate}[2017/01/28 Patch to fontspec for LuaTeX-ja]
\RequirePackage{fontspec,luatexja}
\ExplSyntaxOn
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
index db5dae7d9d6..fbc5a5f2298 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-fontspec.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-fontspec}[2017/01/28 Patch to fontspec for LuaTeX-ja]
+\ProvidesPackage{lltjp-fontspec}[2017/05/05 Patch to fontspec for LuaTeX-ja]
\RequirePackage{fontspec,luatexja}
\ExplSyntaxOn
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
index 00143c1927e..f74c4963082 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-footmisc}[2017/01/19 Patch to footmisc for LuaTeX-ja]
+\ProvidesPackage{lltjp-footmisc}[2017/05/05 Patch to footmisc for LuaTeX-ja]
\RequirePackage{footmisc}
\let \if@tempswa \ifFN@bottom
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 9ebda8a4e4f..14e46b3bd67 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}[2016/10/06 Patch to geometry for LuaTeX-ja with vertical writing mode]
+\ProvidesPackage{lltjp-geometry}[2017/05/05 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 9a5d9d2cbbc..e0470a2cbee 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}[2016/03/31 Patch to listings for LuaTeX-ja]
+\ProvidesPackage{lltjp-listings}[2017/05/05 Patch to listings for LuaTeX-ja]
\RequirePackage{listings,luatexbase-cctb}
%%%%%%%%%%%%%%%% Japanese support
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
index 9a28df57e9c..34228479510 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-stfloats}[2017/02/19 Patch to stfloats for LuaTeX-ja]
+\ProvidesPackage{lltjp-stfloats}[2017/05/05 Patch to stfloats for LuaTeX-ja]
\RequirePackage{stfloats,luatexja}
\RequirePackage{etoolbox}
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 abe7d23c29f..b351cfe01d8 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-tascmac.sty
@@ -7,7 +7,7 @@
% \dimen...=\ybaselineshift ==> \dimen...=\ltj@yablshift sp
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-tascmac}[2016/05/05 Patch to (t)ascmac for LuaTeX-ja]
+\ProvidesPackage{lltjp-tascmac}[2017/05/05 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 b6d17a6031f..ec5aecfdd77 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,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-unicode-math}[2015/10/28 Patch to unicode-math for LuaTeX-ja]
+\ProvidesPackage{lltjp-unicode-math}[2017/05/05 Patch to unicode-math for LuaTeX-ja]
\RequirePackage{unicode-math,luatexja}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty
index 1803cad8a9b..e35fe43664f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-xunicode.sty
@@ -3,7 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-xunicode}[2017/01/19 Patch to xunicode for LuaTeX-ja]
+\ProvidesPackage{lltjp-xunicode}[2017/05/05 Patch to xunicode for LuaTeX-ja]
\def\XeTeXpicfile{}
\RequirePackage{xunicode,luatexja}