texlive[71802] Master/texmf-dist: luatexja (14jul24)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 14 22:18:50 CEST 2024


Revision: 71802
          https://tug.org/svn/texlive?view=revision&revision=71802
Author:   karl
Date:     2024-07-14 22:18:50 +0200 (Sun, 14 Jul 2024)
Log Message:
-----------
luatexja (14jul24)

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.dtx
    trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-27c.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29c.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29e.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-pretreat.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.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-array.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README	2024-07-14 20:18:50 UTC (rev 71802)
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20240514.0
+The LuaTeX-ja Package 20240714.0
 --------------------------------
 Copyright (c) 2011--2024 The LuaTeX-ja project
 License: modified BSD (see COPYING)
@@ -42,7 +42,7 @@
 2. If you must/want to install manually:
 
    a. Download the source archive from CTAN,
-      or tagged as 20240514.0 in the Git repository by
+      or tagged as 20240714.0 in the Git repository by
       <https://github.com/luatexja/luatexja/archive/refs/tags/$VER.zip>
 
    b. Extract the archive and process following three files by LuaLaTeX
@@ -92,4 +92,4 @@
   This file and ltj-kinsoku.lua are not used anymore.
   (Do not remove ltj-kinsoku.tex.)
 
-Last commit date: Tue May 14 19:12:05 2024 +0900
+Last commit date: Sun Jul 14 08:56:04 2024 +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.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2024-07-14 20:18:50 UTC (rev 71802)
@@ -1467,14 +1467,19 @@
 &\cs{fontspec}&\cs{setmainfont}&\cs{setsansfont}&\cs{setmonofont}\\
 \midrule
 Japanese fonts
-&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}\\
+&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}&\cs{providejfontfamily}\\
 Alphabetic fonts
-&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}\\
+&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}&\cs{providefontfamily}\\
 \midrule
 Japanese fonts
-&\cs{newjfontface}&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\
+&\cs{newjfontface}&\cs{renewjfontface}&\cs{setjfontface}&\cs{providejfontface}\\
 Alphabetic fonts
-&\cs{newfontface}&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\
+&\cs{newfontface}&\cs{renewfontface}&\cs{setfontface}&\cs{providefontface}\\
+\midrule
+Japanese fonts
+&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\
+Alphabetic fonts
+&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\
 \bottomrule
 \end{tabular}\par}
 \end{table}
@@ -1492,14 +1497,19 @@
 &\cs{fontspec}&\cs{setmainfont}&\cs{setsansfont}&\cs{setmonofont}\\
 \midrule
 \emph{和文}
-&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}\\
+&\cs{newjfontfamily}&\cs{renewjfontfamily}&\cs{setjfontfamily}&\cs{providejfontfamily}\\
 \emph{欧文}
-&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}\\
+&\cs{newfontfamily}&\cs{renewfontfamily}&\cs{setfontfamily}&\cs{providefontfamily}\\
 \midrule
 \emph{和文}
-&\cs{newjfontface}&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\
+&\cs{newjfontface}&\cs{renewjfontface}&\cs{setjfontface}&\cs{providejfontface}\\
 \emph{欧文}
-&\cs{newfontface}&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\
+&\cs{newfontface}&\cs{renewfontface}&\cs{setfontface}&\cs{providefontface}\\
+\midrule
+\emph{和文}
+&\cs{defaultjfontfeatures}&\cs{addjfontfeatures}\\
+\emph{欧文}
+&\cs{defaultfontfeatures}&\cs{addfontfeatures}\\
 \bottomrule
 \end{tabular}\par}
 \end{table}
@@ -7833,7 +7843,7 @@
 
 さらに,バージョン20220211.0以降では次の命令が提供される.
 \begin{cslist}
-  \item[\cs{ltjghostbeginjachar}]
+  \item[\cs{ltjghostbeforejachar}]
   \LuaTeX-ja本体が提供している\cs{ltjfakeparbegin}, \cs{ltjfakeboxbdd}と類似の命令である.
   実行された箇所が(限定・非限定を問わず)水平モードであった場合に,実行された箇所は
   「文字クラス0の\textbf{JAchar}」の直前であると,
@@ -7850,7 +7860,7 @@
 \end{LTXexample}
 
   \item[\cs{ltjghostafterjachar}]
-  \cs{ltjghostbeginjachar}と対を成す命令で,実行された箇所は
+  \cs{ltjghostbeforejachar}と対を成す命令で,実行された箇所は
   「文字クラス0の\textbf{JAchar}」の直後であると,
   \LuaTeX-jaの和文処理グルー挿入処理に認識させる.以下の実行例を参照.
 

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-27c.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-27c.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-27c.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec-27c}[2024-02-19 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec-27c}[2024-05-27 fontspec support of LuaTeX-ja]
 \RequirePackage{l3keys2e}
 \ExplSyntaxOn
 
@@ -359,10 +359,24 @@
   \setfontfamily #1 [#2,#4] {#3}
   \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
 }
+\DeclareDocumentCommand \providejfontfamily { m O{} m O{} } {
+  \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_fontspec_set_family:Nnn
+  \providefontfamily #1 [#2,#4] {#3}
+  \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
+}
 
 \DeclareDocumentCommand \newjfontface { m O{} m O{} } {
   \newjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
 }
+\DeclareDocumentCommand \renewjfontface { m O{} m O{} } {
+  \renewjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
+\DeclareDocumentCommand \setjfontface { m O{} m O{} } {
+  \setjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
+\DeclareDocumentCommand \providejfontface { m O{} m O{} } {
+  \providejfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
 
 \prop_new:N \l__ltj_fontspec_tmp_prop
 \prop_new:N \g__ltj_fontspec_fontopts_prop

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29c.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29c.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29c.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec-29c}[2024-05-05 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec-29c}[2024-05-27 fontspec support of LuaTeX-ja]
 \RequirePackage{l3keys2e}
 \ExplSyntaxOn
 
@@ -359,10 +359,24 @@
   \setfontfamily #1 [#2,#4] {#3}
   \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
 }
+\DeclareDocumentCommand \providejfontfamily { m O{} m O{} } {
+  \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_fontspec_set_family:Nnn
+  \providefontfamily #1 [#2,#4] {#3}
+  \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
+}
 
 \DeclareDocumentCommand \newjfontface { m O{} m O{} } {
   \newjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
 }
+\DeclareDocumentCommand \renewjfontface { m O{} m O{} } {
+  \renewjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
+\DeclareDocumentCommand \setjfontface { m O{} m O{} } {
+  \setjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
+\DeclareDocumentCommand \providejfontface { m O{} m O{} } {
+  \providejfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
 
 \prop_new:N \l__ltj_fontspec_tmp_prop
 \prop_new:N \g__ltj_fontspec_fontopts_prop

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29e.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29e.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-fontspec-29e.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-fontspec-29e}[2024-05-14 fontspec support of LuaTeX-ja]
+\ProvidesPackage{luatexja-fontspec-29e}[2024-05-27 fontspec support of LuaTeX-ja]
 \RequirePackage{l3keys2e}
 \ExplSyntaxOn
 
@@ -359,10 +359,24 @@
   \setfontfamily #1 [#2,#4] {#3}
   \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
 }
+\DeclareDocumentCommand \providejfontfamily { m O{} m O{} } {
+  \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_fontspec_set_family:Nnn
+  \providefontfamily #1 [#2,#4] {#3}
+  \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
+}
 
 \DeclareDocumentCommand \newjfontface { m O{} m O{} } {
   \newjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
 }
+\DeclareDocumentCommand \renewjfontface { m O{} m O{} } {
+  \renewjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
+\DeclareDocumentCommand \setjfontface { m O{} m O{} } {
+  \setjfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
+\DeclareDocumentCommand \providejfontface { m O{} m O{} } {
+  \providejfontfamily #1 [ BoldFont={},ItalicFont={},SmallCapsFont={},#2,#4 ] {#3}
+}
 
 \prop_new:N \l__ltj_fontspec_tmp_prop
 \prop_new:N \g__ltj_fontspec_fontopts_prop

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/lltjext.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}[2022-08-24 v1.2k-ltj-14 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2024-05-16 v1.2k-ltj-15 Macros for vertical writing]
 \RequirePackage{luatexja}
 \newcount\ltj at ext@dir
 \let\ltj at lltjext@orig at tabular=\tabular
@@ -541,17 +541,11 @@
        \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-latex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-latex.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -12,45 +12,14 @@
 \def\luatexjalatexLoaded{\endinput}
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ltj-latex}[2022-10-15 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2024-05-16 LaTeX support of LuaTeX-ja]
 
 \endlinechar=13
 
 %%% LaTeX version detection
-\newif\ifltj at ltfilehook@avail
-\@ifl at t@r\fmtversion{2020-10-01}{%
-  \@ifl at t@r\fmtversion{2020-10-02}%
-    {\ltj at ltfilehook@availtrue}
-    {%
-      \ifnum\patch at level<0\relax \ifnum\patch at level<-6 \ltj at ltfilehook@availtrue\fi
-      \else\ltj at ltfilehook@availtrue\fi
-    }%
-}{}
-\@ifl at t@r\fmtversion{2021-05-01}{\count@=1 }{\count@=0 }
-\ifnum \count@<1
-%%%% \shipout
-  \newluafunction\ltj@@lua at shipout@inner
-  \directlua{
-    local t = lua.get_functions_table()
-    local getbox, setbox = tex.getbox, tex.setbox
-    local shipout_lthook = luatexja.direction.shipout_lthook
-    t[\the\ltj@@lua at shipout@inner]=function ()
-      local a = shipout_lthook(getbox(\the\ltj at afbox))
-      if a then setbox(\the\ltj at afbox, a) end
-    end
-  }
-  \protected\luadef\ltj@@lua at shipout\ltj@@lua at shipout@inner
-  \def\ltj at shipout@{\ltj@@lua at shipout\primitive\shipout\box\ltj at afbox}%
-  \protected\def\ltj at shipout{\ltj at afterbox\ltj 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
-\else
-  \directlua{%
-    luatexbase.add_to_callback('pre_shipout_filter',luatexja.direction.shipout_lthook, 'ltj.direction', 1)
-  }
-\fi
+\directlua{%
+  luatexbase.add_to_callback('pre_shipout_filter',luatexja.direction.shipout_lthook, 'ltj.direction', 1)
+}
 
 %%% patch for LaTeX
 \usepackage{lltjfont}
@@ -59,36 +28,30 @@
 \RequirePackage{lltjp-atbegshi}
 
 %%% patching commands
-\ifltj at ltfilehook@avail
-  %% \ltj at ExecuteBeforePackage <package><code>  and \ltj at ExecuteAfterPackage <package><code>
-  %% no-starred version: do nothing if the <package> is loaded
-  %% starred version: do <code> right away if the <package> is loaded
-  \def\ltj at ExecuteAfterPackage{\@ifstar\@@ltj at ExecuteAfterPackage@star\@@ltj at ExecuteAfterPackage}
-  \def\ltj at ExecuteBeforePackage{\@ifstar\@@ltj at ExecuteBeforePackage@star\@@ltj at ExecuteBeforePackage}
-  \@ifl at t@r\fmtversion{2021-11-15}{% 2021-11-15
-    \def\@@ltj at ExecuteAfterPackage@star#1{\AddToHook{package/#1/after}}
-    \def\@@ltj at ExecuteBeforePackage@star#1{\AddToHook{package/#1/before}}
-    \long\def\@@ltj at ExecuteAfterPackage#1#2{%
-      \@ifpackageloaded{#1}{}{\AddToHook{package/#1/after}{#2}}%
-    }
-    \long\def\@@ltj at ExecuteBeforePackage#1#2{%
-      \@ifpackageloaded{#1}{}{\AddToHook{package/#1/before}{#2}}%
-    }
-  }{
-    \def\@@ltj at ExecuteAfterPackage#1{\AddToHook{package/after/#1}}
-    \def\@@ltj at ExecuteBeforePackage#1{\AddToHook{package/before/#1}}
-    \long\def\@@ltj at ExecuteAfterPackage@star#1#2{%
-      \@ifpackageloaded{#1}{#2}{\@@ltj at ExecuteAfterPackage{#1}{#2}}%
-    }
-    \long\def\@@ltj at ExecuteBeforePackage@star#1#2{%
-      \@ifpackageloaded{#1}{#2}{\@@ltj at ExecuteBeforePackage{#1}{#2}}%
-    }
+%% \ltj at ExecuteBeforePackage <package><code>  and \ltj at ExecuteAfterPackage <package><code>
+%% no-starred version: do nothing if the <package> is loaded
+%% starred version: do <code> right away if the <package> is loaded
+\def\ltj at ExecuteAfterPackage{\@ifstar\@@ltj at ExecuteAfterPackage@star\@@ltj at ExecuteAfterPackage}
+\def\ltj at ExecuteBeforePackage{\@ifstar\@@ltj at ExecuteBeforePackage@star\@@ltj at ExecuteBeforePackage}
+\@ifl at t@r\fmtversion{2021-11-15}{% 2021-11-15
+  \def\@@ltj at ExecuteAfterPackage@star#1{\AddToHook{package/#1/after}}
+  \def\@@ltj at ExecuteBeforePackage@star#1{\AddToHook{package/#1/before}}
+  \long\def\@@ltj at ExecuteAfterPackage#1#2{%
+    \@ifpackageloaded{#1}{}{\AddToHook{package/#1/after}{#2}}%
   }
-\else
-  \RequirePackage{filehook}
-  \let\ltj at ExecuteAfterPackage=\AtEndOfPackageFile
-  \let\ltj at ExecuteBeforePackage=\AtBeginOfPackageFile
-\fi
+  \long\def\@@ltj at ExecuteBeforePackage#1#2{%
+    \@ifpackageloaded{#1}{}{\AddToHook{package/#1/before}{#2}}%
+  }
+}{
+  \def\@@ltj at ExecuteAfterPackage#1{\AddToHook{package/after/#1}}
+  \def\@@ltj at ExecuteBeforePackage#1{\AddToHook{package/before/#1}}
+  \long\def\@@ltj at ExecuteAfterPackage@star#1#2{%
+    \@ifpackageloaded{#1}{#2}{\@@ltj at ExecuteAfterPackage{#1}{#2}}%
+  }
+  \long\def\@@ltj at ExecuteBeforePackage@star#1#2{%
+    \@ifpackageloaded{#1}{#2}{\@@ltj at ExecuteBeforePackage{#1}{#2}}%
+  }
+}
 \def\ltj at pkgpatch@im#1{\@ifnextchar[{\ltj at pkgpatch@im@{#1}}{\ltj at pkgpatch@im@{#1}[lltjp-#1]}}%]
 \def\ltj at pkgpatch@im@#1[#2]{\ltj at ExecuteAfterPackage*{#1}{\ltj at pkgpatch@im@@{#2}}}
 \def\ltj at pkgpatch@im@@#1{%
@@ -101,11 +64,7 @@
 }
 
 \def\ltj at pkgpatch#1{\@ifnextchar[{\ltj at pkgpatch@{#1}}{\ltj at pkgpatch@{#1}[lltjp-#1]}}%]
-\ifltj at ltfilehook@avail
-  \def\ltj at pkgpatch@@{\AddToHook{begindocument/before}[luatexja.autopatch]}
-\else
-  \def\ltj at pkgpatch@@{\gpreto\@begindocumenthook}
-\fi
+\def\ltj at pkgpatch@@{\AddToHook{begindocument/before}[luatexja.autopatch]}
 \def\ltj at pkgpatch@#1[#2]{%
   \ltj at pkgpatch@@{%
     \@ifpackageloaded{#1}{\@ifpackageloaded{#2}{}{\RequirePackage{#2}}}{}%
@@ -121,10 +80,6 @@
 \ltj at pkgpatch{tascmac}
 \ltj at pkgpatch{ascmac}[lltjp-tascmac]
 \ltj at pkgpatch@im{stfloats}
-\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}
@@ -131,8 +86,6 @@
 \ltj at pkgpatch@im{siunitx}
 \ltj at pkgpatch@im{microtype}
 
-\ifltj at ltfilehook@avail\else\ltj at pkgpatch@im{everyshi}\fi
-
 \RequirePackage{lltjp-geometry}
 
 \ltj at ExecuteBeforePackage{breqn}{%

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-pretreat.lua	2024-07-14 20:18:50 UTC (rev 71802)
@@ -156,9 +156,10 @@
    if ltjs.list_dir == dir_tate then
       for p in traverse_glyph(to_direct(head)) do
          if getlang(p)==lang_ja and has_attr(p, attr_icflag, 0) then
-            local pf = ltjf_replace_altfont(attr_curtfnt, getchar(p), p)
+            local pc = ltjs_orig_char_table[p] or getchar(p)
+            local pf = ltjf_replace_altfont(attr_curtfnt, pc, p)
             if ltjf_font_metric_table[pf].vert_activated then
-               local pc = ltjf_font_metric_table[pf].vform[pc]; if pc then setchar(p,  pc) end
+               pc = ltjf_font_metric_table[pf].vform[pc]; if pc then setchar(p,  pc) end
             end
          end
       end
@@ -165,7 +166,7 @@
    else
       for p in traverse_glyph(to_direct(head)) do
          if getlang(p)==lang_ja and has_attr(p, attr_icflag, 0) then
-            ltjf_replace_altfont(attr_curjfnt, getchar(p), p)
+            ltjf_replace_altfont(attr_curjfnt, ltjs_orig_char_table[p] or getchar(p), p)
          end
       end
    end

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-rmlgbm.lua	2024-07-14 20:18:50 UTC (rev 71802)
@@ -15,7 +15,7 @@
 end
 local cidfont_data = {}
 local cache_chars = {}
-local cache_ver = 13
+local cache_ver = 14
 local identifiers = fonts.hashes.identifiers
 
 local cid_reg, cid_order, cid_supp, cid_name
@@ -147,7 +147,7 @@
             descender = 655360*0.12,
          },
          embedding = "no", cache = "yes", factor = 0, hfactor = 0, vfactor = 0,
-         tounicode = 1,
+         tounicode = 1, filename="",
          properties = { language = "dflt", script = "dflt" },
       }
       cidfont_data[cid_name] = k

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -27,7 +27,7 @@
 \newif\ifltj at disablejfam
 
 %%%% VERSION
-\def\LuaTeXjaversion{20240514.0}
+\def\LuaTeXjaversion{20240714.0}
 
 %% Check if LaTeX is used.
 \begingroup\expandafter\expandafter\expandafter\endgroup

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjdefs.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjdefs}[2022-01-23 Default font settings of LuaTeX-ja]
+\ProvidesPackage{lltjdefs}[2024-05-16 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
@@ -18,13 +18,8 @@
 \DeclareKanjiEncodingDefaults{}{}
 \DeclareErrorKanjiFont{JY3}{mc}{m}{n}{10}
 \kanjifamily{mc}
-\ifnum\ltj@@latex at plv<1500 % <=2020-10-01
-  \kanjiseries{m}
-  \kanjishape{n}
-\else % >=2021-06-01
-  \def\k at series{m}
-  \def\k at shape{n}
-\fi
+\def\k at series{m}
+\def\k at shape{n}
 \fontsize{10}{10}
 \DeclareYokoKanjiEncoding{JY3}{}{}
 \DeclareKanjiSubstitution{JY3}{mc}{m}{n}
@@ -37,12 +32,7 @@
 \newcommand\kanjiencodingdefault{JY3}
 \newcommand\kanjifamilydefault{\mcdefault}
 \newcommand\kanjiseriesdefault{\mddefault}
-\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}
-\fi
+\newcommand\kanjishapedefault{\shapedefault}
 
 \DeclareKanjiFamily{JY3}{mc}{}
 \DeclareFontShape{JY3}{mc}{m}{n}{<-> s*[\ifdefined\Cjascale\Cjascale\else 0.962216\fi]
@@ -90,8 +80,6 @@
   \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n}
 \fi
 
-\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}
@@ -98,49 +86,30 @@
 \edef\mdseries at mc{\mddefault}
 \edef\mdseries at gt{\mddefault}
 \def\mdseries at jtt{\mdseries at mc}
-\fi
 
 \newif\if at ltj@match at family
 \@ltj at match@familyfalse
 \def\verbatim at font{\normalfont\ttfamily\kanjifamily\jttdefault\selectfont}
 
-\def\@ltj at hook@family#1#2{% #1: csname #2: contents
-  \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
-      \expandafter\patchcmd\csname #1 \endcsname{\selectfont}{#2\selectfont}{}{}%
-    \else
-      \PackageWarningNoLine{luatexja}{%
-        Patching to \expandafter\string\csname #1\endcsname\space failed%
-      }%
-    \fi
-  \fi\fi
-}
-\@ltj at hook@family{rmfamily}{%
+\AddToHook{rmfamily}{%
   \if at ltj@match at family
     \prepare at family@series at update@kanji{mc}\mcdefault
   \fi
 }
-\@ltj at hook@family{sffamily}{%
+\AddToHook{sffamily}{%
   \if at ltj@match at family
     \prepare at family@series at update@kanji{gt}\gtdefault
   \fi
 }
-\@ltj at hook@family{ttfamily}{%
+\AddToHook{ttfamily}{%
   \if at ltj@match at family
     \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
+\expandafter\def\expandafter\kanjiseriesdefault
+  \expandafter{\kanjiseriesdefault\@empty}
+\let\kanjiseriesdefault at kernel\kanjiseriesdefault
 
 %%% \eminnershape
 \expandafter\patchcmd\csname em \endcsname{\itshape}{\gtfamily\itshape}{}{}

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjfont.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,31 +3,10 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjfont}[2023-04-13 Patch to NFSS2 for LuaTeX-ja]
+\ProvidesPackage{lltjfont}[2023-05-16 Patch to NFSS2 for LuaTeX-ja]
 
 %%%%%%%% LaTeX2e version detection
-\newcount\ltj@@latex at plv \ltj@@latex at plv=-1
-\ifltj at ltfilehook@avail
-\ExplSyntaxOn
-  \cs_if_exist:NTF \__shipout_execute_main_cont:Nnnn
-    {\ltj@@latex at plv=1500}% 2021-06-01
-    {\ifnum\patch at level>2\relax \ltj@@latex at plv=1300\else \ltj@@latex at plv=1000\fi}% 2020-10-01
-\ExplSyntaxOff
-\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
+\newcount\ltj@@latex at plv \ltj@@latex at plv=1500
 
 %% patching \DeclareTextComposite
 \def\ltj at chardef@text at cmd#1{%
@@ -400,59 +379,7 @@
       \directlua{luatexja.jfont.pickup_alt_font_a('\f at size')}%
     }%
   \fi}
-\ifnum\ltj@@latex at plv<1500 % <=2020-10-01
-\protected\def\ltj at selectfont@patch{%
-  \ltj@@start at time@measure{selectfont}%
-  \let\tmp at error@fontshape\error at fontshape
-  \let\error at fontshape\error at kfontshape
-  \ltj@@is at kyenc{\k at encoding}\ifin@%
-    \let\cy at encoding\k at encoding
-    \ensure at KanjiEncodingPair{t}%
-    \edef\ct at encoding{\csname t at enc@\k at encoding\endcsname}%
-  \else
-    \ltj@@is at ktenc{\k at encoding}\ifin@%
-      \let\ct at encoding\k at encoding
-      \ensure at KanjiEncodingPair{y}%
-      \edef\cy at encoding{\csname y at enc@\k at encoding\endcsname}%
-    \else
-      \@latex at error{KANJI Encoding scheme `\k at encoding' unknown}\@eha
-    \fi
-  \fi
-  \global\let\ltj at afont@name=\font at name
-  \ltj at selectfont@tate\ltj at selectfont@yoko
-%
-  \edef\tmp at item{{\k at encoding}}\expandafter\def\expandafter\k at encoding\tmp at item
-  \kenc at update
-  \global\let\font at name=\ltj at afont@name
-  \let\error at fontshape\tmp at error@fontshape
-  \if at knjcmd \@knjcmdfalse
-    \expandafter\ifx
-    \csname rel@\k at encoding/\k at family/\k at series/\k at shape\endcsname\relax
-      \expandafter\ifx
-         \csname rel@\k at encoding/\k at family/\k at series/all\endcsname\relax
-      \else
-         \csname rel@\k at encoding/\k at family/\k at series/all\endcsname\selectfont
-         % 警告: 再び \selectfont を呼んでいる.無限ループの可能性あり
-      \fi
-    \else
-       \csname rel@\k at encoding/\k at family/\k at series/\k at shape\endcsname\selectfont
-       % 警告: 再び \selectfont を呼んでいる.無限ループの可能性あり
-    \fi
-  \fi
-  \global\let\font at name=\ltj at afont@name
-  \ltj@@stop at time@measure{selectfont}%
-}
-\RequirePackage{everysel}
-\let\ltj@@EverySelectfont at Init=\@EverySelectfont at Init
-\expandafter\expandafter\expandafter\let
-\expandafter\expandafter\csname ltj@@orig at selectfont\endcsname\csname selectfont\space\endcsname
-\@EverySelectfont at Init% for LaTeX2e <=2020-10-01
-\def\@EverySelectfont at Init{%
-  \expandafter\let\csname selectfont\space \endcsname \ltj@@orig at selectfont
-  \ltj@@EverySelectfont at Init
-}
-\EverySelectfont{\ltj at selectfont@patch}
-\else % LaTeX2e >=2021-06-01
+
 \AddToHook{selectfont}[luatexja]{%
   \ltj@@start at time@measure{selectfont}%
   \ifx\delayed at k@adjustment\@empty
@@ -514,7 +441,6 @@
   \global\let\font at name=\ltj at afont@name
   \ltj@@stop at time@measure{selectfont}%
 }
-\fi
 
 \bgroup
   \def\ltj@@dir at patch#1#2#3{%
@@ -721,8 +647,6 @@
 }
 
 %%%%%%
-\ifnum\ltj@@latex at plv>0
-%%%% LaTeX >= 2020-02-02
 \newif\if at shape@roman at kanji
 
 \def\merge at kanji@series#1{%
@@ -740,24 +664,11 @@
     \@nil
 }
 
-\ifnum\ltj@@latex at plv>500 % !!! pl5 + develop
   \def\set at target@series at kanji#1{%
       \edef\k at series{#1}%
       \series at maybe@drop at one@m\k at series\k at series
   }
-\else\ifnum\ltj@@latex at plv>300 % !!! pl5
-  \def\set at target@series at kanji#1{%
-      \edef\k at series{#1}%
-      \expandafter\series at maybe@drop at one@m\expandafter{\k at series}\k at series
-  }
-\else % !!! pl 3, 4
-  \def\set at target@series at kanji#1{%
-    \edef\k at series{#1}%
-    \edef\k at series{\expandafter\series at drop@one at m\k at series mm\series at drop@one at m}%
-  }
-\fi\fi
 
-\ifnum\ltj@@latex at plv<1500% <=2020-10-01
 \def\merge at kanji@series@#1#2#3\@nil{%
   \def\reserved at a{#3}%
   \ifx\reserved at a\@empty
@@ -779,58 +690,6 @@
     \fi
   \fi
 }
-\def\merge at kanji@shape@#1#2#3\@nil{%
-  \def\reserved at a{#3}%
-  \ifx\reserved at a\@empty
-    \if at shape@roman at kanji
-      \set at safe@kanji at shape{#2}{}%
-    \else
-      \edef\k at shape{#2}%
-    \fi
-  \else
-    \begingroup\let\f at encoding\k at encoding\let\f at family\k at family
-           \maybe at load@fontshape\endgroup
-    \edef\reserved at a{\k at encoding /\k at family /\k at series/#1}%
-     \ifcsname \reserved at a\endcsname
-       \edef\k at shape{#1}%
-    \else
-       \ifcsname \k at encoding /\k at family /\k at series/#2\endcsname
-         \edef\k at shape{#2}%
-         {\let\curr at fontshape\curr at kfontshape\@font at shape@subst at warning}%
-       \else
-         \if at shape@roman at kanji
-           \set at safe@kanji at shape{#3}%
-           {{\let\curr at fontshape\curr at kfontshape\@font at shape@subst at warning}}%
-         \else
-           \edef\k at shape{#3}%
-           {\let\curr at fontshape\curr at kfontshape\@font at shape@subst at warning}%
-         \fi
-       \fi
-    \fi
-  \fi
-}
-\else % >=2021-06-01
-\def\merge at kanji@series@#1#2#3\@nil{%
-  \def\reserved at a{#3}%
-  \ifx\reserved at a\@empty
-    \set at target@series at kanji{#2}%
-  \else
-    \begingroup\let\f at encoding\k at encoding\let\f at family\k at family
-    \maybe at load@fontshape\endgroup
-    \edef\reserved at a{\k at encoding /\k at family /#1/\k at shape}%
-     \ifcsname \reserved at a \endcsname
-       \set at target@series at kanji{#1}%
-    \else
-       \ifcsname \k at encoding /\k at family /#2/\k at shape \endcsname
-         \set at target@series at kanji{#2}%
-         {\let\curr at fontshape\curr at kfontshape\@font at shape@subst at warning}%
-       \else
-         \set at target@series at kanji{#3}%
-         {\let\curr at fontshape\curr at kfontshape\@font at shape@subst at warning}%
-       \fi
-    \fi
-  \fi
-}
 \def\merge at kanji@series at without@substitution#1{%
   \expandafter\expandafter\expandafter
   \merge at kanji@series at without@substitution@
@@ -892,20 +751,8 @@
   \fi
 }
 \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}}
-  \DeclareRobustCommand\romanseriesforce[1]{\edef\f at series{#1}}
-  \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 series@kanjifalse\merge at kanji@series{#1}}
-  \DeclareRobustCommand\romanseriesforce[1]{\@forced at seriestrue\edef\f at series{#1}}
-  \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}}}
@@ -919,22 +766,9 @@
       \expandafter\def\expandafter\delayed at k@adjustment\expandafter
           {\delayed at k@adjustment\edef\k at series{#1}}}
   \let\delayed at k@adjustment\@empty
-\fi\fi
 \DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}}%
 \DeclareRobustCommand\fontseriesforce[1]{\kanjiseriesforce{#1}\romanseriesforce{#1}}%
 
-\ifnum\ltj@@latex at plv<1500% <=2020-10-01
-  \DeclareRobustCommand\romanshape[1]{\merge at font@shape{#1}}
-  \DeclareRobustCommand\kanjishape[1]{\merge at kanji@shape{#1}}
-  \DeclareRobustCommand\fontshape[1]{%
-     \@shape at roman@kanjitrue
-     \merge at font@shape{#1}\merge at kanji@shape{#1}%
-     \@shape at roman@kanjifalse
-  }
-  \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-06-01
   \DeclareRobustCommand\romanshape[1]{%
        \expandafter\def\expandafter\delayed at f@adjustment\expandafter
            {\delayed at f@adjustment\delayed at merge@font at shape{#1}}}
@@ -956,9 +790,6 @@
      \romanshapeforce{#1}%
      \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>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}%
@@ -969,42 +800,6 @@
     \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]{%
-    \kanjiencoding{#1}\edef\k at family{#2}\edef\k at series{#3}\edef\k at shape{#4}%
-    \selectfont\ignorespaces}
-\DeclareRobustCommand\useroman[4]{%
-    \romanencoding{#1}\edef\f at family{#2}\edef\f at series{#3}\edef\f at shape{#4}%
-    \selectfont\ignorespaces}
-\fi\fi
-%%%% LaTeX >= 2020-02-02 END
-\else
-%%%% LaTeX 2019-10-01
-\DeclareRobustCommand\romanseries[1]{\edef\f at series{#1}}
-\DeclareRobustCommand\kanjiseries[1]{\edef\k at series{#1}}
-\DeclareRobustCommand\fontseries[1]{\kanjiseries{#1}\romanseries{#1}}
-\DeclareRobustCommand\romanshape[1]{\edef\f at shape{#1}}
-\DeclareRobustCommand\kanjishape[1]{\edef\k at shape{#1}}
-\DeclareRobustCommand\fontshape[1]{\set at safe@kanji at shape{#1}{}\romanshape{#1}}
-\DeclareRobustCommand\usekanji[4]{%
-    \kanjiencoding{#1}\kanjifamily{#2}\kanjiseries{#3}\kanjishape{#4}%
-    \selectfont\ignorespaces}
-\DeclareRobustCommand\useroman[4]{%
-    \romanencoding{#1}\romanfamily{#2}\romanseries{#3}\romanshape{#4}%
-    \selectfont\ignorespaces}
-%%%% LaTeX 2019-10-01 END
-\fi
 %%%%
 
 \def\set at safe@kanji at shape#1#2{%
@@ -1026,8 +821,6 @@
   \else\useroman{#1}{#2}{#3}{#4}%
   \fi}
 
-\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{\if at forced@series}{\if at forced@series at kanji}{}{}
@@ -1049,34 +842,16 @@
 \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}}
 
-\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}{%
+\AddToHook{bfseries/defaults}{%
   \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}{%
+\AddToHook{mdseries/defaults}{%
   \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
@@ -1105,14 +880,7 @@
   \fi\fi\fi
 }{}{}
 
-\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}{%
+\AddToHook{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
@@ -1119,7 +887,7 @@
   \else                        \kanjiseries\bfdefault
   \fi\fi\fi
 }
-\@ltj at hook@series{mdseries}{%
+\AddToHook{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
@@ -1126,53 +894,21 @@
   \else                        \kanjiseries\mddefault
   \fi\fi\fi
 }
-\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{%
+\AddToHook{expand at font@defaults}{%
   \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
+  \edef\kanjidef at ult{\kanjifamilydefault}}
 
-\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
-  \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
-
-\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
+\appto\init at series@setup{%
+  \ifx\kanjiseriesdefault\kanjiseriesdefault at kernel
+    \mdseries
+    \let\kanjiseriesdefault\k at series
+  \fi
 }
 
-\ifnum\ltj@@latex at plv>1499
-\@ltj at hook@dfh{%
+\AddToHook{normalfont}{%
   \kanjiencoding{\kanjiencodingdefault}%
   \edef\k at family{\kanjifamilydefault}%
   \edef\k at series{\kanjiseriesdefault}%
@@ -1179,32 +915,7 @@
   \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
-%%%% 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}
-\fi
-
 \DeclareRobustCommand\mcfamily{%
   \unless\ifltj at disablejfam\not at math@alphabet\mcfamily\mathmc\fi
   \prepare at family@series at update@kanji{mc}\mcdefault

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-array.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-array.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-array.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-array}[2019-07-18 Patch to array for LuaTeX-ja]
+\ProvidesPackage{lltjp-array}[2024-06-10 Patch to array for LuaTeX-ja]
 
 \RequirePackage{etoolbox,array}
 
@@ -11,7 +11,14 @@
    \ignorespaces\@sharp\unskip
 }{%
    \ltj at sharp
-}{}{}
+}{}{% >=2024-06-01
+  \def\ltj at sharp{\relax\pltx at next@inhibitglue\ltjfakeboxbdd\ignorespaces\@sharp\textonly at unskip\ltjfakeboxbdd}
+  \patchcmd\insert at column{%
+     \ignorespaces\@sharp\textonly at unskip
+  }{%
+     \ltj at sharp
+  }{}{}
+}
 
 \@ifpackageloaded{lltjext}{}{%
 %% remove extra \xkanjiskip (pLaTeX2e 2016/04/17)

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-geometry.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-geometry}[2021-10-24 Patch to geometry for LuaTeX-ja with vertical writing mode]
+\ProvidesPackage{lltjp-geometry}[2024-05-16 Patch to geometry for LuaTeX-ja with vertical writing mode]
 \RequirePackage{expl3}
 \ifdefined\if at ltj@@geometry at tate\expandafter\endinput\fi
 \newif\if at ltj@@geometry at tate
@@ -31,15 +31,6 @@
 
 %============================================
 \unless\ifdefined\ltj at ExecuteAfterPackage
-\expandafter\newif\csname ifltj at ltfilehook@avail\endcsname
-\@ifl at t@r\fmtversion{2020-10-01}{%
-  \@ifl at t@r\fmtversion{2020-10-02}{\ltj at ltfilehook@availtrue}
-    {%
-      \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
   %% \ltj at ExecuteBeforePackage <package><code>  and \ltj at ExecuteAfterPackage <package><code>
   %% no-starred version: do nothing if the <package> is loaded
   %% starred version: do <code> right away if the <package> is loaded
@@ -64,12 +55,7 @@
       \@ifpackageloaded{#1}{#2}{\@@ltj at ExecuteBeforePackage{#1}{#2}}%
     }
   }
-\else
-  \RequirePackage{filehook}
-  \let\ltj at ExecuteAfterPackage=\AtEndOfPackageFile
-  \let\ltj at ExecuteBeforePackage=\AtBeginOfPackageFile
 \fi
-\fi
 %============================================
 
 \RequirePackage{etoolbox}
@@ -89,12 +75,8 @@
 \else
   \@gobble\iftrue\csname iftdir\endcsname \bool_set_true:N \l_tmpa_bool \fi
 \fi
-\ifltj at ltfilehook@avail
-  \prop_map_inline:Nn \g__hook_begindocument_code_prop
-    { \tl_if_in:nnT {#2} {\tate} {\bool_set_true:N \l_tmpa_bool} }
-\else
-  \tl_if_in:NnT \@begindocumenthook {\tate} {\bool_set_true:N \l_tmpa_bool}
-\fi
+\prop_map_inline:Nn \g__hook_begindocument_code_prop
+  { \tl_if_in:nnT {#2} {\tate} {\bool_set_true:N \l_tmpa_bool} }
 \bool_if:NT \l_tmpa_bool {
   \if at ltj@@geometry at forceoff
     \@ltj@@geometry at tatefalse

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty	2024-07-14 20:18:32 UTC (rev 71801)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty	2024-07-14 20:18:50 UTC (rev 71802)
@@ -1,5 +1,5 @@
 %
-% lltjp-siunitx.sty 2022-12-14
+% lltjp-siunitx.sty 2024-06-10
 %
 
 \NeedsTeXFormat{LaTeX2e}
@@ -7,7 +7,6 @@
 \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
@@ -32,104 +31,26 @@
       }
   }
 \cs_set_eq:NN \ltj_orig__siunitx_table_collect_begin:w \__siunitx_table_collect_begin:w
-\cs_set_protected:Npn \__siunitx_table_collect_begin:w #1 \relax
-  { \ltj_orig__siunitx_table_collect_begin:w }
-\RenewDocumentCommand \tablenum { O { } m }
-  {
-    \mode_leave_vertical:
-    \group_begin:
-      \keys_set:nn { siunitx } {#1}
-      \siunitx_cell_begin:w
-        \relax \ignorespaces #2
-      \siunitx_cell_end:
-    \group_end:
+\cs_set_protected:Npn \__siunitx_table_collect_begin:w #1 {
+   \token_if_eq_meaning:NNTF #1 \relax
+     {\ltj_orig__siunitx_table_collect_begin:w }
+     {\ltj_orig__siunitx_table_collect_begin:w #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 } {
-    \tl_if_in:coT { #1_tl } { \tex_char:D } {
-	  \tl_replace_all:cnn { #1_tl } { \tex_char:D } { \ltjalchar }
-	}
-  }
-}
-\cs_new:Nn \__ltj_siunix_patch_inner_math:n {
-   \__ltj_siunix_patch_inner:n { l__siunitx_#1_math }
-   \__ltj_siunix_patch_inner:n { l__siunitx_#1_text }
-}
-\AtBeginDocument {
-  \__ltj_siunix_patch_inner:n { c__siunitx_minus }
-  \__ltj_siunix_patch_inner:n { c__siunitx_mu }
-  \__ltj_siunix_patch_inner_math:n { angstrom }
-  \__ltj_siunix_patch_inner_math:n { arcminute }
-  \__ltj_siunix_patch_inner_math:n { arcsecond }
-  \__ltj_siunix_patch_inner_math:n { ohm }
-}
-
-%%%% new table column: S and s
-\bool_new:N \l__ltj_siunitx_table_collect_relax_bool
-\cs_set_protected:Npn \__siunitx_table_collect_begin_s: {
-  \bool_set_false:N \l__ltj_siunitx_table_collect_relax_bool
-  \cs_set_eq:NN \__siunitx_table_collect_token:N
-    \__siunitx_table_collect_token_s:N
-  \cs_set_eq:NN \__siunitx_table_print: \__siunitx_table_print_s:
-  \__siunitx_table_collect_init_s:
-  \__siunitx_table_collect_get:
-}
-
-\cs_set_protected:Npn \__siunitx_table_collect_not_braced:N #1
+\cs_set_protected:Npn \__siunitx_table_collect_token:N #1
   {
-	\token_if_eq_meaning:NNTF #1 \tex_relax:D {
-      \bool_if:NTF \l__ltj_siunitx_table_collect_relax_bool {
-		\__siunitx_table_collect_not_braced_aux_i:N #1
-	  } {
-	    \bool_set_true:N \l__ltj_siunitx_table_collect_relax_bool
-	  }
-	} {
-    \token_if_eq_meaning:NNF #1 \ltjfakeboxbdd {
-    \token_if_eq_meaning:NNF #1 \pltx at next@inhibitglue {
-    \token_if_eq_meaning:NNF #1 \tex_ignorespaces:D
+    \__siunitx_table_collect_search:NnF #1
       {
-        \token_if_eq_meaning:NNF #1 \tex_unskip:D
-          { \__siunitx_table_collect_not_braced_aux_i:N #1 }
+        \ignorespaces     { \__siunitx_table_collect_ignore_spaces:N #1}
+        \pltx at next@inhibitglue     { \__siunitx_table_collect_loop:}
+        \ltjfakeboxbdd     { \__siunitx_table_collect_loop:}
+        \textonly at unskip   { \__siunitx_table_collect_loop:}
+        \unskip            { \__siunitx_table_collect_loop:}
+        \end               { \tabularnewline \end }
+        \relax             { \__siunitx_table_collect_relax:N #1 }
+        \tabularnewline    { \tabularnewline }
+        \siunitx_cell_end: { \siunitx_cell_end:}
       }
-	}}}
-    \__siunitx_table_collect_next:
-  }
-
-\AtBeginDocument
-  {
-    \@ifpackageloaded { mdwtab }
-      {
-        \cs_set_protected:Npn \__siunitx_table_collect_not_braced:N #1
-          { 
-	        \token_if_eq_meaning:NNTF #1 \tex_relax:D {
-              \bool_if:NTF \l__ltj_siunitx_table_collect_relax_bool {
-		        \__siunitx_table_collect_not_braced_aux_i:N #1
-	          } {
-	            \bool_set_true:N \l__ltj_siunitx_table_collect_relax_bool
-	          }
-	        } {
-            \token_if_eq_meaning:NNF #1 \ltjfakeboxbdd {
-            \token_if_eq_meaning:NNF #1 \pltx at next@inhibitglue {
-            \token_if_eq_meaning:NNF #1 \tex_ignorespaces:D
-              {
-                \token_if_eq_meaning:NNF #1 \tex_unskip:D
-                  {
-                    \token_if_eq_meaning:NNF #1 \tab at setcr
-                      {
-                        \token_if_eq_meaning:NNF #1 \@maybe at unskip
-                          { \__siunitx_table_collect_not_braced_aux_i:N #1 }
-                      }
-                  }
-              }
-            }}}
-            \__siunitx_table_collect_next:
-          }
-      }
-      { }
-  }
+      { \__siunitx_table_collect_token_aux:N #1 }
 }
 \ExplSyntaxOff
 \endinput



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