texlive[59248] Master/texmf-dist: luatexja (17may21)

commits+karl at tug.org commits+karl at tug.org
Mon May 17 22:46:20 CEST 2021


Revision: 59248
          http://tug.org/svn/texlive?view=revision&revision=59248
Author:   karl
Date:     2021-05-17 22:46:20 +0200 (Mon, 17 May 2021)
Log Message:
-----------
luatexja (17may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/luatex/luatexja/README
    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-ruby.pdf
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex
    trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
    trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
    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-footmisc.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README	2021-05-17 20:46:20 UTC (rev 59248)
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20210319.0
+The LuaTeX-ja Package 20210517.0
 --------------------------------
 Copyright (c) 2011--2021 The LuaTeX-ja project
 License: modified BSD (see COPYING)
@@ -42,9 +42,9 @@
 2. If you must/want to install manually:
 
    a. Download the source archive from CTAN,
-      or tagged as 20210319.0 in the Git repository by
+      or tagged as 20210517.0 in the Git repository by
       <http://git.osdn.jp/view?p=luatex-ja/luatexja.git
-                              ;a=snapshot;h=refs/tags/20210319.0;sf=tgz>
+                              ;a=snapshot;h=refs/tags/20210517.0;sf=tgz>
 
    b. Extract the archive and process following three files by LuaLaTeX
       to generate classes for Japanese typesetting:
@@ -93,4 +93,4 @@
   This file and ltj-kinsoku.lua are not used anymore.
   (Do not remove ltj-kinsoku.tex.)
 
-Last commit date: Fri Mar 19 19:52:23 2021 +0900
+Last commit date: Mon May 17 11:57:27 2021 +0900

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-ruby.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex	2021-05-17 20:46:20 UTC (rev 59248)
@@ -853,6 +853,8 @@
   ◆\ruby{A}{◆◆◆◆◆}◆\\◆\ruby{A}{◆◆◆◆◆◆}◆\\◆A◆
   
   \makebox[10\zw][s]{値とは\ruby{\texttt{;}}{セミコロン}で区切}%
+
+  \ltjruby{痛}{いたみ}(\ltjruby{病}{びやう}あ
 }
 \fbox{\box0}
 

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2021-05-17 20:46:20 UTC (rev 59248)
@@ -238,9 +238,6 @@
 grammatical (and contextual) errors.} Also, several parts
 are written in Japanese only.
 %</en>
-%<*ja>
-\emph{\large 本ドキュメントはまだまだ未完成です.}
-%</ja>
 
 \clearpage
 %<en>\part{User's manual}
@@ -3371,28 +3368,36 @@
 %</ja>
 
 %<*en>
-\subsection{Overridden box primitives}
-To cope with multiple directions, the following primitives are
-overridden by \LuaTeX-ja, using~\verb+\protected\def+.
+\section{Redefined primitives by \LuaTeX-ja}
+The following primitives are redefined by \LuaTeX-ja (using~\verb+\protected\def+),
+for supporting Japanese typesetting and multiple directions:
 \begin{cslist}[style=standard]
+ \item[\cs{/}]
  \item[\cs{unhbox}<num>\textrm{, }\cs{unvbox}<num>\textrm{, }\cs{unhcopy}<num>\textrm{, }\cs{unvcopy}<num>]
  \item[\cs{vadjust}\{<material>\}]
  \item[\cs{insert}<number>\{<material>\}]
  \item[\cs{lastbox}]
- \item[\cs{raise}<dimen><box>\textrm{, }\cs{lower}<dimen><box>\textrm{\ etc., }\cs{vcenter}]
- \item[\cs{vcenter}]
+ \item[\cs{raise}<dimen><box>\textrm{, }\cs{lower}<dimen><box>\textrm{, }
+   \cs{moveleft}<dimen><box>\textrm{, }\cs{moveright}<dimen><box>\textrm{, }]
+ \item[\cs{split}<number>to<dimen>\textrm{, }\cs{vcenter}\{<material>\}]
 \end{cslist}
+
+On each primitive \cs{<primitive>} in the list above,
+its meaning just before loading \LuaTeX-ja is backed up into \cs{ltj@@orig@<primitive>},
+and the meaning after redefinition by \LuaTeX-ja is stored in \cs{ltj@@<primitive>}.
+For example, \autoref{fig:primitive_meaning} shows the situation of \cs{vadjust} primitive.
 %</en>
 %<*ja>
-\subsection{プリミティブの再定義}
-異なる組方向に対応するために,以下に挙げるプリミティブは
-\LuaTeX-jaによる前処理もしくは後処理が行われるように
-\ \verb+\protected\def+ により再定義してある.
+\section{プリミティブの再定義}
+\LuaTeX-jaでは和文組版や異なる組方向に対応するために,以下に挙げるプリミティブは
+\ \verb+\protected\def+ により再定義を行っている.
 
 \begin{cslist}
- \item[\cs{unhbox}<num>\textrm{, }\cs{unvbox}<num>\textrm{, }\cs{unhcopy}<num>\textrm{, }\cs{unvcopy}<num>]
+ \item[\cs{/}]
+ 和文フォントに対するイタリック補正のサポートが追加されている.
+ \item[\cs{unhbox}<number>\textrm{, }\cs{unvbox}<number>\textrm{, }\cs{unhcopy}<number>\textrm{, }\cs{unvcopy}<number>]
  ボックスの組方向が現在のリストと異なる場合は事前にエラーメッセージを出力する.
- \pTeX と異なり,エラーを無視して無理矢理 \cs{unhbox}, \cs{unvbox} を
+ \pTeX と異なり,エラーを無視して無理矢理 \cs{unhbox}, \cs{unvbox} 等を
  続行させることもできるが,その場合の組版結果は保証しない.
  \item[\cs{vadjust}\{<material>\}] 一旦プリミティブ本来の挙動を行う.その後,<material>の組方向が
  周囲の垂直リストの組方向と一致しない場合にエラーを出力し,
@@ -3403,11 +3408,82 @@
  \item[\cs{lastbox}] ボックスの「中身」を現在の組方向に合わせるためのノード
 	      (\textit{dir\_box}という)を必要ならば除去し,
  正しく「中身」のボックスが返されるように前処理をする.
- \item[\cs{raise}<dimen><box>\textrm{, }\cs{lower}<dimen><box>\textrm{\ etc., }\cs{vcenter}]
- 一方,こちらでは必要に応じて\textit{dir\_box}を作成する前処理を追加している.
+ \item[\cs{raise}<dimen><box>\textrm{, }\cs{lower}<dimen><box>\textrm{, }
+   \cs{moveleft}<dimen><box>\textrm{, }\cs{moveright}<dimen><box>\textrm{, }]
+  \leavevmode\vspace{-\baselineskip}
+ \item[\cs{split}<number>to<dimen>\textrm{, }\cs{vcenter}\{<material>\}]
+ これらのプリミティブについては必要に応じて\textit{dir\_box}を作成する前処理を追加している.
 \end{cslist}
+
+上記の一覧中にあるプリミティブ\cs{<primitive>}については,
+\LuaTeX-ja読み込み前の意味が\cs{ltj@@orig@<primitive>}に,
+そして\LuaTeX-jaによる再定義後の意味が\cs{ltj@@<primitive>}に保存される.
+例えば,\cs{vadjust}については\autoref{fig:primitive_meaning}のようになっている.
 %</ja>
+\begin{figure}
+\begin{LTXexample}[width=.55\textwidth]
+\makeatletter\scriptsize\ttfamily
+\meaning\vadjust        \\ % current
+\meaning\ltj@@vadjust   \\ % LuaTeX-ja
+\meaning\ltj@@orig at vadjust % original
+\end{LTXexample}
+\caption{Redefining \cs{vadjust} primitive by \LuaTeX-ja}
+\label{fig:primitive_meaning}
+\end{figure}
 
+%<*en>
+\subsection{Suppressing redefinitions}
+Sometimes redefining primitives by \LuaTeX-ja causes a problem.
+For example, the \Pkg{breqn} package~(v0.98k) assumes that \cs{vadjust}~and~\cs{insert} have
+their primitive meanings.
+So, this package cannot by loaded after \LuaTeX-ja by default.
+
+\LuaTeX-ja version~20210517.0 has features for that problem. Namely:
+\begin{itemize}
+  \item Primitives which is listed in \cs{ltj at stop@overwrite at primitive} are 
+  retain their meanings at just before loading \LuaTeX-ja.
+  \item After loading \LuaTeX-ja,
+  one can specify primitives to \cs{ltj at overwrite@primitive}, to redefine them by \LuaTeX-ja.
+\end{itemize}
+See \autoref{fig:primitive_overwrite} for an example.
+%</en>
+%<*ja>
+\subsection{再定義の抑制}
+場合によっては\LuaTeX-jaによるプリミティブの再定義が不都合を起こすこともある.
+たとえば,\Pkg{breqn}パッケージ(少なくともv0.98k, 2020\nobreakdash-09\nobreakdash-24))は
+読み込み時に\cs{vadjust}, \cs{insert}がプリミティブのままであることを要請するので,
+このままでは\LuaTeX-jaの後で読み込むことはできない.
+
+この状況に対応するため,バージョン20210517.0以降では
+\begin{itemize}
+  \item 制御綴\cs{ltj at stop@overwrite at primitive}内に並べられたプリミティブは,
+  \LuaTeX-ja読み込み直前時の意味のままとなる.
+  \item \LuaTeX-ja読み込み後に
+  \cs{ltj at overwrite@primitive}に引数として与えたプリミティブを与えることで,
+  それらを「\LuaTeX-jaによって再定義する」際の意味に再定義する
+\end{itemize}
+機能を導入した.使用例については\autoref{fig:primitive_overwrite}を参照.
+%</ja>
+\begin{figure}
+\begin{lstlisting}
+\makeatletter
+\def\ltj at stop@overwrite at primitive{\insert\vadjust\/\unhbox\vcenter\fontseries}
+\makeatother
+  %% Keep the meaning of \insert, \vadjust, \/, \unhbox and \vcenter.
+  %% \fontseries will still be redefined by \LuaTeX-ja, because it is not primitive.
+\usepackage{luatexja}
+...
+\usepackage{breqn}
+...
+\makeatletter
+\ltj at overwrite@primitive\expandafter{\insert\vadjust\/\unhbox\vcenter}
+\makeatother
+  %% Redefine \insert, \vadjust, \/, \unhbox and \vcenter.
+\end{lstlisting}
+\caption{\cs{ltj at stop@overwrite at primitive} and \cs{ltj at overwrite@primitive}}
+\label{fig:primitive_overwrite}
+\end{figure}
+
 %<en>\section{Font Metric and Japanese Font}
 %<ja>\section{フォントメトリックと和文フォント}
 %<en>\subsection{\cs{jfont}}

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -4,7 +4,7 @@
 
 % LaTeX only!
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-ruby}[2020-12-25 v0.51]
+\ProvidesPackage{luatexja-ruby}[2021-05-04 v0.52]
 \RequirePackage{luatexja}
 
 %%------------------

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}[2020-09-30 v1.2k-ltj-12 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2021-04-20 v1.2k-ltj-13 Macros for vertical writing]
 \RequirePackage{luatexja}
 \newcount\ltj at ext@dir
 \let\ltj at lltjext@orig at tabular=\tabular
@@ -28,7 +28,7 @@
    \setlength\dimen@{#2}%
    \edef\@halignto{to\the\dimen@}\p at tabular<#1>}
 \def\p at tabular<#1>{\leavevmode \hbox \bgroup 
-   \ltj at ext@dir=\ltjgetparameter{direction}
+   \ltj at ext@dir=\ltjgetparameter{direction}\relax
    $\let\@acol\@tabacol
    \let\@classz\@tabclassz
    \let\@classiv\@tabclassiv \let\\\@tabularcr\p at tabarray<#1>}
@@ -36,6 +36,7 @@
    {\p at array<#1>}{\p at array<#1>[c]}}
 
 \def\p at array<#1>[#2]#3{%
+  \ifnum\ltj at ext@dir=0 \ltj at ext@dir=\ltjgetparameter{direction}\relax\fi
   \let\box at dir\relax
   \if #1z\relax
     \ifnum\ltj at ext@dir=3\relax
@@ -674,7 +675,7 @@
 
 \def\ltj at lltjext@patch at array{%
   \patchcmd{\@tabular}{\hbox\bgroup}{%
-	\hbox\bgroup\ltj at ext@dir=\ltjgetparameter{direction}}{}{}
+	\hbox\bgroup\ltj at ext@dir=\ltjgetparameter{direction}\relax}{}{}
   \pretocmd{\array}%
 	{\ltj at ext@dir=\ltjgetparameter{direction}\relax}{}{}
   \expandafter\let\csname tabular*\endcsname=\ltj at lltjext@orig at tabularS
@@ -702,6 +703,7 @@
   }%
   \def\@tabarray{\@ifnextchar<\p at tabarray{\p at tabarray<Z>}}
   \def\p at array<##1>[##2]##3{%
+    \ifnum\ltj at ext@dir=0 \ltj at ext@dir=\ltjgetparameter{direction}\relax\fi
     \let\box at dir\relax
     \if ##1z\relax
       \ifnum\ltj at ext@dir=3\relax
@@ -734,7 +736,7 @@
     \fork at array@option<##1>[##2]%
     \begingroup
     \@mkpream{##3}%
-    \xdef\@preamble{\ialign \noexpand \@halignto
+    \xdef\@preamble{\noexpand\ialign \noexpand \@halignto
                     \bgroup \tabskip \z at skip \@arstrut \@preamble
                             \tabskip \z@ \cr}%
     \endgroup

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -12,7 +12,7 @@
 \def\luatexjalatexLoaded{\endinput}
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ltj-latex}[2021-03-18 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2021-05-17 LaTeX support of LuaTeX-ja]
 
 \endlinechar=13
 
@@ -46,7 +46,6 @@
   \ifcsname tex_shipout:D\endcsname
     \expandafter\let\csname tex_shipout:D\endcsname\ltj at shipout
   \fi
-  \directlua{luatexja.direction.shipout_lthook = nil}
 \else
   \directlua{%
     luatexbase.add_to_callback('pre_shipout_filter',luatexja.direction.shipout_lthook, 'ltj.direction', 1)
@@ -122,6 +121,50 @@
 
 \RequirePackage{lltjp-geometry}
 
+\def\ltj@@q at stop{\ltj@@q at stop}
+\ifdefined\ltj at stop@overwrite at primitive
+  \begingroup
+    \def\ltj at loop#1{%
+      \unless\ifx#1\ltj@@q at stop
+        \escapechar-1
+        \ifcsname ltj@@orig@\string#1\endcsname
+          \ifcsname ltj@@\string#1\endcsname
+            \edef\ltj@@next{\unexpanded{\global\let#1}\csname ltj@@orig@\string#1\endcsname}%
+            \edef\ltj@@temp{ltj@@orig@\string#1}%
+            \escapechar92
+            \PackageInfo{luatexja}{%
+              Restoring \string#1\space into its orignal meaning\MessageBreak
+              (\expandafter\meaning\csname\ltj@@temp\endcsname)}%
+            \ltj@@next%
+          \fi
+        \fi
+        \let\ltj@@next\ltj at loop
+      \else\let\ltj@@next\relax\fi\ltj@@next
+    }%
+    \expandafter\ltj at loop\ltj at stop@overwrite at primitive\ltj@@q at stop
+  \endgroup
+\fi
+\def\ltj at overwrite@primitive#1{%
+  \begingroup
+    \def\ltj at loop##1{%
+      \unless\ifx##1\ltj@@q at stop
+        \escapechar-1
+        \edef\ltj@@next{\unexpanded{\let\ltj@@temp}\csname ltj@@\string##1\endcsname}\ltj@@next
+        \ifx\ltj@@temp\relax
+        \else\ifx\ltj@@temp##1
+           \escapechar92
+           \PackageInfo{luatexja}{No need to redefine \string##1}%
+        \else
+          \edef\ltj@@next{\unexpanded{\global\let##1}\csname ltj@@\string##1\endcsname}%
+           \escapechar92\PackageInfo{luatexja}{Redefining \string##1}\ltj@@next%
+        \fi\fi
+        \let\ltj@@next\ltj at loop
+      \else\let\ltj@@next\relax\fi\ltj@@next
+    }%
+    \ltj at loop#1\ltj@@q at stop
+  \endgroup
+}
+
 %%------------------ all done
 \ltj at latex@AtEnd
 \endinput

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2021-05-17 20:46:20 UTC (rev 59248)
@@ -3,7 +3,7 @@
 --
 luatexbase.provides_module({
   name = 'luatexja.ruby',
-  date = '2020-10-30',
+  date = '2021-05-04',
   description = 'Ruby annotation',
 })
 luatexja.ruby = {}
@@ -544,12 +544,13 @@
              local op = (atr>0) and (old_break_info[atr] or post_intrusion_backup) or 0
              max_allow_pre = max(0, -max_allow_pre - op)
          end
-         if rst.exclude_pre_from_prev_ruby  and ((atr>0) and (old_break_info[-atr]>0) or post_jfmgk_backup) then
+         if rst.exclude_pre_from_prev_ruby  and atr>0 and old_break_info[-atr]
+           and (old_break_info[-atr]>0 or post_jfmgk_backup) then
             -- 「直前のルビが JFM グルーに進入→現在のルビの前文字進入はなし」という状況
             max_allow_pre = 0; rst.exclude_pre_from_prev_ruby=false
          end
          if rst.exclude_pre_jfmgk_from_prev_ruby
-            and (atr>0) and ((old_break_info[atr]  or post_intrusion_backup) > 0) then
+            and atr>0 and ((old_break_info[atr]  or post_intrusion_backup) > 0) then
             -- 「直前のルビが文字に進入→現在のルビの和文処理グルーへの進入はなし」という状況
             rst.before_jfmgk = 0
          end

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -65,7 +65,7 @@
   \expandafter\let\csname ifltj at in@latex\expandafter\endcsname
     \csname iftrue\endcsname
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{luatexja-core}[2021-03-16 Core of LuaTeX-ja]
+  \ProvidesPackage{luatexja-core}[2021-05-11 Core of LuaTeX-ja]
 \fi                             %</LaTeX>
 
 %% Load prerequisite packages.
@@ -215,7 +215,11 @@
     stop_time_measure(scan_arg())
   end
 }
-\protected\def\/{\relax\luafunction\ltj@@italic at inner}
+\begingroup\catcode`\/=11
+\global\let\ltj@@orig@/=\/
+\protected\gdef\ltj@@/{\relax\luafunction\ltj@@italic at inner}
+\global\let\/\ltj@@/ %% PRIMITIVE
+\endgroup
 \luadef\ltj@@start at time@measure\ltj@@start at time@measure at inner
 \luadef\ltj@@stop at time@measure\ltj@@stop at time@measure at inner
 
@@ -603,7 +607,7 @@
 \yoko
 
 %%%% insert
-\let\orig at insert=\insert
+\let\ltj@@orig at insert\insert
 \newluafunction\ltj@@lua at populate@insertwhatsit at inner
 \directlua{
   local t = lua.get_functions_table()
@@ -611,20 +615,29 @@
     = luatexja.direction.populate_insertion_dir_whatsit
 }
 \luadef\ltj@@lua at populate@insertwhatsit\ltj@@lua at populate@insertwhatsit at inner
-\protected\def\insert{\begingroup\afterassignment\ltj@@insert at A\ltj at tempcnta}
-\protected\def\ltj@@insert at A{\orig at insert\ltj at tempcnta\bgroup
+\protected\def\ltj@@insert{\begingroup\afterassignment\ltj@@insert at A\ltj at tempcnta}
+\let\insert\ltj@@insert %% PRIMITIVE
+\protected\def\ltj@@insert at A{\ltj@@orig at insert\ltj at tempcnta\bgroup
   \aftergroup\ltj@@insert at B\let\ltj@@next}
 \protected\def\ltj@@insert at B{\ltj@@lua at populate@insertwhatsit\endgroup}
 
 %%%% vadjust
-\let\ltj@@orig at vadjust=\vadjust
-\protected\def\vadjust{%
-  \ltj@@orig at vadjust\bgroup
-  \directlua{luatexja.direction.set_list_direction_hook('adj')}%
+\let\ltj@@orig at vadjust\vadjust
+\newluafunction\ltj@@vadjust at dirhook@inner
+\newluafunction\ltj@@vadjust at check@dir at inner
+\directlua{
+  local t = lua.get_functions_table()
+  t[\the\ltj@@vadjust at dirhook@inner]
+    = function () luatexja.direction.set_list_direction_hook('adj') end
+  t[\the\ltj@@vadjust at check@dir at inner]
+    = luatexja.direction.check_adjust_direction()
+}
+\luadef\ltj@@vadjust at dirhook\ltj@@vadjust at dirhook@inner
+\protected\luadef\ltj@@vadjust at check@dir\ltj@@vadjust at check@dir at inner
+\protected\def\ltj@@vadjust{%
+  \ltj@@orig at vadjust\bgroup\ltj@@vadjust at dirhook
   \aftergroup\ltj@@vadjust at check@dir\let\ltj@@next}
-\protected\def\ltj@@vadjust at check@dir{%
-  \directlua{luatexja.direction.check_adjust_direction()}%
-}
+\let\vadjust\ltj@@vadjust %% PRIMITIVE
 
 %%%% \hbox, \vbox, \vtop
 \setbox\z@\hbox{%
@@ -653,9 +666,9 @@
   \PushPreHook{hbox}{\ltj@@box at dirhook\aftergroup\ltj@@reset at badness}
   \PushPreHook{vbox}{\ltj@@box at dirhook\aftergroup\ltj@@reset at badness}
 \else
-  \let\ltj@@everyhbox=\everyhbox\let\ltj@@everyvbox=\everyvbox
+  \let\ltj@@everyhbox\everyhbox\let\ltj@@everyvbox\everyvbox
   \newtoks\ltj@@i at everyhbox\newtoks\ltj@@i at everyvbox
-  \let\everyhbox=\ltj@@i at everyhbox\let\everyvbox=\ltj@@i at everyvbox
+  \let\everyhbox\ltj@@i at everyhbox\let\everyvbox\ltj@@i at everyvbox
   \ltj@@everyhbox{\ltj@@box at dirhook
     \aftergroup\ltj@@reset at badness\the\ltj@@i at everyhbox}
   \ltj@@everyvbox{\ltj@@box at dirhook
@@ -671,35 +684,41 @@
   t[\the\ltj@@lua at raisebox@inner]=luatexja.direction.raise_box
 }
 \protected\luadef\ltj@@lua at raisebox\ltj@@lua at raisebox@inner
-\let\ltj@@orig at raise=\raise
-\let\ltj@@orig at lower=\lower
-\protected\def\raise{\ltj at reset@globaldefs\afterassignment\ltj@@raise\ltj at tempdima}
-\protected\def\lower{\ltj at reset@globaldefs\afterassignment\ltj@@raise\ltj at tempdima-}
-\protected\def\ltj@@raise{%
+\let\ltj@@orig at raise\raise
+\let\ltj@@orig at lower\lower
+\protected\def\ltj@@raise{\ltj at reset@globaldefs\afterassignment\ltj@@raise@\ltj at tempdima}
+\protected\def\ltj@@lower{\ltj at reset@globaldefs\afterassignment\ltj@@raise@\ltj at tempdima-}
+\protected\def\ltj@@raise@{%
   \ltj at restore@globaldefs
   \edef\ltj@@raise at a{%
     \ltj@@lua at raisebox\ltj@@orig at raise\the\ltj at tempdima\noexpand\box\ltj at afbox
   }\ltj at afterbox\ltj@@raise at a}
-\let\ltj@@orig at moveleft=\moveleft
-\let\ltj@@orig at moveright=\moveright
-\protected\def\moveleft{\ltj at reset@globaldefs\afterassignment\ltj@@moveleft\ltj at tempdima}
-\protected\def\moveright{\ltj at reset@globaldefs\afterassignment\ltj@@moveleft\ltj at tempdima-}
-\protected\def\ltj@@moveleft{%
+\let\ltj@@orig at moveleft\moveleft
+\let\ltj@@orig at moveright\moveright
+\protected\def\ltj@@moveleft{\ltj at reset@globaldefs\afterassignment\ltj@@moveleft@\ltj at tempdima}
+\protected\def\ltj@@moveright{\ltj at reset@globaldefs\afterassignment\ltj@@moveleft@\ltj at tempdima-}
+\protected\def\ltj@@moveleft@{%
   \ltj at restore@globaldefs
   \edef\ltj@@moveleft at a{%
     \ltj@@lua at raisebox\ltj@@orig at moveleft\the\ltj at tempdima\noexpand\box\ltj at afbox
   }\ltj at afterbox\ltj@@moveleft at a}
+\let\raise\ltj@@raise %% PRIMITIVE
+\let\lower\ltj@@lower %% PRIMITIVE
+\let\moveleft\ltj@@moveleft %% PRIMITIVE
+\let\moveright\ltj@@moveright %% PRIMITIVE
 
 %%%%\vsplit
-\let\ltj@@orig at vsplit=\vsplit
-\protected\def\vsplit{\directlua{luatexja.direction.vsplit()}}
+\let\ltj@@orig at vsplit\vsplit
+\protected\def\ltj@@vsplit{\directlua{luatexja.direction.vsplit()}}
+\let\vsplit\ltj@@vsplit %% PRIMITIVE
 
 %%%% \vcenter
-\let\ltj@@orig at vcenter=\vcenter
-\protected\def\vcenter{\ltj at afterbox\ltj@@vcenter\vbox}
-\protected\def\ltj@@vcenter{%
+\let\ltj@@orig at vcenter\vcenter
+\protected\def\ltj@@vcenter{\ltj at afterbox\ltj@@vcenter@\vbox}
+\protected\def\ltj@@vcenter@{%
   \ltj@@lua at raisebox\ltj@@orig at vcenter{\box\ltj at afbox}%
 }
+\let\vcenter\ltj@@vcenter %% PRIMITIVE
 
 %%%% \unhbox and \unvbox
 \newluafunction\ltj@@lua at unboxcheckdir@inner
@@ -709,40 +728,38 @@
 }
 \luadef\ltj@@lua at unboxcheckdir\ltj@@lua at unboxcheckdir@inner
 \long\def \@gobbletwo #1#2{}
-\let\ltj@@orig at unhbox=\unhbox
-\let\ltj@@orig at unvbox=\unvbox
-\protected\def\unhbox{\ltj at reset@globaldefs\afterassignment\ltj@@unhbox\ltj at tempcnta}
-\protected\def\unvbox{\ltj at reset@globaldefs\afterassignment\ltj@@unvbox\ltj at tempcnta}
-\protected\def\ltj@@unhbox{%
-  \ltj@@lua at unboxcheckdir\ltj@@orig at unhbox\ltj at tempcnta}
-\protected\def\ltj@@unvbox{%
-  \ltj@@lua at unboxcheckdir\ltj@@orig at unvbox\ltj at tempcnta}
-\let\ltj@@orig at unhcopy=\unhcopy
-\let\ltj@@orig at unvcopy=\unvcopy
-\protected\def\unhcopy{\ltj at reset@globaldefs\afterassignment\ltj@@unhcopy\ltj at tempcnta}
-\protected\def\unvcopy{\ltj at reset@globaldefs\afterassignment\ltj@@unvcopy\ltj at tempcnta}
-\protected\def\ltj@@unhcopy{%
+\let\ltj@@orig at unhbox\unhbox
+\let\ltj@@orig at unvbox\unvbox
+\protected\def\ltj@@unhbox{\ltj at reset@globaldefs\afterassignment\ltj@@unhbox@\ltj at tempcnta}
+\protected\def\ltj@@unvbox{\ltj at reset@globaldefs\afterassignment\ltj@@unvbox@\ltj at tempcnta}
+\protected\def\ltj@@unhbox@{\ltj@@lua at unboxcheckdir\ltj@@orig at unhbox\ltj at tempcnta}
+\protected\def\ltj@@unvbox@{\ltj@@lua at unboxcheckdir\ltj@@orig at unvbox\ltj at tempcnta}
+\let\ltj@@orig at unhcopy\unhcopy
+\let\ltj@@orig at unvcopy\unvcopy
+\protected\def\ltj@@unhcopy{\ltj at reset@globaldefs\afterassignment\ltj@@unhcopy@\ltj at tempcnta}
+\protected\def\ltj@@unvcopy{\ltj at reset@globaldefs\afterassignment\ltj@@unvcopy@\ltj at tempcnta}
+\protected\def\ltj@@unhcopy@{%
   \directlua{luatexja.direction.unbox_check_dir(true)}%
   \ltj@@orig at unhcopy\ltj at tempcnta
   \directlua{luatexja.direction.uncopy_restore_whatsit()}}
-\protected\def\ltj@@unvcopy{%
+\protected\def\ltj@@unvcopy@{%
   \directlua{luatexja.direction.unbox_check_dir(true)}%
   \ltj@@orig at unvcopy\ltj at tempcnta
   \directlua{luatexja.direction.uncopy_restore_whatsit()}}
+\let\unhbox\ltj@@unhbox %% PRIMITIVE
+\let\unvbox\ltj@@unvbox %% PRIMITIVE
+\let\unhcopy\ltj@@unhcopy %% PRIMITIVE
+\let\unvcopy\ltj@@unvcopy %% PRIMITIVE
 
 %%%% lastbox
 \let\ltj@@orig at lastbox=\lastbox
-\protected\def\lastbox{%
-  \directlua{luatexja.direction.lastbox_hook()}\ltj@@orig at lastbox
-}
+\protected\def\ltj@@lastbox{\directlua{luatexja.direction.lastbox_hook()}\ltj@@orig at lastbox}
+\let\lastbox\ltj@@lastbox %% PRIMITIVE
 
 %%%%%%%% \ltjgetwd<box_num> etc.
-\def\ltj@@getwd{%
-  \directlua{luatexja.direction.get_box_dim('width', token.scan_int())}}
-\def\ltj@@getht{%
-  \directlua{luatexja.direction.get_box_dim('height', token.scan_int())}}
-\def\ltj@@getdp{%
-  \directlua{luatexja.direction.get_box_dim('depth', token.scan_int())}}
+\def\ltj@@getwd{\directlua{luatexja.direction.get_box_dim('width', token.scan_int())}}
+\def\ltj@@getht{\directlua{luatexja.direction.get_box_dim('height', token.scan_int())}}
+\def\ltj@@getdp{\directlua{luatexja.direction.get_box_dim('depth', token.scan_int())}}
 \let\ltjgetwd=\ltj@@getwd\let\ltjgetht=\ltj@@getht\let\ltjgetdp=\ltj@@getdp
 
 %%%%%%%% \ltjsetwd<box_num>=<dimen> etc.

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.lua	2021-05-17 20:46:20 UTC (rev 59248)
@@ -521,7 +521,7 @@
             s = s .. ' stream=' .. p.stream
             print_fn(s)
             for i=1,#p.data do
-               print_fn(s .. '  [' .. i .. '] = ' .. tostring(p.data[i].csname))
+               print_fn(s .. '  [' .. i .. '] = ' .. tostring(p.data[i] and p.date[i].csname))
             end
          elseif p.subtype==16 then
             s = s .. ' mode=' .. p.mode .. ', literal="' .. p.data .. '"'

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -35,13 +35,13 @@
   \expandafter\let\csname ifltj at in@latex\expandafter\endcsname
     \csname iftrue\endcsname
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{luatexja}[2021-03-19 Japanese Typesetting with Lua(La)TeX]
+  \ProvidesPackage{luatexja}[2021-05-17 Japanese Typesetting with Lua(La)TeX]
   \DeclareOption{disablejfam}{\ltj at disablejfamtrue}
   \DeclareOption*{}
   \ProcessOptions\relax
 \fi                             %</LaTeX>
 %%%% VERSION
-\def\LuaTeXjaversion{20210319.0}
+\def\LuaTeXjaversion{20210517.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	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjcore.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjcore}[2021-03-19 Patch to LaTeX2e Kernel for LuaTeX-ja]
+\ProvidesPackage{lltjcore}[2021-03-25 Patch to LaTeX2e Kernel for LuaTeX-ja]
 \RequirePackage{etoolbox}
 
 %%% expl3
@@ -266,44 +266,17 @@
 \newif\iffnfixbottom
 \newif\ifltj at ftn@unvboxed
 %%% @makecol
-\gdef \@makecol {%
-   \ifvoid\footins
-     \ltj at ftn@unvboxedfalse
-     \setbox\@outputbox \box\@cclv
-   \else
-     \ltj at ftn@unvboxedtrue
-     \setbox\@outputbox \vbox {%
-       \boxmaxdepth \@maxdepth
-       \unvbox \@cclv
-       \iffnfixbottom\vskip\z@ \@plus.0001fil\fi
-       \vskip \skip\footins
-       \color at begingroup
-         \normalcolor
-         \footnoterule
-         \unvbox \footins
-       \color at endgroup
-       }%
-   \fi
-   \let\@elt\relax
-   \xdef\@freelist{\@freelist\@midlist}%
-   \global \let \@midlist \@empty
-   \@combinefloats
-   \ifvbox\@kludgeins
-     \@makespecialcolbox
-   \else
-     \setbox\@outputbox \vbox to\@colht {%
-       \@texttop
-       \dimen@ \dp\@outputbox
-       \unvbox \@outputbox
-       \unless\ifnum\ltjgetparameter{direction}=4
-         \vbox{\primitive\everypar{}\hskip\z@}%
-       \fi %%% LuaTeX-ja
-       \vskip -\dimen@
-       \ifltj at ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi
-       }%
-   \fi
-   \global \maxdepth \@maxdepth
-}
+\def\pltx at adjust@wd at outputbox{%
+  \unless\ifnum\ltjgetparameter{direction}=4
+    \vbox{\primitive\everypar{}\hskip\z@}%
+   \fi}
+\patchcmd\@makecol{\vskip -\dimen@\@textbottom}%
+  {\pltx at adjust@wd at outputbox
+   \vskip -\dimen@
+   \ifltj at ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi}{}{}
+\patchcmd\@makecol{\vskip\skip\footins}{\iffnfixbottom\vskip\z@\@plus.0001fil\fi\vskip\skip\footins}{}{}
+\patchcmd\@makecol{\ifvoid\footins}{\ifvoid\footins\ltj at ftn@unvboxedfalse}{}{}
+\patchcmd\@makecol{\setbox\@outputbox \vbox}{\ltj at ftn@unvboxedtrue\setbox\@outputbox \vbox}{}{}
 \let\ltj at orig@makecol=\@makecol
 
 \patchcmd\@makespecialcolbox{\@textbottom}{\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	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -21,7 +21,7 @@
 \ifnum\ltj@@latex at plv<1500 % <=2020-10-01
   \kanjiseries{m}
   \kanjishape{n}
-\else % >=2021-05-01
+\else % >=2021-06-01
   \def\k at series{m}
   \def\k at shape{n}
 \fi

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -3,13 +3,13 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjfont}[2021-02-14 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2021-04-29 Patch to NFSS2 for LuaTeX-ja]
 
 %%%%%%%% LaTeX2e version detection
 \newcount\ltj@@latex at plv \ltj@@latex at plv=-1
 \ifltj at ltfilehook@avail
   \IfHookExistsTF{selectfont}%
-    {\ltj@@latex at plv=1500}% 2021-05-01
+    {\ltj@@latex at plv=1500}% 2021-06-01
     {\ifnum\patch at level>2 \ltj@@latex at plv=1300\else \ltj@@latex at plv=1000\fi}% 2020-10-01
 \else\ifdefined\@rmfamilyhook % 2020-02-02
   \ifx\@forced at seriestrue\@undefined % 2020-02-02 pl0--2
@@ -451,7 +451,7 @@
   \ltj@@EverySelectfont at Init
 }
 \EverySelectfont{\ltj at selectfont@patch}
-\else % LaTeX2e >=2021-05-01
+\else % LaTeX2e >=2021-06-01
 \AddToHook{selectfont}[luatexja]{%
   \ltj@@start at time@measure{selectfont}%
   \ifx\delayed at k@adjustment\@empty
@@ -473,6 +473,7 @@
     \fi
     \let\delayed at k@adjustment\@empty
   \fi
+  \@forced at series@kanjifalse
   \let\tmp at error@fontshape\error at fontshape
   \let\error at fontshape\error at kfontshape
   \ltj@@is at kyenc{\k at encoding}\ifin@%
@@ -806,7 +807,7 @@
     \fi
   \fi
 }
-\else % >=2021-05-01
+\else % >=2021-06-01
 \def\merge at kanji@series@#1#2#3\@nil{%
   \def\reserved at a{#3}%
   \ifx\reserved at a\@empty
@@ -891,6 +892,7 @@
 \let\delayed at merge@kanji at shape\merge at kanji@shape at without@substitution
 \fi
 
+\newif\if at forced@series at kanji
 \ifnum\ltj@@latex at plv=300 % 2020-02-02 pl3, 4
   \DeclareRobustCommand\romanseries[1]{\merge at font@series{#1}}
   \DeclareRobustCommand\kanjiseries[1]{\merge at kanji@series{#1}}
@@ -898,20 +900,20 @@
   \DeclareRobustCommand\kanjiseriesforce[1]{\edef\k at series{#1}}
 \else\ifnum\ltj@@latex at plv<1500% >=2020-02-02 pl5 and <=2020-10-01
   \DeclareRobustCommand\romanseries[1]{\@forced at seriesfalse\merge at font@series{#1}}
-  \DeclareRobustCommand\kanjiseries[1]{\@forced at seriesfalse\merge at kanji@series{#1}}
+  \DeclareRobustCommand\kanjiseries[1]{\@forced at series@kanjifalse\merge at kanji@series{#1}}
   \DeclareRobustCommand\romanseriesforce[1]{\@forced at seriestrue\edef\f at series{#1}}
-  \DeclareRobustCommand\kanjiseriesforce[1]{\@forced at seriestrue\edef\k at series{#1}}
-\else% >=2021-05-01
+  \DeclareRobustCommand\kanjiseriesforce[1]{\@forced at series@kanjitrue\edef\k at series{#1}}
+\else% >=2021-06-01
   \DeclareRobustCommand\romanseries[1]{\@forced at seriesfalse
       \expandafter\def\expandafter\delayed at f@adjustment\expandafter
           {\delayed at f@adjustment\delayed at merge@font at series{#1}}}
-  \DeclareRobustCommand\kanjiseries[1]{\@forced at seriesfalse
+  \DeclareRobustCommand\kanjiseries[1]{\@forced at series@kanjifalse
       \expandafter\def\expandafter\delayed at k@adjustment\expandafter
           {\delayed at k@adjustment\delayed at merge@kanji at series{#1}}}
   \DeclareRobustCommand\romanseriesforce[1]{\@forced at seriestrue
       \expandafter\def\expandafter\delayed at f@adjustment\expandafter
           {\delayed at f@adjustment\edef\f at series{#1}}}
-  \DeclareRobustCommand\kanjiseriesforce[1]{\@forced at seriestrue
+  \DeclareRobustCommand\kanjiseriesforce[1]{\@forced at series@kanjitrue
       \expandafter\def\expandafter\delayed at k@adjustment\expandafter
           {\delayed at k@adjustment\edef\k at series{#1}}}
   \let\delayed at k@adjustment\@empty
@@ -930,7 +932,7 @@
   \DeclareRobustCommand\romanshapeforce[1]{\edef\f at shape{#1}}
   \DeclareRobustCommand\kanjishapeforce[1]{\edef\k at shape{#1}}
   \DeclareRobustCommand\fontshapeforce[1]{\set at safe@kanji at shape{#1}{}\romanshapeforce{#1}}
-\else% >=2021-05-01
+\else% >=2021-06-01
   \DeclareRobustCommand\romanshape[1]{%
        \expandafter\def\expandafter\delayed at f@adjustment\expandafter
            {\delayed at f@adjustment\delayed at merge@font at shape{#1}}}
@@ -953,16 +955,28 @@
      \expandafter\def\expandafter\delayed at k@adjustment\expandafter
          {\delayed at k@adjustment\set at safe@kanji at shape{#1}{}}}
 \fi
-\ifnum\ltj@@latex at plv>1000
-%%%% LaTeX >= 2020-10-01 PL3
+\ifnum\ltj@@latex at plv>1499
+%%%% LaTeX >= 2021-06-01
 \DeclareRobustCommand\usekanji[4]{%
     \kanjiencoding{#1}\edef\k at family{#2}%
     \set at target@series at kanji{#3}\edef\k at shape{#4}%
+    \let\delayed at k@adjustment\@empty
     \selectfont\ignorespaces}
 \DeclareRobustCommand\useroman[4]{%
     \romanencoding{#1}\edef\f at family{#2}%
     \set at target@series{#3}\edef\f at shape{#4}%
+    \let\delayed at f@adjustment\@empty
     \selectfont\ignorespaces}
+\else\ifnum\ltj@@latex at plv>1000
+%%%% 2021-10-01 PL3 <= LaTeX < 2021-06-01
+\DeclareRobustCommand\usekanji[4]{%
+    \kanjiencoding{#1}\edef\k at family{#2}%
+    \set at target@series at kanji{#3}\edef\k at shape{#4}%
+    \selectfont\ignorespaces}
+\DeclareRobustCommand\useroman[4]{%
+    \romanencoding{#1}\edef\f at family{#2}%
+    \set at target@series{#3}\edef\f at shape{#4}%
+    \selectfont\ignorespaces}
 \else
 %%%% 2020-10-01 <= LaTeX < 2020-10-01 PL3
 \DeclareRobustCommand\usekanji[4]{%
@@ -971,7 +985,7 @@
 \DeclareRobustCommand\useroman[4]{%
     \romanencoding{#1}\edef\f at family{#2}\edef\f at series{#3}\edef\f at shape{#4}%
     \selectfont\ignorespaces}
-\fi
+\fi\fi
 %%%% LaTeX >= 2020-02-02 END
 \else
 %%%% LaTeX 2019-10-01
@@ -1014,6 +1028,7 @@
 %%%% 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{\if at forced@series}{\if at forced@series at kanji}{}{}
 \patchcmd\prepare at family@series at update@kanji{\fontfamily}{\kanjifamily}{}{}
 \patchcmd\prepare at family@series at update@kanji{\update at series@target at value}{\update at series@target at value@kanji}{}{}
 \patchcmd\prepare at family@series at update@kanji{\f at family}{\k at family}{}{}
@@ -1153,12 +1168,23 @@
     \let\reset at font\normalfont
   \fi\fi
 }
+
+\ifnum\ltj@@latex at plv>1499
 \@ltj at hook@dfh{%
   \kanjiencoding{\kanjiencodingdefault}%
   \edef\k at family{\kanjifamilydefault}%
   \edef\k at series{\kanjiseriesdefault}%
   \edef\k at shape{\kanjishapedefault}%
+  \let\delayed at k@adjustment\empty
 }
+\else
+\@ltj at hook@dfh{%
+  \kanjiencoding{\kanjiencodingdefault}%
+  \edef\k at family{\kanjifamilydefault}%
+  \edef\k at series{\kanjiseriesdefault}%
+  \edef\k at shape{\kanjishapedefault}%
+}
+\fi
 \let\@ltj at hook@dfh\@undefined
 %%%% LaTeX >= 2020-02-02 END
 \else

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-atbegshi.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -13,7 +13,7 @@
 \RequirePackage{expl3}
 \ExplSyntaxOn\makeatletter
 \box_new:N \l__platex_shipout_dummy_box
-\if_cs_exist:N \__shipout_execute_main_cont:Nnnn %% 2021-05-01
+\if_cs_exist:N \__shipout_execute_main_cont:Nnnn %% 2021-06-01
 \cs_new_eq:NN \__platex_original_shipout_execute_main_cont:Nnnn
               \__shipout_execute_main_cont:Nnnn
 \cs_set:Npn \__shipout_execute_main_cont:Nnnn #1#2#3#4 {

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-footmisc.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-footmisc}[2021-03-17 Patch to footmisc for LuaTeX-ja]
+\ProvidesPackage{lltjp-footmisc}[2021-03-25 Patch to footmisc for LuaTeX-ja]
 \RequirePackage{footmisc}
 
 \let  \if at tempswa  \ifFN at bottom
@@ -47,9 +47,7 @@
       \setbox\@outputbox \vbox to\@colht{%
         \@texttop \dimen@\dp\@outputbox
         \unvbox\@outputbox
-        \unless\ifnum\ltjgetparameter{direction}=4
-          \vbox{\primitive\everypar{}\hskip\z@}%
-        \fi %%% LuaTeX-ja
+        \pltx at adjust@wd at outputbox
         \vskip -\dimen@\@textbottom
       }%
     \fi

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -1,5 +1,5 @@
 %
-% lltjp-siunitx.sty 2019-06-06
+% lltjp-siunitx.sty 2021-04-19
 %
 
 \NeedsTeXFormat{LaTeX2e}
@@ -7,6 +7,32 @@
 \RequirePackage{siunitx}
 \makeatletter
 \ExplSyntaxOn
+\cs_if_exist:NTF \siunitx_print_text:n {% siunitx v3.00
+\cs_set_protected:Npn \siunitx_print_text:n #1
+  {
+    \text
+      {
+        \ltj at allalchar % <--- LuaTeX-ja
+        \bool_if:NT \l__siunitx_print_text_family_bool
+          {
+            \fontfamily { \familydefault }
+            \selectfont
+          }
+        \bool_if:NT \l__siunitx_print_text_series_bool
+          {
+            \fontseries { \seriesdefault }
+            \selectfont
+          }
+        \bool_if:NT \l__siunitx_print_text_shape_bool
+          {
+            \fontshape { \shapedefault }
+            \selectfont
+          }
+        \__siunitx_print_text_replace:n {#1}
+      }
+  }
+}% siunitx v3.00 end
+{% siunitx v2.xx
 \cs_generate_variant:Nn \tl_if_in:NnT { coT }
 \cs_new:Nn \__ltj_siunix_patch_inner:n {
   \cs_if_exist:cT { #1_tl } {
@@ -91,6 +117,6 @@
       }
       { }
   }
-
+}
 \ExplSyntaxOff
 \endinput

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty	2021-05-17 20:45:42 UTC (rev 59247)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-stfloats.sty	2021-05-17 20:46:20 UTC (rev 59248)
@@ -1,5 +1,5 @@
 %
-% lltjp-stfloats.sty 2021-03-17
+% lltjp-stfloats.sty 2021-03-25
 %
 
 \NeedsTeXFormat{LaTeX2e}
@@ -14,9 +14,7 @@
 \global\let\org at makecol\ltj at orig@makecol
 
 \patchcmd\fn at makecol{\vskip -\dimen@\@textbottom}%
-  {\unless\ifnum\ltjgetparameter{direction}=4
-     \vbox{\primitive\everypar{}\hskip\z@}%
-   \fi %%% LuaTeX-ja
+  {\pltx at adjust@wd at outputbox
    \vskip -\dimen@
    \ifltj at ftn@unvboxed\iffnfixbottom\else\@textbottom\fi\else\@textbottom\fi}{}{}
 \patchcmd\fn at makecol{\vskip\skip\footins}{\iffnfixbottom\vskip\z@\@plus.0001fil\fi\vskip\skip\footins}{}{}



More information about the tex-live-commits mailing list.