texlive[56505] Master/texmf-dist: luatexja (1oct20)
commits+karl at tug.org
commits+karl at tug.org
Thu Oct 1 23:06:45 CEST 2020
Revision: 56505
http://tug.org/svn/texlive?view=revision&revision=56505
Author: karl
Date: 2020-10-01 23:06:45 +0200 (Thu, 01 Oct 2020)
Log Message:
-----------
luatexja (1oct20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/luatex/luatexja/README
trunk/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf
trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
trunk/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 @@
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 @@
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
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 @@
%<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 @@
\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 @@
%<*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 @@
\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 @@
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 @@
%</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
Modified: trunk/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx
===================================================================
--- trunk/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/source/luatex/luatexja/ltjclasses.dtx 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at file@percent{}
\def\addcontentsline#1#2#3{%
\protected at 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 at file@percent}}%
}
% \end{macrocode}
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at ext@dir
\let\ltj at lltjext@orig at tabular=\tabular
@@ -538,9 +538,17 @@
\else \let\box at dir\utod
\fi
\fi
+\ifltj at ltfilehook@avail % LaTeX2e >= 2020-10-01
+ \@defaultunitsset\@picht{#3}\unitlength
+ \@defaultunitsset\@picwd{#2}\unitlength
+ \setbox\@picbox\hbox to\@picwd\bgroup\box at 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 at dir
\hskip-#4\unitlength\lower#5\unitlength\hbox\bgroup
+\fi
\ltj@@pic at reset@blshift
\ignorespaces}
\def\endpicture{%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfmglue.lua 2020-10-01 21:06:45 UTC (rev 56505)
@@ -178,7 +178,7 @@
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 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 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 @@
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 @@
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 @@
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 @@
-- 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)
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-jfont.lua 2020-10-01 21:06:45 UTC (rev 56505)
@@ -280,6 +280,7 @@
------------------------------------------------------------------------
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 @@
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 @@
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 @@
------------------------------------------------------------------------
-- 追加のフォント情報
------------------------------------------------------------------------
-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 @@
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 @@
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 @@
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 @@
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 @@
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
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at end=\@@end
@@ -21,17 +21,23 @@
\endlinechar=13
+%%% LaTeX version detection
+\ifcsname tex_shipout:D\endcsname
+ \expandafter\let\csname tex_shipout:D\endcsname\ltj at shipout
+\fi
+\newif\ifltj at ltfilehook@avail
+\@ifl at t@r\fmtversion{2020-10-01}{%
+ \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltfilehook@availtrue\fi
+ \else\ltj at ltfilehook@availtrue\fi
+}{}
+
%%% patch for LaTeX
\usepackage{lltjfont}
\usepackage{lltjdefs}
\usepackage{lltjcore}
+\RequirePackage{lltjp-atbegshi}
%%% patching commands
-\newif\ifltj at ltfilehook@avail
-\@ifl at t@r\fmtversion{2020-10-01}{%
- \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltfilehook@availtrue\fi
- \else\ltj at ltfilehook@availtrue\fi
-}{}
\ifltj at ltfilehook@avail
\def\@@ltj at ExecuteAfterPackage#1{\AddToHook{package/after/#1}}
\def\@@ltj at ExecuteBeforePackage#1{\AddToHook{package/before/#1}}
@@ -80,8 +86,10 @@
\ltj at pkgpatch{tascmac}
\ltj at pkgpatch{ascmac}[lltjp-tascmac]
\ltj at pkgpatch@im{stfloats}
-\ltj at pkgpatch{preview} %% at \begin{document}
+\ifltj at ltfilehook@avail\else
+ \ltj at pkgpatch{preview} %% at \begin{document}
% (preview package has delayed option)
+\fi
\ltj at pkgpatch{array} %% at \begin{document}
\ltj at pkgpatch{collcell} %% at \begin{document}
\ltj at pkgpatch@im{unicode-math}
@@ -88,7 +96,7 @@
\ltj at pkgpatch@im{siunitx}
\ltj at pkgpatch@im{microtype}
-\ifltj at ltshipout@avail\else\ltj at pkgpatch@im{everyshi}\fi
+\ifltj at ltfilehook@avail\else\ltj at pkgpatch@im{everyshi}\fi
\RequirePackage{lltjp-geometry}
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua 2020-10-01 21:06:45 UTC (rev 56505)
@@ -291,7 +291,6 @@
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 @@
fontdata.characters = cache_chars[cid_name][size]
cachedata.characters = cache_chars[cid_name][size]
end
+ luatexja.rmlgbm.vert_addfunc(id, fontdata)
-- other parameters
do
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-setwidth.lua 2020-10-01 21:06:45 UTC (rev 56505)
@@ -189,8 +189,8 @@
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
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjarticle.cls 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at 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 at file@percent}}%
}
\newcommand{\tableofcontents}{%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk10.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk11.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbk12.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjbook.cls 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at 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 at file@percent}}%
}
\newcommand{\tableofcontents}{%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjreport.cls 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at 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 at file@percent}}%
}
\newcommand{\tableofcontents}{%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize10.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize11.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjsize12.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtarticle.cls 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at 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 at file@percent}}%
}
\newcommand{\tableofcontents}{%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk10.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk11.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbk12.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtbook.cls 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at 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 at file@percent}}%
}
\newcommand{\tableofcontents}{%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtreport.cls 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at 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 at file@percent}}%
}
\newcommand{\tableofcontents}{%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize10.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize11.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltjtsize12.clo 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj at 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 at everyhook@availtrue}{}
\else %<*!LaTeX>
\input luatexbase.sty
@@ -650,7 +649,7 @@
\aftergroup\ltj@@reset at badness\the\ltj@@i at everyvbox}
\fi
-\protected\def\ltj@@reset at badness{\luafunction\ltj@@reset at badness@inner}
+\luadef\ltj@@reset at badness\ltj@@reset at badness@inner
%%%% \raise, \lower, \moveleft, \moveright
\newluafunction\ltj@@lua at raisebox@inner
@@ -698,12 +697,7 @@
\protected\luadef\ltj@@lua at shipout\ltj@@lua at shipout@inner
\protected\def\ltj at shipout{\ltj at afterbox\ltj@@lua at shipout}
\ifprimitive\shipout\let\shipout\ltj at shipout\fi
-\ifcsname tex_shipout:D\endcsname
- \expandafter\let\csname tex_shipout:D\endcsname\ltj at shipout
-\fi
-\ifdefined\AtBeginShipoutOriginalShipout
- \let\AtBeginShipoutOriginalShipout\ltj at shipout
-\fi
+
%%%% \unhbox and \unvbox
\newluafunction\ltj@@lua at unboxcheckdir@inner
\directlua{
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua 2020-10-01 21:06:45 UTC (rev 56505)
@@ -83,6 +83,11 @@
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
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at twoside
\ifodd\c at page
\ifnum\ltjgetparameter{direction}=3
@@ -18,6 +70,10 @@
\if at 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 at th$\null\relax\fi}
-%%% AtBeginDvi: NOT needed to patch in LaTeX 2020-10-01 pre-release 9 or later
-\unless\ifltj at ltshipout@avail
-\DeclareRobustCommand \AtBeginDvi [1]{%
- \global \setbox \@begindvibox
- \vbox{\yoko\unvbox \@begindvibox #1}%
-}
-\fi
-
\newif\iffnfixbottom
\newif\ifltj at 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 at ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi
}%
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at stdmcfont\else\def\ltj at stdmcfont{file:HaranoAjiMincho-Regular.otf}\fi
\ifdefined\ltj at stdgtfont\else\def\ltj at 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 at 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 at ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0
+%%%% LaTeX >= 2020-02-02
\edef\bfseries at mc{\bfdefault}
\edef\bfseries at gt{\bfdefault}
\def\bfseries at jtt{\bfseries at mc}
@@ -95,7 +96,9 @@
\def\verbatim at font{\normalfont\ttfamily\kanjifamily\jttdefault\selectfont}
\def\@ltj at hook@family#1#2{ % #1: csname #2: contents
- \ifcsname @#1hook\endcsname % LaTeX 2020-02-02
+ \ifltj at 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 at hook@family{rmfamily}{%
\if at ltj@match at family
@@ -122,7 +125,14 @@
\prepare at family@series at update@kanji{jtt}\jttdefault
\fi
}
+\let\@ltj at hook@family\@undefined
+\ifltj at ltfilehook@avail % 2020-10-01
+ \expandafter\def\expandafter\kanjiseriesdefault
+ \expandafter{\kanjiseriesdefault\@empty}
+ \let\kanjiseriesdefault at kernel\kanjiseriesdefault
+\fi
+
%%% \eminnershape
\expandafter\patchcmd\csname em \endcsname{\itshape}{\gtfamily\itshape}{}{}
\def\eminnershape{\mcfamily \upshape}
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -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 at chardef@text at cmd#1{%
@@ -432,19 +432,32 @@
\bgroup
\def\ltj@@dir at 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 at typeset@protect}%
- \unexpanded{\global\let\ltj at afont@name=\font at name}%
- \expandonce{\csname ltj at selectfont@#2\endcsname}%
- \unexpanded{\global\let\font at name=\ltj at 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 at typeset@protect}%
+ \unexpanded{\global\let\ltj at afont@name=\font at name}%
+ \expandonce{\csname ltj at selectfont@#2\endcsname}%
+ \unexpanded{\global\let\font at name=\ltj at afont@name}%
+ \unexpanded{\let\protect\ltj@@protect\fi}%
+ }%
+ }
\ltj@@dir at patch{yoko}{yoko}{\ltj at curjfnt}
\ltj@@dir at patch{tate}{tate}{\ltj at curtfnt}
\ltj@@dir at patch{utod}{yoko}{\ltj at curjfnt}
\ltj@@dir at patch{dtou}{yoko}{\ltj at curjfnt}
+ \global\let\ltj@@box at dirhook@orig=\ltj@@box at dirhook
+ \gdef\ltj@@box at dirhook{%
+ \ltj@@box at dirhook@orig
+ \ifnum\ltjgetparameter{direction}=11
+ \ifnum\ltj at curjfnt<\z@
+ \let\ltj@@protect\protect\set at typeset@protect
+ \global\let\ltj at afont@name=\font at name
+ \ltj at selectfont@yoko
+ \global\let\font at name=\ltj at afont@name
+ \let\protect\ltj@@protect
+ \fi
+ \fi
+ }
\egroup
\def\KanjiEncodingPair#1#2{\@namedef{t at enc@#1}{#2}\@namedef{y at enc@#2}{#1}}
@@ -620,24 +633,28 @@
}
\newcount\ltj@@latex at plv \ltj@@latex at plv=-1
-\ifdefined\@rmfamilyhook
-%%%% LaTeX 2020-02-02
+\ifltj at ltfilehook@avail % 2020-10-01
+ \ltj@@latex at plv=1000
+\else\ifdefined\@rmfamilyhook % 2020-02-02
+ \ifx\@forced at seriestrue\@undefined % 2020-02-02 pl0--2
+ \@latex at 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 at plv=300
+ \unless\ifx\series at maybe@drop at one@m at x\@undefined % pl5 + develop
+ \ltj@@latex at plv=501
+ \else\unless\ifx\series at maybe@drop at one@m\@undefined % patch level 5
+ \ltj@@latex at plv=500
+ \fi\fi
+ \fi
+\fi\fi
+
+%%%%%%
+\ifnum\ltj@@latex at plv>0
+%%%% LaTeX >= 2020-02-02
\newif\if at shape@roman at kanji
-%%%%%% 2020-02-02 patchlevel detection
-\ifx\@forced at seriestrue\@undefined % 2020-02-02 pl0--2
- \@latex at 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 at plv=300
- \unless\ifx\series at maybe@drop at one@m at x\@undefined % pl5 + develop
- \ltj@@latex at plv=501
- \else\unless\ifx\series at maybe@drop at one@m\@undefined % patch level 5
- \ltj@@latex at plv=500
- \fi\fi
-\fi
-%%%%%%
\def\merge at kanji@series#1{%
\expandafter\expandafter\expandafter
@@ -757,7 +774,7 @@
\DeclareRobustCommand\useroman[4]{%
\romanencoding{#1}\edef\f at family{#2}\edef\f at series{#3}\edef\f at shape{#4}%
\selectfont\ignorespaces}
-%%%% LaTeX 2020-02-02 END
+%%%% LaTeX >= 2020-02-02 END
\else
%%%% LaTeX 2019-10-01
\DeclareRobustCommand\romanseries[1]{\edef\f at series{#1}}
@@ -794,13 +811,9 @@
\ltj@@is at 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 at font\normalfont
-\ifdefined\@rmfamilyhook
-%%%% LaTeX 2020-02-02
+\ifnum 0\ifltj at ltfilehook@avail1\fi\ifdefined\@rmfamilyhook1\fi>0
+%%%% LaTeX >= 2020-02-02
\let\prepare at family@series at update@kanji=\prepare at family@series at update
\patchcmd\prepare at family@series at update{\fontfamily}{\romanfamily}{}{}
\patchcmd\prepare at family@series at update@kanji{\fontfamily}{\kanjifamily}{}{}
@@ -821,46 +834,35 @@
\patchcmd\update at series@target at value@kanji{\f at series}{\k at series}{}{}
\def\@meta at family@list at kanji{\@elt{mc}\@elt{gt}\@elt{jtt}}
-\ifdefined\@setbfseriesdefaultshook % after 2020-04-07
- \g at addto@macro\@setbfseriesdefaultshook{%
- \let\bfseries at mc\bfdef at ult
- \let\bfseries at gt\bfdef at ult
- \let\bfseries at jtt\bfdef at ult
- }
-\else % 2020-02-02
- \expandafter\patchcmd\csname bfseries \endcsname{%
- \let\bfseries at rm\bfdef at ult
- \let\bfseries at sf\bfdef at ult
- \let\bfseries at tt\bfdef at ult
- }{%
- \let\bfseries at rm\bfdef at ult
- \let\bfseries at sf\bfdef at ult
- \let\bfseries at tt\bfdef at ult
- \let\bfseries at mc\bfdef at ult
- \let\bfseries at gt\bfdef at ult
- \let\bfseries at jtt\bfdef at ult
- }{}{}
-\fi
-\ifdefined\@setmdseriesdefaultshook % after 2020-04-07
- \g at addto@macro\@setmdseriesdefaultshook{%
- \let\mdseries at mc\mddef at ult
- \let\mdseries at gt\mddef at ult
- \let\mdseries at jtt\mddef at ult
- }
-\else % 2020-02-02
- \expandafter\patchcmd\csname mdseries \endcsname{%
- \let\mdseries at rm\mddef at ult
- \let\mdseries at sf\mddef at ult
- \let\mdseries at tt\mddef at ult
- }{%
- \let\mdseries at rm\mddef at ult
- \let\mdseries at sf\mddef at ult
- \let\mdseries at tt\mddef at ult
- \let\mdseries at mc\mddef at ult
- \let\mdseries at gt\mddef at ult
- \let\mdseries at jtt\mddef at ult
- }{}{}
-\fi
+\def\@ltj at hook@series at default#1#2#3{
+ \ifltj at ltfilehook@avail % 2020-10-01
+ \AddToHook{#1/defaults}{#2}%
+ \else\ifcsname @set#1defaultshook\endcsname %after 2020-04-07
+ \expandafter\g at addto@macro\csname @set#1defaultshook\endcsname{#2}%
+ \else % 2020-02-02
+ \expandafter\patchcmd\csname #1 \endcsname{#3}{#3#2}{}{}
+ \fi\fi
+}
+\@ltj at hook@series at default{bfseries}{
+ \let\bfseries at mc\bfdef at ult
+ \let\bfseries at gt\bfdef at ult
+ \let\bfseries at jtt\bfdef at ult
+}{
+ \let\bfseries at rm\bfdef at ult
+ \let\bfseries at sf\bfdef at ult
+ \let\bfseries at tt\bfdef at ult
+}
+\@ltj at hook@series at default{mdseries}{
+ \let\mdseries at mc\mddef at ult
+ \let\mdseries at gt\mddef at ult
+ \let\mdseries at jtt\mddef at ult
+}{
+ \let\mdseries at rm\mddef at ult
+ \let\mdseries at sf\mddef at ult
+ \let\mdseries at tt\mddef at ult
+}
+\let\@ltj at hook@series at default\@undefined
+
\expandafter\patchcmd\csname bfseries \endcsname{%
\ifx\f at family\rmdef at ult \fontseries\bfseries at rm
\else\ifx\f at family\sfdef at ult \fontseries\bfseries at sf
@@ -887,46 +889,91 @@
\else \romanseries\mddefault
\fi\fi\fi
}{}{}
-\expandafter\patchcmd\csname bfseries \endcsname{\selectfont}%
-{%
+
+\def\@ltj at hook@series#1#2{
+ \ifltj at ltfilehook@avail % 2020-10-01
+ \AddToHook{#1}{#2}%
+ \else % 2020-02-02
+ \expandafter\patchcmd\csname #1 \endcsname{\selectfont}{#2\selectfont}{}{}
+ \fi
+}
+\@ltj at hook@series{bfseries}{%
\ifx\k at family\mcdef at ult \kanjiseries\bfseries at mc
\else\ifx\k at family\gtdef at ult \kanjiseries\bfseries at gt
\else\ifx\k at family\jttdef at ult\kanjiseries\bfseries at jtt
\else \kanjiseries\bfdefault
\fi\fi\fi
- \selectfont
-}{}{}
-\expandafter\patchcmd\csname mdseries \endcsname{\selectfont}%
-{%
+}
+\@ltj at hook@series{mdseries}{%
\ifx\k at family\mcdef at ult \kanjiseries\mdseries at mc
\else\ifx\k at family\gtdef at ult \kanjiseries\mdseries at gt
\else\ifx\k at family\jttdef at ult\kanjiseries\mdseries at jtt
\else \kanjiseries\mddefault
\fi\fi\fi
- \selectfont
-}{}{}
-\ifdefined\@expandfontdefaultshook % 2020-04-07
- \g at addto@macro\@expandfontdefaultshook{%
- \edef\mcdef at ult{\mcdefault}%
- \edef\gtdef at ult{\gtdefault}%
- \edef\jttdef at ult{\jttdefault}%
- \edef\kanjidef at ult{\kanjifamilydefault}%
+}
+\let\@ltj at hook@series\@undefined
+
+\def\@ltj at hook@efd#1#2{
+ \ifltj at ltfilehook@avail % 2020-10-01
+ \AddToHook{expand at font@defaults}{#1}%
+ \else\ifdefined\@expandfontdefaultshook %after 2020-04-07
+ \g at addto@macro\@expandfontdefaultshook{#1#2}%
+ \else % 2020-02-02
+ \appto\expand at font@defaults{#1#2}%
+ \fi\fi
+}
+\@ltj at hook@efd{%
+ \edef\mcdef at ult{\mcdefault}%
+ \edef\gtdef at ult{\gtdefault}%
+ \edef\jttdef at ult{\jttdefault}%
+}{\edef\kanjidef at ult{\kanjifamilydefault}}
+\let\@ltj at hook@efd\@undefined
+
+\ifltj at ltfilehook@avail % 2020-10-01
+ \appto\init at series@setup{
+ \ifx\kanjiseriesdefault\kanjiseriesdefault at kernel
+ \mdseries
+ \let\kanjiseriesdefault\k at series
+ \fi
}
-\else % 2020-02-02
- \appto\expand at font@defaults{%
- \edef\mcdef at ult{\mcdefault}%
- \edef\gtdef at ult{\gtdefault}%
- \edef\jttdef at ult{\jttdefault}%
- \edef\kanjidef at ult{\kanjifamilydefault}%
+\else
+ \appto\init at series@setup{%
+ \ifx\kanjidef at ult\mcdef at ult \mcfamily
+ \else\ifx\kanjidef at ult\gtdef at ult \gtfamily
+ \else\ifx\kanjidef at ult\jttdef at ult \jttfamily
+ \fi\fi\fi
}
\fi
-\appto\init at series@setup{%
- \ifx\kanjidef at ult\mcdef at ult \mcfamily
- \else\ifx\kanjidef at ult\gtdef at ult \gtfamily
- \else\ifx\kanjidef at ult\jttdef at ult \jttfamily
- \fi\fi\fi
+
+\def\@ltj at hook@dfh#1{
+ \ifltj at ltfilehook@avail % 2020-10-01
+ \AddToHook{normalfont}{#1}%
+ \else\ifdefined\@defaultfamilyhook
+ \g at addto@macro\@defaultfamilyhook{#1}%
+ \else % 2020-02-02
+ \expandafter\patchcmd\csname normalfont \endcsname{\selectfont}{#1\selectfont}{}{}
+ \let\reset at font\normalfont
+ \fi\fi
}
+\@ltj at hook@dfh{%
+ \kanjiencoding{\kanjiencodingdefault}%
+ \edef\k at family{\kanjifamilydefault}%
+ \edef\k at series{\kanjiseriesdefault}%
+ \edef\k at shape{\kanjishapedefault}%
+}
+\let\@ltj at 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 at font\normalfont
+%%%% LaTeX 2019-10-01 END
\fi
+
+
+
\ifdefined\prepare at family@series at update@kanji\else
%%%% LaTeX 2019-10-01
\def\prepare at family@series at update@kanji#1{\kanjifamily}
@@ -942,13 +989,12 @@
\selectfont}
-
\let\romanprocess at table\process at table
\def\kanjiprocess at table{%
- \kanjiencoding{\kanjiencodingdefault}%
- \kanjifamily{\kanjifamilydefault}%
- \kanjiseries{\kanjiseriesdefault}%
- \kanjishape{\kanjishapedefault}%
+ \kanjiencoding\kanjiencodingdefault%
+ \edef\k at family{\kanjifamilydefault}%
+ \edef\k at series{\kanjiseriesdefault}%
+ \edef\k at shape{\kanjishapedefault}%
}
\def\process at table{%
\romanprocess at table
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -2,37 +2,59 @@
% lltjp-atbegshi.sty
%
-\newif\ifltj at ltshipout@avail
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-atbegshi}[2020-09-13 Patching \string\shipout\space hooks for LuaTeX-ja]
-\@ifl at t@r\fmtversion{2020-10-01}{%
- \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltshipout@availtrue\fi
- \else\ltj at ltshipout@availtrue\fi
-}{}
-\ifltj at 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 at ltshipout@avail
+\ifltj at 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}
+\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
-%</ltshipout>-----------------------------------
-
\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 at shipout
+\fi
+\AtBeginShipoutInit
+\DeclareRobustCommand \AtBeginDvi [1]{%
+ \global \setbox \@begindvibox
+ \vbox{\yoko\unvbox \@begindvibox #1}%
+}
%% internal macros are locally effective
\begingroup
Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty 2020-10-01 21:06:10 UTC (rev 56504)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-preview.sty 2020-10-01 21:06:45 UTC (rev 56505)
@@ -3,20 +3,7 @@
%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-preview}[2018/01/20 Patch to preview for LuaTeX-ja]
-
-\RequirePackage{etoolbox,preview}
-\newbox\ltj at preview@box
-
-\patchcmd\pr at endbox{%
- \pr at ship@end
-}{%
- \setbox\ltj at preview@box=\box\AtBeginShipoutBox
- \setbox\AtBeginShipoutBox=\vbox{\yoko\box\pr at box}%
- \directlua{luatexja.direction.finalize()}%
- \setbox\pr at box=\box\AtBeginShipoutBox
- \setbox\AtBeginShipoutBox=\box\ltj at preview@box
- \pr at ship@end
-}{}{}
-
+\ProvidesPackage{lltjp-preview}[2020-10-01 Patch to preview for LuaTeX-ja]
+\RequirePackage{preview}
+\let\pr at shipout=\ltj at shipout
\endinput
More information about the tex-live-commits
mailing list.