summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-01 21:06:45 +0000
committerKarl Berry <karl@freefriends.org>2020-10-01 21:06:45 +0000
commit712f58696c39093fb1ac5a01924543854213c91f (patch)
tree4bb1f5e1bc09139b98833e50e1b20ec94a688f90
parentee7478f7b92a16668c1dcd3131a7ddb48391cae8 (diff)
luatexja (1oct20)
git-svn-id: svn://tug.org/texlive/trunk@56505 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/README8
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdfbin400357 -> 400713 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdfbin700835 -> 702575 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdfbin1116496 -> 1137276 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx93
-rw-r--r--Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx19
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/lltjext.sty10
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua20
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua31
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty24
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls8
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty12
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.lua5
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/luatexja.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty68
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty22
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty254
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty50
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty19
38 files changed, 469 insertions, 246 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README
index 1dd9fa36771..3109243a2ee 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/README
+++ b/Master/texmf-dist/doc/luatex/luatexja/README
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20200919.0
+The LuaTeX-ja Package 20201001.0
--------------------------------
Copyright (c) 2011--2020 The LuaTeX-ja project
License: modified BSD (see COPYING)
@@ -45,9 +45,9 @@ Installation
2. If you must/want to install manually:
a. Download the source archive from CTAN,
- or tagged as 20200919.0 in the Git repository by
+ or tagged as 20201001.0 in the Git repository by
<http://git.osdn.jp/view?p=luatex-ja/luatexja.git
- ;a=snapshot;h=refs/tags/20200919.0;sf=tgz>
+ ;a=snapshot;h=refs/tags/20201001.0;sf=tgz>
b. Extract the archive and process following three files by LuaLaTeX
to generate classes for Japanese typesetting:
@@ -96,4 +96,4 @@ Notes
This file and ltj-kinsoku.lua are not used anymore.
(Do not remove ltj-kinsoku.tex.)
-Last commit date: Sat Sep 19 20:08:05 2020 +0900
+Last commit date: Thu Oct 1 04:19:14 2020 +0900
diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf
index f46b1a5913d..37e43d896fa 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
index 10781331bf5..ee8235c8466 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
index af102192214..34affff76a4 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
index 7dd5bf91e4e..18379733c55 100644
--- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
+++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
@@ -170,7 +170,7 @@
%%%%%%%% other macros
\newlist{cslist}{description}{2}
\setlist[cslist]{%
- style=nextline,font=\bfseries\ttfamily,
+ style=nextline,font=\mdseries\ttfamily,
before*=\def\<{\char`\<}\def\>{\char`\>}\def\{{\char`\{}\def\}{\char`\}},
topsep=\medskipamount,
%<ja> leftmargin=2\zw,
@@ -648,6 +648,8 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}.
%<ja>\LuaTeX-jaパッケージの動作には次のパッケージ類が必要である.
\begin{itemize}
\item \href{http://www.luatex.org/}{\LuaTeX}\ 1.10.0 (or later)
+%<en> (DVI output (\cs{outputmode=0} is not supported.)
+%<ja> (DVI出力(\cs{outputmode=0})は対応していない.)
\item recent \href{https://github.com/latex3/luaotfload}{\Pkg{luaotfload}} (v3.1 or later recommended)
\item \Pkg{adobemapping} (Adobe cmap and pdfmapping files)
\item \LaTeX\ 2020-02-02 patch level 5 or later
@@ -3290,7 +3292,7 @@ These commands set the dimension of \cs{box<num>}. One does not need
\ltjsetwd42 20pt, \ltjsetwd42=20pt, \ltjsetwd=42 20pt, \ltjsetwd=42=20pt
\end{lstlisting}
-設定値は「横組」「縦組及びutod方向」「dtou方向」
+設定値は「横組」「縦組またはutod方向」「dtou方向」
の3種ごとに独立して記録される.参考として,Gitリポジトリ内の
\verb+test/test55-boxdim_diffdir.{tex,pdf}+ を挙げておく.
@@ -5790,7 +5792,7 @@ of the result of \cs{kansuji}<digit>.
%<*en>
\verb+\ltjgetparameter{adjustdir}+ returns a integer which represents
the direction of the surrounding vertical list.
-As \Param{direction}, the return value 1 means \emph{down-to-up} direction,
+As \Param{direction}, the return value 1 means \emph{dtou} direction,
3 means \emph{tate} direction (vertical typesetting),
and 4 means \emph{yoko} direction (horizontal typesetting).
%</en>
@@ -5804,12 +5806,12 @@ and 4 means \emph{yoko} direction (horizontal typesetting).
\item
%<*en>
For an integer~<reg\_num> between 0~and~65535,
-\verb+\ltjgetparameter{boxdim}{+<reg\_num>\verb+}+ returns the direction of
+\verb+\ltjgetparameter{boxdir}{+<reg\_num>\verb+}+ returns the direction of
\cs{box}<reg\_num>. If this box register is void, the returned value is zero.
%</en>
%<*ja>
0--65535の数<reg\_num>に対して,
-\verb+\ltjgetparameter{boxdim}{+<reg\_num>\verb+}+ は,\cs{box}<reg\_num>に
+\verb+\ltjgetparameter{boxdir}{+<reg\_num>\verb+}+ は,\cs{box}<reg\_num>に
格納されているボックスの組方向を表す.もしこのレジスタが空の場合は,0が返される.
%</ja>
@@ -6310,7 +6312,7 @@ to reduce the number of loaded fonts.
This will save time for typesetting and memory consumption of Lua side (\cite{tc18ltja}).
\begin{itemize}
- \item \cs{selectfont} loads (and chooses) only the Japanese font for current direction,
+ \item \cs{selectfont} loads (and chooses) only the Japanese font for the current direction,
and does not load the Japanese font for other direction
(\LuaTeX-ja only detects its size and JFM, to calculate the amount of shifting the baseline).
@@ -6953,6 +6955,85 @@ Similarly, \cs{strut} now uses one of these boxes.
%</ja>
%<*en>
+\section{expl3 interface}
+This section describes expl3 interfaces provided by \LuaTeX-ja.
+All of them belong to te \texttt{platex} module, since they are provided for compatibility with Japanese \pLaTeX.
+Note that commands which are marked with dagger (``\dagger'') are additions by \LuaTeX-ja.
+%</en>
+%<*ja>
+\section{expl3形式の命令}
+expl3の文法に沿った組方向変更命令や組方向による条件判断文である.
+これらは\pLaTeX との互換性の為に用意されているので,\texttt{platex}モジュールとして定義されている.
+なお,``\dagger''がついている命令は\LuaTeX-ja独自のものである.
+%</ja>
+\begin{cslist}
+ \item[\cs{platex\_direction\_yoko:}\textrm{, }\cs{platex\_direction\_tate:}\textrm{, }\cs{platex\_direction\_dtou:}]
+%<ja> それぞれ\cs{yoko},~\cs{tate},~\cs{dtou}と同義.
+%<en> Synonyms for \cs{yoko},~\cs{tate}~and~\cs{dtou}, respectively.
+ \item[\cs{platex\_if\_direction\_yoko\_p:}]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_direction\_yoko:\underline{\textsl{TF}}} \{<true code>\} \{<false code>\}]
+%<ja> 現在の組方向が横組であるか否かをテストする.
+%<en> Tests if the current direction is \emph{yoko} (horizontal writing).
+ \item[\cs{platex\_if\_direction\_tate\_nomath\_p:}$^\dagger$]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_direction\_tate\_nomath:\underline{\textsl{TF}}}$^\dagger$ \{<true code>\} \{<false code>\}]
+%<ja> 現在の組方向が縦組であるか否かをテストする.
+%<en> Tests if the current direction is \emph{tate} (vertical writing).
+ \item[\cs{platex\_if\_direction\_tate\_math\_p:}$^\dagger$]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_direction\_tate\_math:\underline{\textsl{TF}}}$^\dagger$ \{<true code>\} \{<false code>\}]
+%<ja> 現在の組方向がutod方向(\pTeX でいう「縦数式ディレクション」)であるか否かをテストする.
+%<en> Tests if the current direction is \emph{utod}.
+ \item[\cs{platex\_if\_direction\_tate\_p:}]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_direction\_tate:\underline{\textsl{TF}}} \{<true code>\} \{<false code>\}]
+%<ja> 現在の組方向が縦組またはutod方向であるか否かをテストする.
+%<en> Tests if the current direction is \emph{tate}~or~\emph{utod}.
+ \item[\cs{platex\_if\_direction\_dtou\_p:}]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_direction\_dtou:\underline{\textsl{TF}}} \{<true code>\} \{<false code>\}]
+%<ja> 現在の組方向がdtou方向であるか否かをテストする.
+%<en> Tests if the current direction is \emph{dtou}.
+ \item[\cs{platex\_if\_box\_yoko\_p:N} <box>]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_box\_yoko:N\underline{\textsl{TF}}} <box> \{<true code>\} \{<false code>\}]
+%<ja> ボックス<box>の組方向が横組であるか否かをテストする.
+%<en> Tests if the direction of <box> is \emph{yoko}.
+ \item[\cs{platex\_if\_box\_tate\_nomath\_p:N}$^\dagger$ <box>]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_box\_tate\_nomath:N\underline{\textsl{TF}}}$^\dagger$ <box> \{<true code>\} \{<false code>\}]
+%<ja> ボックス<box>の組方向が縦組であるか否かをテストする.
+%<en> Tests if the direction of <box> is \emph{tate}.
+ \item[\cs{platex\_if\_box\_tate\_math\_p:N}$^\dagger$ <box>]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_box\_tate\_math:N\underline{\textsl{TF}}}$^\dagger$ <box> \{<true code>\} \{<false code>\}]
+%<ja> ボックス<box>の組方向がutod方向であるか否かをテストする.
+%<en> Tests if the direction of <box> is \emph{utod}.
+ \item[\cs{platex\_if\_box\_tate\_p:N} <box>]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+ \item[\cs{platex\_if\_box\_tate:N\underline{\textsl{TF}}} <box> \{<true code>\} \{<false code>\}]
+%<ja> ボックス<box>の組方向が縦組またはutod方向であるか否かをテストする.
+%<en> Tests if the direction of <box> is \emph{tate}~or~\emph{utod}.
+ \item[\cs{platex\_if\_box\_dtou\_p:N} <box>]
+%<en>\ \\[\dimexpr-\medskipamount-2\baselineskip\relax]
+%<ja>\ \\[\dimexpr-2\baselineskip\relax]
+\item[\cs{platex\_if\_box\_dtou:N\underline{\textsl{TF}}} <box> \{<true code>\} \{<false code>\}]
+%<ja> ボックス<box>の組方向がdtou方向であるか否かをテストする.
+%<en> Tests if the direction of <box> is \emph{dtou}.
+\end{cslist}
+
+
+%<*en>
\section{Addon packages}
\LuaTeX-ja has several addon packages.
These addons are written as \LaTeX\ packages, but
diff --git a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
index a868bcb58eb..a9c24bb5b99 100644
--- a/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
+++ b/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
@@ -134,6 +134,9 @@
% 句読点を「、」「。」に統一。}
% \changes{v1.8e-ltj-19}{2020/07/27}{|everyshi|パッケージへのパッチを別パッケージへ分離。}
% \changes{v1.8e-ltj-20}{2020/08/03}{\LaTeX~2020-10-01への対応.}
+% \changes{v1.8f}{2020/09/30}{add a fourth argument for better
+% hyperref compability
+% (sync with ltsect.dtx 2020/07/27 v1.1e)}
% \fi
%
% \iffalse
@@ -163,7 +166,7 @@
%<11pt&bk>\ProvidesFile{ltjtbk11.clo}
%<12pt&bk>\ProvidesFile{ltjtbk12.clo}
%</tate>
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
%<article|report|book> Standard LuaLaTeX-ja class]
%<10pt|11pt|12pt> Standard LuaLaTeX-ja file (size option)]
%<*driver>
@@ -4140,21 +4143,23 @@
%
% \begin{macro}{\addcontentsline}
% 縦組の場合にページ番号を|\rensuji|で囲むように変更します。
-% ^^A 横組のときにも`|\rensuji|'コマンドが出力されますが、
-% ^^A このコマンドによる影響はありません。
%
% このマクロは\file{ltsect.dtx}で定義されています。
+% ^^A 命令 |\addcontentsline| と |\addtocontents| を組み合わせ
% \changes{v1.8a}{2018/10/25}{ファイル書き出し時の行末文字対策
% (sync with ltsect.dtx 2018/09/26 v1.1c)}
+% \changes{v1.8f}{2020/09/30}{add a fourth argument for better
+% hyperref compability
+% (sync with ltsect.dtx 2020/07/27 v1.1e)}
% \begin{macrocode}
\providecommand*\protected@file@percent{}
\def\addcontentsline#1#2#3{%
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
-%<tate> \@temptokena{\rensuji{\thepage}}}%
-%<yoko> \@temptokena{\thepage}}%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+%<tate> \@temptokena{\rensuji{\thepage}}%
+%<yoko> \@temptokena{\thepage}%
+ }{\string\@writefile{#1}%
+ {\protect\contentsline{#2}{#3}{\the\@temptokena}{}%
\protected@file@percent}}%
}
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty b/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
index fa3d0720b04..9fe18f4f016 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}[2019/09/25 v1.2k-ltj-11 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2020-09-30 v1.2k-ltj-12 Macros for vertical writing]
\RequirePackage{luatexja}
\newcount\ltj@ext@dir
\let\ltj@lltjext@orig@tabular=\tabular
@@ -538,9 +538,17 @@
\else \let\box@dir\utod
\fi
\fi
+\ifltj@ltfilehook@avail % LaTeX2e >= 2020-10-01
+ \@defaultunitsset\@picht{#3}\unitlength
+ \@defaultunitsset\@picwd{#2}\unitlength
+ \setbox\@picbox\hbox to\@picwd\bgroup\box@dir
+ \@defaultunitsset\@tempdimc{#4}\unitlength\hskip-\@tempdimc
+ \@defaultunitsset\@tempdimc{#5}\unitlength\lower\@tempdimc\hbox\bgroup
+\else % <= 2020-02-02
\@picwd=#2\unitlength \@picht=#3\unitlength
\setbox\@picbox\hbox to\@picwd\bgroup\box@dir
\hskip-#4\unitlength\lower#5\unitlength\hbox\bgroup
+\fi
\ltj@@pic@reset@blshift
\ignorespaces}
\def\endpicture{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
index 84249a7ad1b..0bbf7249e51 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
@@ -178,7 +178,7 @@ local function check_box(box_ptr, box_end)
local pid = getid(p)
if pid==id_kern and getsubtype(p)==2 then
p = node_next(node_next(node_next(p))); pid = getid(p) -- p must be glyph_node
- end
+ end
if pid==id_glyph then
repeat
if find_first_char then first_char = p; find_first_char = false end
@@ -268,7 +268,7 @@ local function check_next_ickern(lp)
local lx = Np.nuc
while lp and getid(lp) == id_kern and ( getsubtype(lp)==0 or
getsubtype(lp)==3 or ITALIC == get_attr_icflag(lp)) do
- set_attr(lp, attr_icflag, IC_PROCESSED);
+ set_attr(lp, attr_icflag, IC_PROCESSED)
lx, lp = lp, node_next(lp)
end
Np.last = lx; return lp
@@ -279,7 +279,7 @@ local function calc_np_pbox(lp, last)
--local lpa = get_attr_icflag(lp)==PACKED and PACKED or KINSOKU -- KINSOKU: dummy
local lpa = get_attr_icflag(lp)
Np.first = Np.first or lp; Np.id = id_pbox
- set_attr(lp, attr_icflag, get_attr_icflag(lp));
+ set_attr(lp, attr_icflag, get_attr_icflag(lp))
while lp ~=last and (lpa>=PACKED) and (lpa<BOXBDD) do
local lpi = getid(lp)
if lpa==PACKED then
@@ -340,9 +340,9 @@ function calc_np_aux_glyph_common(lp, acc_flag)
local y_adjust = has_attr(lp,attr_ablshift) or 0
local node_depth = getfield(lp, 'depth') + min(y_adjust, 0)
local adj_depth = (y_adjust>0) and (getfield(lp, 'depth') + y_adjust) or 0
- setfield(lp, 'yoffset', getfield(lp, 'yoffset') - y_adjust)
- lp = node_next(lp)
- for lx in traverse(lp) do
+ setfield(lp, 'yoffset', getfield(lp, 'yoffset') - y_adjust); lp = node_next(lp)
+ local lx=lp
+ while lx do
local lai = get_attr_icflag(lx)
if lx==last or lai>=PACKED then
lp=lx; break
@@ -354,7 +354,7 @@ function calc_np_aux_glyph_common(lp, acc_flag)
y_adjust = has_attr(lx,attr_ablshift) or 0
node_depth = max(getfield(lx, 'depth') + min(y_adjust, 0), node_depth)
adj_depth = (y_adjust>0) and max(getfield(lx, 'depth') + y_adjust, adj_depth) or adj_depth
- setfield(lx, 'yoffset', getfield(lx, 'yoffset') - y_adjust)
+ setfield(lx, 'yoffset', getfield(lx, 'yoffset') - y_adjust); lx = node_next(lx)
elseif lid==id_kern then
local ls = getsubtype(lx)
if ls==2 then -- アクセント用の kern
@@ -367,9 +367,9 @@ function calc_np_aux_glyph_common(lp, acc_flag)
end
lx = node_next(node_next(lx))
elseif ls==0 then
- Np.last = lx
+ Np.last = lx; lx = node_next(lx)
elseif (ls==3) or (lai==ITALIC) then
- Np.last = lx; set_attr(lx, attr_icflag, IC_PROCESSED)
+ Np.last = lx; set_attr(lx, attr_icflag, IC_PROCESSED); lx = node_next(lx)
else
lp=lx; break
end
@@ -1235,8 +1235,6 @@ end
-- main interface
function luatexja.jfmglue.main(ahead, mode, dir)
if not ahead then return ahead end
- --luatexja.ext_show_node_list(to_node(ahead ), '>B ', print)
- --print()
head = ahead;
local lp, last, par_indented, TEMP = init_var(mode,dir)
lp = calc_np(last, lp)
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
index d95b34a5115..6b7667a0d16 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
@@ -280,6 +280,7 @@ end
------------------------------------------------------------------------
local load_jfont_metric, check_callback_order
+local font_extra_info = {} -- defined later
do
local cstemp
local global_flag -- true if \globaljfont, false if \jfont
@@ -314,6 +315,7 @@ do
luatexbase.create_callback("luatexja.define_jfont", "data", function (ft, fn) return ft end)
-- EXT
+ local fastcopy=table.fastcopy
function luatexja.jfont.jfontdefY()
local j = load_jfont_metric(jfm_dir)
local fn = font.id(cstemp)
@@ -337,9 +339,13 @@ do
kanjiskip = sz.kanjiskip, xkanjiskip = sz.xkanjiskip,
chars_cbcache = {},
vert_activated = vert_activated,
+ rotation = fastcopy(font_extra_info[fn].rotation),
}
if auto_enable_vrt2 then
- ltju.enable_feature(fn, ltju.exist_feature(fn, 'vrt2') and 'vrt2' or 'vert')
+ local vert_name = ltju.exist_feature(fn, 'vrt2') and 'vrt2' or 'vert'
+ local rot = fmtable.rotation
+ ltju.enable_feature(fn, vert_name)
+ ltju.loop_over_feat(f, {[vert_name]=true}, function (i,k) rot[i] = nil end)
end
fmtable = luatexbase.call_callback("luatexja.define_jfont", fmtable, fn)
@@ -775,8 +781,7 @@ end
------------------------------------------------------------------------
-- 追加のフォント情報
------------------------------------------------------------------------
-local font_extra_info = {}
-luatexja.jfont.font_extra_info= font_extra_info -- key: fontnumber
+luatexja.jfont.font_extra_info = font_extra_info -- key: fontnumber
local font_extra_basename = {} -- key: basename
local list_rotate_glyphs
@@ -794,7 +799,6 @@ do
end
return lo%2==1
end
- local vert_vrt2 = { vert=true, vrt2 = true }
local function list_rorate_dup (i, v, dest)
local f = dest[i]
if not f then
@@ -807,7 +811,6 @@ do
for i,_ in pairs(tfmdata.characters) do
if rotate_in_uax50(i) then rot[i] = true end
end
- ltju.loop_over_feat(tfmdata, vert_vrt2, function (i,k) rot[i] = nil end)
-- ↓「TeX Live 2019のLuaLaTeXで縦書きの三点リーダーが横書きになる」
-- (https://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=2722) により無効化
-- -- 同じグリフが複数の Unicode ポイントを持っている場合.
@@ -829,7 +832,7 @@ do
end
do
- local cache_ver = 22
+ local cache_ver = 23
local nameonly, lower = file.nameonly, string.lower
local lfs = require"lfs"
local file_attributes = lfs.attributes
@@ -870,12 +873,23 @@ do
return bname
end
end
+ local dummytable = { } -- dummy
+ local dtvo, dtvh = {}, {}
+ setmetatable(dtvo, {__index = function () return 0.88 end } )
+ setmetatable(dtvh, {__index = function () return 1 end } )
+ ltjr.vert_addfunc = function(id, s)
+ if not dummytable.rotation then
+ dummytable = list_rotate_glyphs(s, dummytable)
+ dummytable.vorigin, dummytable.vheight = dtvo, dtvh
+ end
+ end
+
local function prepare_extra_data_font(id, res)
if type(res)=='table' and (res.psname or res.filename) then
local bname = res.psname or nameonly(res.filename)
local t = font_extra_basename[bname]
if not t then bname = prepare_extra_data_base(res) end
- font_extra_info[id] = t or font_extra_basename[bname]
+ font_extra_info[id] = bname and (t or font_extra_basename[bname]) or dummytable
end
end
luatexbase.add_to_callback(
@@ -892,9 +906,6 @@ do
end,
'ltj.prepare_extra_data', 1)
- local nulltable = {} -- dummy
- ltjr.vert_addfunc = function (n) font_extra_info[n] = nulltable end
-
for i=1,font.nextid()-1 do
local t = font.getfont(i)
if t then
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty b/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
index 55fd5d4ebd7..834f16e70ac 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}[2020-08-08 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2020-10-01 LaTeX support of LuaTeX-ja]
% cleanup at end of the document
%\let\ltj@@orig@end=\@@end
@@ -21,17 +21,23 @@
\endlinechar=13
+%%% LaTeX version detection
+\ifcsname tex_shipout:D\endcsname
+ \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout
+\fi
+\newif\ifltj@ltfilehook@avail
+\@ifl@t@r\fmtversion{2020-10-01}{%
+ \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltfilehook@availtrue\fi
+ \else\ltj@ltfilehook@availtrue\fi
+}{}
+
%%% patch for LaTeX
\usepackage{lltjfont}
\usepackage{lltjdefs}
\usepackage{lltjcore}
+\RequirePackage{lltjp-atbegshi}
%%% patching commands
-\newif\ifltj@ltfilehook@avail
-\@ifl@t@r\fmtversion{2020-10-01}{%
- \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltfilehook@availtrue\fi
- \else\ltj@ltfilehook@availtrue\fi
-}{}
\ifltj@ltfilehook@avail
\def\@@ltj@ExecuteAfterPackage#1{\AddToHook{package/after/#1}}
\def\@@ltj@ExecuteBeforePackage#1{\AddToHook{package/before/#1}}
@@ -80,15 +86,17 @@
\ltj@pkgpatch{tascmac}
\ltj@pkgpatch{ascmac}[lltjp-tascmac]
\ltj@pkgpatch@im{stfloats}
-\ltj@pkgpatch{preview} %% at \begin{document}
+\ifltj@ltfilehook@avail\else
+ \ltj@pkgpatch{preview} %% at \begin{document}
% (preview package has delayed option)
+\fi
\ltj@pkgpatch{array} %% at \begin{document}
\ltj@pkgpatch{collcell} %% at \begin{document}
\ltj@pkgpatch@im{unicode-math}
\ltj@pkgpatch@im{siunitx}
\ltj@pkgpatch@im{microtype}
-\ifltj@ltshipout@avail\else\ltj@pkgpatch@im{everyshi}\fi
+\ifltj@ltfilehook@avail\else\ltj@pkgpatch@im{everyshi}\fi
\RequirePackage{lltjp-geometry}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
index 53f5b0136ac..499d3eda4a9 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
@@ -291,7 +291,6 @@ local function mk_rml(name, size, id)
local fontdata = {}
local cachedata = {}
local s = cidfont_data[cid_name]
- luatexja.rmlgbm.vert_addfunc(id)
for k, v in pairs(s) do
fontdata[k] = v
cachedata[k] = v
@@ -328,6 +327,7 @@ local function mk_rml(name, size, id)
fontdata.characters = cache_chars[cid_name][size]
cachedata.characters = cache_chars[cid_name][size]
end
+ luatexja.rmlgbm.vert_addfunc(id, fontdata)
-- other parameters
do
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
index 372a0e04128..c502e9879e0 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
@@ -189,8 +189,8 @@ local function capsule_glyph_tate(p, met, char_data, head, dir)
do
local pf, pc = getfont(p), getchar(p)
local feir = ltjf_font_extra_info[pf]
- if feir and feir.rotation and met.vert_activated then
- if feir.rotation[pc] and (has_attr(p, attr_vert_ori) or 0)<=0 then
+ if met.rotation and met.vert_activated then
+ if met.rotation[pc] and (has_attr(p, attr_vert_ori) or 0)<=0 then
return capsule_glyph_tate_rot(p, met, char_data, head, dir,
0.5*(get_ascender(pf)-get_descender(pf)))
end
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
index 8896cf2434a..03f9eec4a22 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjarticle}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -691,9 +691,9 @@
\def\addcontentsline#1#2#3{%
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
- \@temptokena{\thepage}}%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+ \@temptokena{\thepage}%
+ }{\string\@writefile{#1}%
+ {\protect\contentsline{#2}{#3}{\the\@temptokena}{}%
\protected@file@percent}}%
}
\newcommand{\tableofcontents}{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
index b472e605451..9381f79349a 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjbk10.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{15}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
index 00b28f12e09..592a73dbb35 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjbk11.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{15.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
index a83237bd4f5..37bd3caad89 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjbk12.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{16.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
index 034dfa24125..b94927909e2 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjbook}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -784,9 +784,9 @@
\def\addcontentsline#1#2#3{%
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
- \@temptokena{\thepage}}%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+ \@temptokena{\thepage}%
+ }{\string\@writefile{#1}%
+ {\protect\contentsline{#2}{#3}{\the\@temptokena}{}%
\protected@file@percent}}%
}
\newcommand{\tableofcontents}{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
index a750187447d..bd80b44c319 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjreport}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -780,9 +780,9 @@
\def\addcontentsline#1#2#3{%
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
- \@temptokena{\thepage}}%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+ \@temptokena{\thepage}%
+ }{\string\@writefile{#1}%
+ {\protect\contentsline{#2}{#3}{\the\@temptokena}{}%
\protected@file@percent}}%
}
\newcommand{\tableofcontents}{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
index 977249647a8..a51ce468f39 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjsize10.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{15}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
index 55f511ff28e..964fa2a55e0 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjsize11.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{15.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
index 0051f9362ec..3f791c9f389 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjsize12.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{16.5}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
index 4c3280d6f55..73a67486d28 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjtarticle}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -695,9 +695,9 @@
\def\addcontentsline#1#2#3{%
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
- \@temptokena{\rensuji{\thepage}}}%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+ \@temptokena{\rensuji{\thepage}}%
+ }{\string\@writefile{#1}%
+ {\protect\contentsline{#2}{#3}{\the\@temptokena}{}%
\protected@file@percent}}%
}
\newcommand{\tableofcontents}{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
index ffe8cccd8d6..4f3f9f20baf 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtbk10.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
index 22bbc7131fe..43d5e5106c7 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtbk11.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
index 323e0763707..d251a35c8df 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtbk12.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{18}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
index 728965bc015..5c81f3da125 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjtbook}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -788,9 +788,9 @@
\def\addcontentsline#1#2#3{%
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
- \@temptokena{\rensuji{\thepage}}}%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+ \@temptokena{\rensuji{\thepage}}%
+ }{\string\@writefile{#1}%
+ {\protect\contentsline{#2}{#3}{\the\@temptokena}{}%
\protected@file@percent}}%
}
\newcommand{\tableofcontents}{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls b/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
index cfffc94d006..1284acb9c7e 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltjtreport}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja class]
\RequirePackage{luatexja}
\newcounter{@paper}
@@ -784,9 +784,9 @@
\def\addcontentsline#1#2#3{%
\protected@write\@auxout
{\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
- \@temptokena{\rensuji{\thepage}}}%
- {\string\@writefile{#1}%
- {\protect\contentsline{#2}{#3}{\the\@temptokena}%
+ \@temptokena{\rensuji{\thepage}}%
+ }{\string\@writefile{#1}%
+ {\protect\contentsline{#2}{#3}{\the\@temptokena}{}%
\protected@file@percent}}%
}
\newcommand{\tableofcontents}{%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
index c2cd76f6584..05f7dc832a4 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtsize10.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xpt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
index 8e84e44c321..fff725c7fde 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtsize11.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xipt{17}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
index e6dc52ed08d..49561974c69 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
@@ -23,7 +23,7 @@
%% File: ltjclasses.dtx
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{ltjtsize12.clo}
- [2020/07/27 v1.8e-ltj-19
+ [2020-09-30 v1.8f-ltj-20
Standard LuaLaTeX-ja file (size option)]
\renewcommand{\normalsize}{%
\@setfontsize\normalsize\@xiipt{18}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
index fee1a78a2f0..5cbf4e8da91 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}[2020-08-08 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2020-09-27 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -79,7 +79,6 @@
\RequirePackage{pdftexcmds} [2011/11/29] % v0.20
\RequirePackage{xkeyval} [2012/10/14] % v2.6b
\RequirePackage{etoolbox}
- \RequirePackage{lltjp-atbegshi}
\IfFileExists{everyhook.sty}{\RequirePackage{everyhook}\ltj@everyhook@availtrue}{}
\else %<*!LaTeX>
\input luatexbase.sty
@@ -650,7 +649,7 @@
\aftergroup\ltj@@reset@badness\the\ltj@@i@everyvbox}
\fi
-\protected\def\ltj@@reset@badness{\luafunction\ltj@@reset@badness@inner}
+\luadef\ltj@@reset@badness\ltj@@reset@badness@inner
%%%% \raise, \lower, \moveleft, \moveright
\newluafunction\ltj@@lua@raisebox@inner
@@ -698,12 +697,7 @@
\protected\luadef\ltj@@lua@shipout\ltj@@lua@shipout@inner
\protected\def\ltj@shipout{\ltj@afterbox\ltj@@lua@shipout}
\ifprimitive\shipout\let\shipout\ltj@shipout\fi
-\ifcsname tex_shipout:D\endcsname
- \expandafter\let\csname tex_shipout:D\endcsname\ltj@shipout
-\fi
-\ifdefined\AtBeginShipoutOriginalShipout
- \let\AtBeginShipoutOriginalShipout\ltj@shipout
-\fi
+
%%%% \unhbox and \unvbox
\newluafunction\ltj@@lua@unboxcheckdir@inner
\directlua{
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
index be2b2858807..1c039a7d9fa 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
@@ -83,6 +83,11 @@ dir_table.dir_utod = dir_table.dir_tate + dir_table.dir_math_mod
local load_module = luatexja.load_module
load_module 'base'; local ltjb = luatexja.base
+if tex.outputmode==0 then
+ ltjb.package_error('luatexja',
+ 'DVI output is not supported in LuaTeX-ja',
+ 'Use lua*tex instead dvilua*tex.')
+end
load_module 'rmlgbm'; local ltjr = luatexja.rmlgbm -- must be 1st
if luatexja_debug then load_module('debug') end
load_module 'lotf_aux'; local ltju = luatexja.lotf_aux
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
index 2bb9f0db4f4..cfee092e30b 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
@@ -41,7 +41,7 @@
\ProcessOptions\relax
\fi %</LaTeX>
%%%% VERSION
-\def\LuaTeXjaversion{20200919.0}
+\def\LuaTeXjaversion{20201001.0}
\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 e858a8a957c..2af25035a5f 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
@@ -3,9 +3,61 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2020-09-13 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2020-09-28 Patch to LaTeX2e Kernel for LuaTeX-ja]
\RequirePackage{etoolbox}
+%%% expl3
+\RequirePackage{expl3}
+\ExplSyntaxOn
+\cs_set_eq:NN \platex_direction_yoko: \yoko
+\cs_set_eq:NN \platex_direction_tate: \tate
+\cs_set_eq:NN \platex_direction_dtou: \dtou
+\cs_set_eq:NN \platex_direction_utod: \utod % LuaTeX-ja specific
+\prg_new_conditional:Npnn \platex_if_box_yoko:N #1 { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 4 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\prg_new_conditional:Npnn \platex_if_box_utod:N #1 { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 11 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\prg_new_eq_conditional:NNn \platex_if_box_tate_math:N \platex_if_box_utod:N { p, T, F, TF }
+\prg_new_conditional:Npnn \platex_if_box_tate_nomath:N #1 { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 3 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\prg_new_conditional:Npnn \platex_if_box_tate:N #1 { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 3 \scan_stop:
+ \prg_return_true:
+ \else: \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 11 \scan_stop: % utod
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi: \fi:}
+\prg_new_conditional:Npnn \platex_if_box_dtou:N #1 { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{boxdir}{#1} = 1 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\prg_new_conditional:Npnn \platex_if_direction_yoko: { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{direction} = 4 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\prg_new_conditional:Npnn \platex_if_direction_utod: { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{direction} = 11 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\prg_new_eq_conditional:NNn
+ \platex_if_direction_tate_math: \platex_if_direction_utod: { p, T, F, TF }
+\prg_new_conditional:Npnn \platex_if_direction_tate_nomath: { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{direction} = 3 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\prg_new_conditional:Npnn \platex_if_direction_tate: { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{direction} = 3 \scan_stop:
+ \prg_return_true:
+ \else: \if_int_compare:w \ltjgetparameter{direction} = 11 \scan_stop: % utod
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi: \fi:}
+\prg_new_conditional:Npnn \platex_if_direction_dtou: { p, T, F, TF }
+ { \if_int_compare:w \ltjgetparameter{direction} = 1 \scan_stop:
+ \prg_return_true: \else: \prg_return_false: \fi: }
+\ExplSyntaxOff
+
\def\cleardoublepage{\clearpage\if@twoside
\ifodd\c@page
\ifnum\ltjgetparameter{direction}=3
@@ -18,6 +70,10 @@
\if@twocolumn\hbox{}\newpage\fi
\fi
\fi\fi}
+
+\patchcmd\@vtryfc{\global\setbox\@outputbox\vbox{}}
+ {\global\setbox\@outputbox\vbox{\unless\ifnum\ltjgetparameter{direction}=4\hskip\z@\fi}}{}{}
+
\newif\iftombow \tombowfalse
\newif\iftombowdate \tombowdatetrue
\newdimen\@tombowwidth
@@ -239,14 +295,6 @@
\ifmmode\@@underline{#1}%
\else \leavevmode\null$\@@underline{\hbox{#1}}\m@th$\null\relax\fi}
-%%% AtBeginDvi: NOT needed to patch in LaTeX 2020-10-01 pre-release 9 or later
-\unless\ifltj@ltshipout@avail
-\DeclareRobustCommand \AtBeginDvi [1]{%
- \global \setbox \@begindvibox
- \vbox{\yoko\unvbox \@begindvibox #1}%
-}
-\fi
-
\newif\iffnfixbottom
\newif\ifltj@ftn@unvboxed
%%% @makecol
@@ -279,7 +327,7 @@
\@texttop
\dimen@ \dp\@outputbox
\unvbox \@outputbox
- \ifnum\ltjgetparameter{direction}=4\else\vbox{\hskip\z@}\fi %%% LuaTeX-ja
+ \unless\ifnum\ltjgetparameter{direction}=4\vbox{\hskip\z@}\fi %%% LuaTeX-ja
\vskip -\dimen@
\ifltj@ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi
}%
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
index 76a3147036b..03366c258f0 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}[2020-08-08 Default font settings of LuaTeX-ja]
+\ProvidesPackage{lltjdefs}[2020-09-30 Default font settings of LuaTeX-ja]
\ifdefined\ltj@stdmcfont\else\def\ltj@stdmcfont{file:HaranoAjiMincho-Regular.otf}\fi
\ifdefined\ltj@stdgtfont\else\def\ltj@stdgtfont{file:HaranoAjiGothic-Medium.otf}\fi
@@ -32,7 +32,8 @@
\newcommand\kanjiencodingdefault{JY3}
\newcommand\kanjifamilydefault{\mcdefault}
\newcommand\kanjiseriesdefault{\mddefault}
-\ifdefined\@rmfamilyhook%% LaTeX 2020-02-02
+\ifnum 0\ifltj@ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0
+ %% LaTeX 2020-02-02
\newcommand\kanjishapedefault{\shapedefault}
\else %% LaTeX 2019-10-01
\newcommand\kanjishapedefault{\updefault}
@@ -80,8 +81,8 @@
\DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n}
\fi
-\ifdefined\@rmfamilyhook
-%%%% LaTeX 2020-02-02
+\ifnum 0\ifltj@ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0
+%%%% LaTeX >= 2020-02-02
\edef\bfseries@mc{\bfdefault}
\edef\bfseries@gt{\bfdefault}
\def\bfseries@jtt{\bfseries@mc}
@@ -95,7 +96,9 @@
\def\verbatim@font{\normalfont\ttfamily\kanjifamily\jttdefault\selectfont}
\def\@ltj@hook@family#1#2{ % #1: csname #2: contents
- \ifcsname @#1hook\endcsname % LaTeX 2020-02-02
+ \ifltj@ltfilehook@avail % LaTeX 2020-10-01
+ \AddToHook{#1}{#2}%
+ \else\ifcsname @#1hook\endcsname % LaTeX 2020-02-02
\csappto{@#1hook}{#2}%
\else % LaTeX 2019-10-01
\ifcsname #1 \endcsname
@@ -105,7 +108,7 @@
Patching to \expandafter\string\csname #1\endcsname\space failed%
}%
\fi
- \fi
+ \fi\fi
}
\@ltj@hook@family{rmfamily}{%
\if@ltj@match@family
@@ -122,6 +125,13 @@
\prepare@family@series@update@kanji{jtt}\jttdefault
\fi
}
+\let\@ltj@hook@family\@undefined
+
+\ifltj@ltfilehook@avail % 2020-10-01
+ \expandafter\def\expandafter\kanjiseriesdefault
+ \expandafter{\kanjiseriesdefault\@empty}
+ \let\kanjiseriesdefault@kernel\kanjiseriesdefault
+\fi
%%% \eminnershape
\expandafter\patchcmd\csname em \endcsname{\itshape}{\gtfamily\itshape}{}{}
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
index 3578a84396c..564a1b6c159 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}[2020-05-17 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2020-09-30 Patch to NFSS2 for LuaTeX-ja]
%% patching \DeclareTextComposite
\def\ltj@chardef@text@cmd#1{%
@@ -432,19 +432,32 @@
\bgroup
\def\ltj@@dir@patch#1#2#3{%
\global\csletcs{ltj@@orig@#1}{#1}%
- \protected\expandafter\xdef\csname #1\endcsname{%
- \csname ltj@@orig@#1\endcsname
- \unexpanded{\ifnum#3<\z@\let\ltj@@protect\protect\set@typeset@protect}%
- \unexpanded{\global\let\ltj@afont@name=\font@name}%
- \expandonce{\csname ltj@selectfont@#2\endcsname}%
- \unexpanded{\global\let\font@name=\ltj@afont@name}%
- \unexpanded{\let\protect\ltj@@protect\fi}%
- }%
- }
+ \protected\expandafter\xdef\csname #1\endcsname{%
+ \csname ltj@@orig@#1\endcsname
+ \unexpanded{\ifnum#3<\z@\let\ltj@@protect\protect\set@typeset@protect}%
+ \unexpanded{\global\let\ltj@afont@name=\font@name}%
+ \expandonce{\csname ltj@selectfont@#2\endcsname}%
+ \unexpanded{\global\let\font@name=\ltj@afont@name}%
+ \unexpanded{\let\protect\ltj@@protect\fi}%
+ }%
+ }
\ltj@@dir@patch{yoko}{yoko}{\ltj@curjfnt}
\ltj@@dir@patch{tate}{tate}{\ltj@curtfnt}
\ltj@@dir@patch{utod}{yoko}{\ltj@curjfnt}
\ltj@@dir@patch{dtou}{yoko}{\ltj@curjfnt}
+ \global\let\ltj@@box@dirhook@orig=\ltj@@box@dirhook
+ \gdef\ltj@@box@dirhook{%
+ \ltj@@box@dirhook@orig
+ \ifnum\ltjgetparameter{direction}=11
+ \ifnum\ltj@curjfnt<\z@
+ \let\ltj@@protect\protect\set@typeset@protect
+ \global\let\ltj@afont@name=\font@name
+ \ltj@selectfont@yoko
+ \global\let\font@name=\ltj@afont@name
+ \let\protect\ltj@@protect
+ \fi
+ \fi
+ }
\egroup
\def\KanjiEncodingPair#1#2{\@namedef{t@enc@#1}{#2}\@namedef{y@enc@#2}{#1}}
@@ -620,24 +633,28 @@
}
\newcount\ltj@@latex@plv \ltj@@latex@plv=-1
-\ifdefined\@rmfamilyhook
-%%%% LaTeX 2020-02-02
-\newif\if@shape@roman@kanji
-%%%%%% 2020-02-02 patchlevel detection
-\ifx\@forced@seriestrue\@undefined % 2020-02-02 pl0--2
- \@latex@error
- {Please update LaTeX2e!^^J\space\space
- At least LaTeX2e 2020-02-02 patch level 3 is required}
- {LaTeX2e 2020-02-02 patch level 2 (and 4) has a bug.}
-\else
- \ltj@@latex@plv=300
- \unless\ifx\series@maybe@drop@one@m@x\@undefined % pl5 + develop
- \ltj@@latex@plv=501
- \else\unless\ifx\series@maybe@drop@one@m\@undefined % patch level 5
- \ltj@@latex@plv=500
- \fi\fi
-\fi
+\ifltj@ltfilehook@avail % 2020-10-01
+ \ltj@@latex@plv=1000
+\else\ifdefined\@rmfamilyhook % 2020-02-02
+ \ifx\@forced@seriestrue\@undefined % 2020-02-02 pl0--2
+ \@latex@error
+ {Please update LaTeX2e!^^J\space\space
+ At least LaTeX2e 2020-02-02 patch level 3 is required}
+ {LaTeX2e 2020-02-02 patch level 2 (and 4) has a bug.}
+ \else
+ \ltj@@latex@plv=300
+ \unless\ifx\series@maybe@drop@one@m@x\@undefined % pl5 + develop
+ \ltj@@latex@plv=501
+ \else\unless\ifx\series@maybe@drop@one@m\@undefined % patch level 5
+ \ltj@@latex@plv=500
+ \fi\fi
+ \fi
+\fi\fi
+
%%%%%%
+\ifnum\ltj@@latex@plv>0
+%%%% LaTeX >= 2020-02-02
+\newif\if@shape@roman@kanji
\def\merge@kanji@series#1{%
\expandafter\expandafter\expandafter
@@ -757,7 +774,7 @@
\DeclareRobustCommand\useroman[4]{%
\romanencoding{#1}\edef\f@family{#2}\edef\f@series{#3}\edef\f@shape{#4}%
\selectfont\ignorespaces}
-%%%% LaTeX 2020-02-02 END
+%%%% LaTeX >= 2020-02-02 END
\else
%%%% LaTeX 2019-10-01
\DeclareRobustCommand\romanseries[1]{\edef\f@series{#1}}
@@ -794,13 +811,9 @@
\ltj@@is@kenc{#1}\ifin@\usekanji{#1}{#2}{#3}{#4}%
\else\useroman{#1}{#2}{#3}{#4}%
\fi}
-\DeclareRobustCommand\normalfont{%
- \useroman\encodingdefault\familydefault\seriesdefault\shapedefault
- \usekanji\kanjiencodingdefault\kanjifamilydefault\kanjiseriesdefault\kanjishapedefault}
-\let\reset@font\normalfont
-\ifdefined\@rmfamilyhook
-%%%% LaTeX 2020-02-02
+\ifnum 0\ifltj@ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0
+%%%% LaTeX >= 2020-02-02
\let\prepare@family@series@update@kanji=\prepare@family@series@update
\patchcmd\prepare@family@series@update{\fontfamily}{\romanfamily}{}{}
\patchcmd\prepare@family@series@update@kanji{\fontfamily}{\kanjifamily}{}{}
@@ -821,46 +834,35 @@
\patchcmd\update@series@target@value@kanji{\f@series}{\k@series}{}{}
\def\@meta@family@list@kanji{\@elt{mc}\@elt{gt}\@elt{jtt}}
-\ifdefined\@setbfseriesdefaultshook % after 2020-04-07
- \g@addto@macro\@setbfseriesdefaultshook{%
- \let\bfseries@mc\bfdef@ult
- \let\bfseries@gt\bfdef@ult
- \let\bfseries@jtt\bfdef@ult
- }
-\else % 2020-02-02
- \expandafter\patchcmd\csname bfseries \endcsname{%
- \let\bfseries@rm\bfdef@ult
- \let\bfseries@sf\bfdef@ult
- \let\bfseries@tt\bfdef@ult
- }{%
- \let\bfseries@rm\bfdef@ult
- \let\bfseries@sf\bfdef@ult
- \let\bfseries@tt\bfdef@ult
- \let\bfseries@mc\bfdef@ult
- \let\bfseries@gt\bfdef@ult
- \let\bfseries@jtt\bfdef@ult
- }{}{}
-\fi
-\ifdefined\@setmdseriesdefaultshook % after 2020-04-07
- \g@addto@macro\@setmdseriesdefaultshook{%
- \let\mdseries@mc\mddef@ult
- \let\mdseries@gt\mddef@ult
- \let\mdseries@jtt\mddef@ult
- }
-\else % 2020-02-02
- \expandafter\patchcmd\csname mdseries \endcsname{%
- \let\mdseries@rm\mddef@ult
- \let\mdseries@sf\mddef@ult
- \let\mdseries@tt\mddef@ult
- }{%
- \let\mdseries@rm\mddef@ult
- \let\mdseries@sf\mddef@ult
- \let\mdseries@tt\mddef@ult
- \let\mdseries@mc\mddef@ult
- \let\mdseries@gt\mddef@ult
- \let\mdseries@jtt\mddef@ult
- }{}{}
-\fi
+\def\@ltj@hook@series@default#1#2#3{
+ \ifltj@ltfilehook@avail % 2020-10-01
+ \AddToHook{#1/defaults}{#2}%
+ \else\ifcsname @set#1defaultshook\endcsname %after 2020-04-07
+ \expandafter\g@addto@macro\csname @set#1defaultshook\endcsname{#2}%
+ \else % 2020-02-02
+ \expandafter\patchcmd\csname #1 \endcsname{#3}{#3#2}{}{}
+ \fi\fi
+}
+\@ltj@hook@series@default{bfseries}{
+ \let\bfseries@mc\bfdef@ult
+ \let\bfseries@gt\bfdef@ult
+ \let\bfseries@jtt\bfdef@ult
+}{
+ \let\bfseries@rm\bfdef@ult
+ \let\bfseries@sf\bfdef@ult
+ \let\bfseries@tt\bfdef@ult
+}
+\@ltj@hook@series@default{mdseries}{
+ \let\mdseries@mc\mddef@ult
+ \let\mdseries@gt\mddef@ult
+ \let\mdseries@jtt\mddef@ult
+}{
+ \let\mdseries@rm\mddef@ult
+ \let\mdseries@sf\mddef@ult
+ \let\mdseries@tt\mddef@ult
+}
+\let\@ltj@hook@series@default\@undefined
+
\expandafter\patchcmd\csname bfseries \endcsname{%
\ifx\f@family\rmdef@ult \fontseries\bfseries@rm
\else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
@@ -887,46 +889,91 @@
\else \romanseries\mddefault
\fi\fi\fi
}{}{}
-\expandafter\patchcmd\csname bfseries \endcsname{\selectfont}%
-{%
+
+\def\@ltj@hook@series#1#2{
+ \ifltj@ltfilehook@avail % 2020-10-01
+ \AddToHook{#1}{#2}%
+ \else % 2020-02-02
+ \expandafter\patchcmd\csname #1 \endcsname{\selectfont}{#2\selectfont}{}{}
+ \fi
+}
+\@ltj@hook@series{bfseries}{%
\ifx\k@family\mcdef@ult \kanjiseries\bfseries@mc
\else\ifx\k@family\gtdef@ult \kanjiseries\bfseries@gt
\else\ifx\k@family\jttdef@ult\kanjiseries\bfseries@jtt
\else \kanjiseries\bfdefault
\fi\fi\fi
- \selectfont
-}{}{}
-\expandafter\patchcmd\csname mdseries \endcsname{\selectfont}%
-{%
+}
+\@ltj@hook@series{mdseries}{%
\ifx\k@family\mcdef@ult \kanjiseries\mdseries@mc
\else\ifx\k@family\gtdef@ult \kanjiseries\mdseries@gt
\else\ifx\k@family\jttdef@ult\kanjiseries\mdseries@jtt
\else \kanjiseries\mddefault
\fi\fi\fi
- \selectfont
-}{}{}
-\ifdefined\@expandfontdefaultshook % 2020-04-07
- \g@addto@macro\@expandfontdefaultshook{%
- \edef\mcdef@ult{\mcdefault}%
- \edef\gtdef@ult{\gtdefault}%
- \edef\jttdef@ult{\jttdefault}%
- \edef\kanjidef@ult{\kanjifamilydefault}%
+}
+\let\@ltj@hook@series\@undefined
+
+\def\@ltj@hook@efd#1#2{
+ \ifltj@ltfilehook@avail % 2020-10-01
+ \AddToHook{expand@font@defaults}{#1}%
+ \else\ifdefined\@expandfontdefaultshook %after 2020-04-07
+ \g@addto@macro\@expandfontdefaultshook{#1#2}%
+ \else % 2020-02-02
+ \appto\expand@font@defaults{#1#2}%
+ \fi\fi
+}
+\@ltj@hook@efd{%
+ \edef\mcdef@ult{\mcdefault}%
+ \edef\gtdef@ult{\gtdefault}%
+ \edef\jttdef@ult{\jttdefault}%
+}{\edef\kanjidef@ult{\kanjifamilydefault}}
+\let\@ltj@hook@efd\@undefined
+
+\ifltj@ltfilehook@avail % 2020-10-01
+ \appto\init@series@setup{
+ \ifx\kanjiseriesdefault\kanjiseriesdefault@kernel
+ \mdseries
+ \let\kanjiseriesdefault\k@series
+ \fi
}
-\else % 2020-02-02
- \appto\expand@font@defaults{%
- \edef\mcdef@ult{\mcdefault}%
- \edef\gtdef@ult{\gtdefault}%
- \edef\jttdef@ult{\jttdefault}%
- \edef\kanjidef@ult{\kanjifamilydefault}%
+\else
+ \appto\init@series@setup{%
+ \ifx\kanjidef@ult\mcdef@ult \mcfamily
+ \else\ifx\kanjidef@ult\gtdef@ult \gtfamily
+ \else\ifx\kanjidef@ult\jttdef@ult \jttfamily
+ \fi\fi\fi
}
\fi
-\appto\init@series@setup{%
- \ifx\kanjidef@ult\mcdef@ult \mcfamily
- \else\ifx\kanjidef@ult\gtdef@ult \gtfamily
- \else\ifx\kanjidef@ult\jttdef@ult \jttfamily
- \fi\fi\fi
+
+\def\@ltj@hook@dfh#1{
+ \ifltj@ltfilehook@avail % 2020-10-01
+ \AddToHook{normalfont}{#1}%
+ \else\ifdefined\@defaultfamilyhook
+ \g@addto@macro\@defaultfamilyhook{#1}%
+ \else % 2020-02-02
+ \expandafter\patchcmd\csname normalfont \endcsname{\selectfont}{#1\selectfont}{}{}
+ \let\reset@font\normalfont
+ \fi\fi
}
+\@ltj@hook@dfh{%
+ \kanjiencoding{\kanjiencodingdefault}%
+ \edef\k@family{\kanjifamilydefault}%
+ \edef\k@series{\kanjiseriesdefault}%
+ \edef\k@shape{\kanjishapedefault}%
+}
+\let\@ltj@hook@dfh\@undefined
+%%%% LaTeX >= 2020-02-02 END
+\else
+%%%% LaTeX 2019-10-01
+\DeclareRobustCommand\normalfont{%
+ \useroman\encodingdefault\familydefault\seriesdefault\shapedefault
+ \usekanji\kanjiencodingdefault\kanjifamilydefault\kanjiseriesdefault\kanjishapedefault}
+\let\reset@font\normalfont
+%%%% LaTeX 2019-10-01 END
\fi
+
+
+
\ifdefined\prepare@family@series@update@kanji\else
%%%% LaTeX 2019-10-01
\def\prepare@family@series@update@kanji#1{\kanjifamily}
@@ -942,13 +989,12 @@
\selectfont}
-
\let\romanprocess@table\process@table
\def\kanjiprocess@table{%
- \kanjiencoding{\kanjiencodingdefault}%
- \kanjifamily{\kanjifamilydefault}%
- \kanjiseries{\kanjiseriesdefault}%
- \kanjishape{\kanjishapedefault}%
+ \kanjiencoding\kanjiencodingdefault%
+ \edef\k@family{\kanjifamilydefault}%
+ \edef\k@series{\kanjiseriesdefault}%
+ \edef\k@shape{\kanjishapedefault}%
}
\def\process@table{%
\romanprocess@table
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
index a4b340136a3..a9ca6a2c140 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
@@ -2,37 +2,59 @@
% lltjp-atbegshi.sty
%
-\newif\ifltj@ltshipout@avail
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-atbegshi}[2020-09-13 Patching \string\shipout\space hooks for LuaTeX-ja]
-\@ifl@t@r\fmtversion{2020-10-01}{%
- \ifnum\patch@level<0\relax \ifnum\patch@level<-6 \ltj@ltshipout@availtrue\fi
- \else\ltj@ltshipout@availtrue\fi
-}{}
-\ifltj@ltshipout@avail\else\RequirePackage{atbegshi}\fi
+\ProvidesPackage{lltjp-atbegshi}[2020-09-30 Patching \string\shipout\space hooks for LuaTeX-ja]
% concept: execute all hooks inside yoko direction \vbox
-\ifltj@ltshipout@avail
+\ifltj@ltfilehook@avail
%<*ltshipout>-----------------------------------
%
\RequirePackage{expl3}
\ExplSyntaxOn\makeatletter
\box_new:N \l__platex_shipout_dummy_box
-\tl_put_left:Nn {\__shipout_execute_cont:}
- {\tex_setbox:D \l__platex_shipout_dummy_box \tex_vbox:D \c_group_begin_token \yoko }
-\tl_put_right:Nn {\__shipout_execute_cont:} {\c_group_end_token}
-\ExplSyntaxOff
+\cs_new_eq:NN \__platex_original_shipout_execute_cont: \__shipout_execute_cont:
+\cs_set:Npn \__shipout_execute_cont:
+{
+ % if \l_shipout_box is not a \yoko-box (= horizontal writing),
+ % then make it a \yoko-box behorehand.
+ \platex_if_box_yoko:NF \l_shipout_box {
+ \vbox_set:Nn \l_shipout_box { \platex_direction_yoko: \box_use:N \l_shipout_box }
+ }
+ % if the current direction is not \yoko,
+ % then enclose \__shipout_execute_cont: with
+ % a dummy \yoko-box named \l__platex_shipout_dummy_box.
+ \platex_if_direction_yoko:TF {
+ \__platex_original_shipout_execute_cont:
+ }{
+ \vbox_set:Nn \l__platex_shipout_dummy_box {
+ \platex_direction_yoko: \__platex_original_shipout_execute_cont:
+ }
+ % [Limitation] the code above may discard some contents,
+ % so we'd like to put it back by \box\l__platex_shipout_dummy_box.
+ % however, an infinite loop occurs if we uncomment the line below
+ % so we can't.
+ %\box_use:N \l__platex_shipout_dummy_box
+ }
+}
%</ltshipout>-----------------------------------
-
+\ExplSyntaxOff
\expandafter\endinput
\fi
-\AtBeginShipoutInit
+\RequirePackage{atbegshi}
%<*atbegshi>-------------------------------------
% patching atbegshi.sty
%%% following codes are almost copied from
%%% pxatbegshi.sty 2019/09/07 v0.5 (in platex-tools bundle, by H. Yamashita).
+\ifdefined\AtBeginShipoutOriginalShipout
+ \let\AtBeginShipoutOriginalShipout\ltj@shipout
+\fi
+\AtBeginShipoutInit
+\DeclareRobustCommand \AtBeginDvi [1]{%
+ \global \setbox \@begindvibox
+ \vbox{\yoko\unvbox \@begindvibox #1}%
+}
%% internal macros are locally effective
\begingroup
diff --git a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty
index 00602884eab..b850ec34cda 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty
+++ b/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty
@@ -3,20 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-preview}[2018/01/20 Patch to preview for LuaTeX-ja]
-
-\RequirePackage{etoolbox,preview}
-\newbox\ltj@preview@box
-
-\patchcmd\pr@endbox{%
- \pr@ship@end
-}{%
- \setbox\ltj@preview@box=\box\AtBeginShipoutBox
- \setbox\AtBeginShipoutBox=\vbox{\yoko\box\pr@box}%
- \directlua{luatexja.direction.finalize()}%
- \setbox\pr@box=\box\AtBeginShipoutBox
- \setbox\AtBeginShipoutBox=\box\ltj@preview@box
- \pr@ship@end
-}{}{}
-
+\ProvidesPackage{lltjp-preview}[2020-10-01 Patch to preview for LuaTeX-ja]
+\RequirePackage{preview}
+\let\pr@shipout=\ltj@shipout
\endinput