texlive[65790] Master/texmf-dist: luatexja (11feb23)

commits+karl at tug.org commits+karl at tug.org
Sat Feb 11 22:18:40 CET 2023


Revision: 65790
          http://tug.org/svn/texlive?view=revision&revision=65790
Author:   karl
Date:     2023-02-11 22:18:39 +0100 (Sat, 11 Feb 2023)
Log Message:
-----------
luatexja (11feb23)

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/tex/luatex/luatexja/addons/luatexja-preset.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
    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.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	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README	2023-02-11 21:18:39 UTC (rev 65790)
@@ -1,6 +1,6 @@
-The LuaTeX-ja Package 20221213.0
+The LuaTeX-ja Package 20230211.0
 --------------------------------
-Copyright (c) 2011--2022 The LuaTeX-ja project
+Copyright (c) 2011--2023 The LuaTeX-ja project
 License: modified BSD (see COPYING)
 
 LuaTeX-ja is a macro package for typesetting Japanese documents with LuaTeX.
@@ -42,9 +42,9 @@
 2. If you must/want to install manually:
 
    a. Download the source archive from CTAN,
-      or tagged as 20221213.0 in the Git repository by
+      or tagged as 20230211.0 in the Git repository by
       <http://git.osdn.jp/view?p=luatex-ja/luatexja.git
-                              ;a=snapshot;h=refs/tags/20221213.0;sf=tgz>
+                              ;a=snapshot;h=refs/tags/20230211.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: Tue Dec 13 21:57:47 2022 +0900
+Last commit date: Sat Feb 11 18:49:41 2023 +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	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex	2023-02-11 21:18:39 UTC (rev 65790)
@@ -10,6 +10,7 @@
 \setmonojfont{HaranoAjiGothic-Regular.otf}
 \usepackage{unicode-math}
 \setmathfont{Latin Modern Math}
+%\usepackage{lua-visual-debug}
 
 \def\emph#1{\textbf{\textgt{#1}}}
 \def\headfont{\normalfont\bfseries\gtfamily}
@@ -168,12 +169,12 @@
 \item[post=<real>] 同様に,\underline{後文字進入許容量}を指定する.既定値は負(自動指定).
 
 \item[mode] 進入処理のモードを表すbit vector.下位2\,bitは,\texttt{pre}や
-\texttt{post}が負である場合にしか効力を発揮しない.既定値は$(0001)_2 = 1$.
+\texttt{post}が負である場合にしか効力を発揮しない.既定値は$(00001)_2 = 1$.
 \begin{description}
  \item[bit 0] 前後の\underline{文字への進入}を無効にするならば0,有効にするならば1.
  \item[bit 1] 前進入許容量$B$と後進入許容量$A$が異なった場合,
   そのまま処理する場合は0,小さい方に揃えるならば1.
- \item[bit 2--3] ルビ文字の突出量から実際の前・後進入量の計算方法を指定する.
+ \item[bit 2--4] ルビ文字の突出量から実際の前・後進入量の計算方法を指定する.
   詳しい計算方法については\ref{ssec:calc_intrusion}\nobreak 小節を参照.
 \end{description}
 \item[intrude\_jfmgk=<bool>] 進入量算出の際に,前後のJFMグルーの自然長を考慮するか否か.既定値は真.
@@ -630,36 +631,44 @@
   
   ルビ文字の突出量を$x$,
   親文字の文字数を$k+1$,親文字の前に入る空白量・間の空白量・後ろの空白量の比を$p:q:r$とする.
-  このとき,\texttt{mode}のbit 2,~3の値によって$b$,~$a$を次のように算出する:
+  このとき,\texttt{mode}のbit 2--4の値によって$b$,~$a$を次のように算出する:
 \begin{description}[labelindent=\zw]
- \item[00] $b=\min(B, xp/(p+kq+r))$, \ $a=\min(A, xr/(p+kq+r))$
- \item[01] $b=\min(B, x)$, \ $a=\min(A, \max(x-b,0))$
- \item[10] $a=\min(A, x)$, \ $b=\min(B, \max(x-a,0))$
- \item[11] $M=\min(B,A)$とおく.もし$x\le 2M$ならば$b=a=x/2$.そうでなければ
+ \item[000] $b=\min(B, xp/(p+kq+r))$, \ $a=\min(A, xr/(p+kq+r))$
+ \item[001] $b=\min(B, x)$, \ $a=\min(A, \max(x-b,0))$
+ \item[010] $a=\min(A, x)$, \ $b=\min(B, \max(x-a,0))$
+ \item[011] $M=\min(B,A)$とおく.もし$x\le 2M$ならば$b=a=x/2$.そうでなければ
 \[
- b=\min\mleft(B, M + \frac{(x-2M)p}{p+kq+r}\mright),\qquad 
+ b=\min\mleft(B, M + \frac{(x-2M)p}{p+kq+r}\mright),\quad 
  a=\min\mleft(A, M + \frac{(x-2M)r}{p+kq+r}\mright).
 \]
+ \item[100] $M=\min(B,A)$とおく.もし$x\le 2M$ならば$b=a=x/2$.そうでなければ
+\[
+ b=\min(B, x-M),\quad a=\min(A,x-M)\quad \mbox{(どちらかは必ず$M$となる)}.
+\]
 \end{description}
 
+大雑把に言うと,最初の「000」は「組んだ後に進入量を決定」する方針,
+それ以外は「進入量を先に決定し,その後で組む」方針である.
 組み方の具体例を実際に示す.例示のため,平仮名にはルビが1字まで,「立」にはルビを
 0.5字分までかけてよいことにしている.
 \begin{description}[labelindent=\zw]
-\item[00]{\setkeys[ltj]{ruby}{mode=1}%
+\item[000]{\setkeys[ltj]{ruby}{mode=1}%
 \ltjsetparameter{rubypreintrusion={`立,0.5}, rubypostintrusion={`立,0.5}}%
 は\ltjruby{美}{うつく}しい
   \quad は\ltjruby{聴衆}{ちようしゆう}と\quad
 は\ltjruby{暁}{あかつき}立\quad
 は\ltjruby{峠}{とうげ}立\quad
-は\ltjruby{聴衆}{ちようしゆう}立\par}
-\item[01]{\setkeys[ltj]{ruby}{mode=5}%
+は\ltjruby{聴衆}{ちようしゆう}立\quad
+は\ltjruby{聴衆}{ちようしゆう}達\par}
+\item[001]{\setkeys[ltj]{ruby}{mode=5}%
 \ltjsetparameter{rubypreintrusion={`立,0.5}, rubypostintrusion={`立,0.5}}%
 は\ltjruby{美}{うつく}しい
   \quad は\ltjruby{聴衆}{ちようしゆう}と\quad
 は\ltjruby{暁}{あかつき}立\quad
 は\ltjruby{峠}{とうげ}立\quad
-は\ltjruby{聴衆}{ちようしゆう}立\par}
-\item[10]{%
+は\ltjruby{聴衆}{ちようしゆう}立\quad
+は\ltjruby{聴衆}{ちようしゆう}達\par}
+\item[010]{%
 \setkeys[ltj]{ruby}{mode=9}%
 \ltjsetparameter{rubypreintrusion={`立,0.5}, rubypostintrusion={`立,0.5}}%
 は\ltjruby{美}{うつく}しい
@@ -666,14 +675,24 @@
   \quad は\ltjruby{聴衆}{ちようしゆう}と\quad
 は\ltjruby{暁}{あかつき}立\quad
 は\ltjruby{峠}{とうげ}立\quad
-は\ltjruby{聴衆}{ちようしゆう}立\par}
-\item[11]{\setkeys[ltj]{ruby}{mode=13}%
+は\ltjruby{聴衆}{ちようしゆう}立\quad
+は\ltjruby{聴衆}{ちようしゆう}達\par}
+\item[011]{\setkeys[ltj]{ruby}{mode=13}%
 \ltjsetparameter{rubypreintrusion={`立,0.5}, rubypostintrusion={`立,0.5}}%
 は\ltjruby{美}{うつく}しい\quad
 は\ltjruby{聴衆}{ちようしゆう}と\quad
 は\ltjruby{暁}{あかつき}立\quad
 は\ltjruby{峠}{とうげ}立\quad
-は\ltjruby{聴衆}{ちようしゆう}立\par}
+は\ltjruby{聴衆}{ちようしゆう}立\quad
+は\ltjruby{聴衆}{ちようしゆう}達\par}
+\item[100]{\setkeys[ltj]{ruby}{mode=17}%
+\ltjsetparameter{rubypreintrusion={`立,0.5}, rubypostintrusion={`立,0.5}}%
+は\ltjruby{美}{うつく}しい\quad
+は\ltjruby{聴衆}{ちようしゆう}と\quad
+は\ltjruby{暁}{あかつき}立\quad
+は\ltjruby{峠}{とうげ}立\quad
+は\ltjruby{聴衆}{ちようしゆう}立\quad
+は\ltjruby{聴衆}{ちようしゆう}達\par}
 \end{description}
 \end{enumerate}
 

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty	2023-02-11 21:18:39 UTC (rev 65790)
@@ -519,7 +519,8 @@
     \group_end:
   }
 
-  \msg_warning:nnx { luatexja-preset }{ scale }{ \Cjascale }
+  \fp_compare:nNnF  \Cjascale = 1
+    { \msg_warning:nnx { luatexja-preset }{ scale }{ \Cjascale } }
 
   % {1: encoding}{2: family}{3: series}{4: shape}{5: fontname}{6: feature}{7: scale}
   \cs_new:Nn \__ltjpreset_declare_font_shape:nnnnnnn {

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2023-02-11 21:18:39 UTC (rev 65790)
@@ -4,7 +4,7 @@
 
 % LaTeX only!
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-ruby}[2022-07-03 v0.53]
+\ProvidesPackage{luatexja-ruby}[2023-01-21 v0.61]
 \RequirePackage{luatexja}
 
 %%------------------
@@ -32,14 +32,16 @@
 %% attr_ruby_mode
 %% bit 0: intrusion を有効にするか(1: 有効)
 %% bit 1: 前後の intrusion 許容量を小さい方に揃える (1: yes)
-%% bit 2, 3: intrusion をどう使って親文字を配置するか
-%%   00: intrusion なしでとりあえず計算し,左右の突出分を進入に割り当てる
-%%   01: pre-intrusion でまかなえるだけまかない,無理なら post- も使う
-%%   10: post を優先
-%%   11: 2 min (pre,post) までは pre, post に均等配分しようとする
-%%     >=01 で,intrusion で賄えきれなかった場合はいつものように伸長する.
-%% bit 4: 熟語ルビの際の処理方法(0: 常にグループ,1: 可能な限りブロックごとに)
-%%        ↑bit 4 は今は無効
+%% bit 2--4: intrusion をどう使って親文字を配置するか
+%%    00: intrusion なしでとりあえず計算し,左右の突出分を進入に割り当てる
+%%    01: pre-intrusion でまかなえるだけまかない,無理なら post- も使う
+%%    10: post を優先
+%%    11: 2 min (pre,post) までは pre, post に均等配分しようとする
+%%   100: 2 min (pre,post) までは pre, post に均等配分.
+%%        それでだめでも pre, post でまかなえるまでまかなう
+%% ※ 01--100 で,intrusion で賄えきれなかった場合はいつものように伸長する.
+%% bit 5: 熟語ルビの際の処理方法(0: 常にグループ,1: 可能な限りブロックごとに)
+%%        ↑bit 5 は今は無効
 \ltj@@rkeydef{mode}
 %% intrusion 量強制固定(bit 0, bit 1 より優先,負数で「自動」)
 %% attr は sp 単位だが,ユーザーはルビ全角単位で指定する
@@ -153,36 +155,36 @@
 
 %%%%%%%% ZR さんの PXrubrica パッケージ中のコードから引用・改変
 % \pxrr at decompbar: a|bc -> \ltj@@ruby at mark{a}\ltj@@ruby at mark{bc}
-\let\pxrr at res\empty
-\def\pxrr at ifx#1{%
+\let\ltj@@ruby at res\empty
+\def\ltj@@ruby at ifx#1{%
   \ifx#1\expandafter\@firstoftwo
   \else\expandafter\@secondoftwo
   \fi
 }
-\def\pxrr at nil{\noexpand\pxrr at nil}
-\def\pxrr at end{\noexpand\pxrr at end}
-\def\pxrr at appto#1#2{%
+\def\ltj@@ruby at nil{\noexpand\ltj@@ruby at nil}
+\def\ltj@@ruby at end{\noexpand\ltj@@ruby at end}
+\def\ltj@@ruby at appto#1#2{%
   \expandafter\def\expandafter#1\expandafter{#1#2}%
 }
-\def\pxrr at decompbar#1{%
-  \let\pxrr at res\@empty
-  \pxrr at decompbar@loopa\pxrr at nil#1|\pxrr at end|%
+\def\ltj@@ruby at decompbar#1{%
+  \let\ltj@@ruby at res\@empty
+  \ltj@@ruby at decompbar@loopa\ltj@@ruby at nil#1|\ltj@@ruby at end|%
 }
-\def\pxrr at decompbar@loopa#1|{%
-  \expandafter\pxrr at decompbar@loopb\expandafter{\@gobble#1}%
+\def\ltj@@ruby at decompbar@loopa#1|{%
+  \expandafter\ltj@@ruby at decompbar@loopb\expandafter{\@gobble#1}%
 }
-\def\pxrr at decompbar@loopb#1{%
-  \pxrr at decompbar@loopc#1\relax\pxrr at nil{#1}%
+\def\ltj@@ruby at decompbar@loopb#1{%
+  \ltj@@ruby at decompbar@loopc#1\relax\ltj@@ruby at nil{#1}%
 }
-\def\pxrr at decompbar@loopc#1#2\pxrr at nil#3{%
-  \pxrr at ifx{#1\pxrr at end}{}{%
-    \ifx\pxrr at res\@empty
-      \def\pxrr at res{\ltj@@ruby at mark}%
+\def\ltj@@ruby at decompbar@loopc#1#2\ltj@@ruby at nil#3{%
+  \ltj@@ruby at ifx{#1\ltj@@ruby at end}{}{%
+    \ifx\ltj@@ruby at res\@empty
+      \def\ltj@@ruby at res{\ltj@@ruby at mark}%
     \else
-      \pxrr at appto\pxrr at res{\ltj@@ruby at mark}%
+      \ltj@@ruby at appto\ltj@@ruby at res{\ltj@@ruby at mark}%
     \fi
-    \pxrr at appto\pxrr at res{{#3}}%
-    \pxrr at decompbar@loopa\pxrr at nil
+    \ltj@@ruby at appto\ltj@@ruby at res{{#3}}%
+    \ltj@@ruby at decompbar@loopa\ltj@@ruby at nil
   }%
 }
 %%%%%%%% ここまで
@@ -200,8 +202,8 @@
 	luatexja.ruby.ruby_tmplist_p = \string{\string}}%
   \leavevmode\dimen0=\f at size pt\dimen1=\ltj@@rubyip at size\dimen0%
   % 引数展開,テーブルにセット
-  \pxrr at decompbar{#2}{\let\ltj@@ruby at mark\ltj@@ruby at sp\pxrr at res}%
-  \pxrr at decompbar{#3}{\let\ltj@@ruby at mark\ltj@@ruby at sr\pxrr at res}%
+  \ltj@@ruby at decompbar{#2}{\let\ltj@@ruby at mark\ltj@@ruby at sp\ltj@@ruby at res}%
+  \ltj@@ruby at decompbar{#3}{\let\ltj@@ruby at mark\ltj@@ruby at sr\ltj@@ruby at res}%
   {\fontsize{\ltj@@rubyip at size\dimen0}\z@\selectfont\ltj@@rubyip at fontcmd
     \global\dimen1=\zw\global\dimen2=\zh}%
   \directlua{%

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-direction.lua	2023-02-11 21:18:39 UTC (rev 65790)
@@ -550,7 +550,7 @@
    local ltj_tempcnta = luatexbase.registernumber 'ltj at tempcnta'
    local getbox = tex.getbox
    local dir_backup
-   function luatexja.direction.unbox_check_dir(is_copy)
+   function luatexja.direction.unbox_check_dir()
       start_time_measure 'box_primitive_hook'
       local list_dir = get_dir_count()%dir_math_mod
       local b = getbox(getcount(ltj_tempcnta))
@@ -571,8 +571,42 @@
                if getid(hd)==id_whatsit and getsubtype(hd)==sid_user
                   and getfield(hd, 'user_id')==DIR then
                      local d = hd
+                     nh, hd = node_remove(nh, hd); node_free(d)
+               else
+                  hd = node_next(hd)
+               end
+            end
+            setlist(bd, nh)
+         end
+      end
+      if luatexja.global_temp and tex.globaldefs~=luatexja.global_temp then
+         tex.globaldefs = luatexja.global_temp
+      end
+      stop_time_measure 'box_primitive_hook'
+   end
+   function luatexja.direction.uncopy_check_dir()
+      start_time_measure 'box_primitive_hook'
+      local list_dir = get_dir_count()%dir_math_mod
+      local b = getbox(getcount(ltj_tempcnta))
+      if b and getlist(to_direct(b)) then
+         local box_dir = get_box_dir(to_direct(b), dir_yoko)
+         if box_dir%dir_math_mod ~= list_dir then
+            ltjb.package_error(
+               'luatexja',
+               "Incompatible direction list can't be unboxed",
+               'I refuse to unbox a box in differrent direction.')
+            tex.sprint(cat_lp, '\\@gobbletwo')
+         else
+            dir_backup = nil
+            local bd = to_direct(b)
+            local hd = getlist(bd)
+            local nh = hd
+            while hd do
+               if getid(hd)==id_whatsit and getsubtype(hd)==sid_user
+                  and getfield(hd, 'user_id')==DIR then
+                     local d = hd
                      nh, hd = node_remove(nh, hd)
-                     if is_copy==true and (not dir_backup) then
+                     if not dir_backup then
                         dir_backup = d; setnext(dir_backup, nil)
                      else
                         node_free(d)

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2023-02-11 21:18:39 UTC (rev 65790)
@@ -3,7 +3,7 @@
 --
 luatexbase.provides_module({
   name = 'luatexja.ruby',
-  date = '2022-08-29',
+  date = '2022-12-31',
   description = 'Ruby annotation',
 })
 luatexja.ruby = {}
@@ -318,7 +318,7 @@
    local pre_intrusion, post_intrusion
    local ppre, pmid, ppost = tmp_tbl.ppre, tmp_tbl.pmid, tmp_tbl.ppost
    local mapre, mapost = tmp_tbl.mapre, tmp_tbl.mapost
-   local intmode = (tmp_tbl.mode//4)%4
+   local intmode = (tmp_tbl.mode//4)%8
    if no_begin then mapre  = mapre + tmp_tbl.before_jfmgk end
    if no_end   then mapost = mapost + tmp_tbl.after_jfmgk end
    if (tmp_tbl.mode%4 >=2) and (tmp_tbl.pre<0) and (tmp_tbl.post<0) then
@@ -336,7 +336,7 @@
       post_intrusion = min(mapost, sumprot);
       pre_intrusion = min(mapre, max(sumprot-post_intrusion, 0))
       p = enlarge(p, rwidth, ppre, pmid, ppost, pre_intrusion, post_intrusion)
-   else --  intmode == 3
+   elseif intmode==3 then
       local n = min(mapre, mapost)*2
       if n < sumprot then
          pre_intrusion = n/2; post_intrusion = n/2
@@ -346,6 +346,15 @@
       p = enlarge(p, rwidth, ppre, pmid, ppost, pre_intrusion, post_intrusion)
       pre_intrusion = min(mapre, pre_intrusion + round(ppre*getfield(p, 'glue_set')*65536))
       post_intrusion = min(mapost, post_intrusion + round(ppost*getfield(p, 'glue_set')*65536))
+   else  --  intmode == 4
+      if 2*min(mapre, mapost) > sumprot then
+         pre_intrusion = sumprot//2; post_intrusion = sumprot/2
+      elseif mapre>=mapost then 
+         pre_intrusion, post_intrusion = min(mapre, sumprot-mapost), mapost
+      else
+         pre_intrusion, post_intrusion = mapre, min(mapost, sumprot-mapre)
+      end
+      p = enlarge(p, rwidth, ppre, pmid, ppost, pre_intrusion, post_intrusion)
    end
    setshift(r, -pre_intrusion)
    local rwidth = rwidth - pre_intrusion - post_intrusion

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty	2023-02-11 21:18:39 UTC (rev 65790)
@@ -65,7 +65,7 @@
   \expandafter\let\csname ifltj at in@latex\expandafter\endcsname
     \csname iftrue\endcsname
   \NeedsTeXFormat{LaTeX2e}
-  \ProvidesPackage{luatexja-core}[2022-08-24 Core of LuaTeX-ja]
+  \ProvidesPackage{luatexja-core}[2023-02-11 Core of LuaTeX-ja]
 \fi                             %</LaTeX>
 
 %% Load prerequisite packages.
@@ -228,8 +228,7 @@
   \def\ltj at temp{#1}\afterassignment\ltj@@jfont\directlua{luatexja.jfont.jfontdefX(true,  'yoko')}}
 \newluafunction\ltj@@jfont at inner
 \directlua{
-  local t = lua.get_functions_table()
-  t[\the\ltj@@jfont at inner] = luatexja.jfont.jfontdefY
+  (lua.get_functions_table())[\the\ltj@@jfont at inner] = luatexja.jfont.jfontdefY
 }
 \def\ltj@@jfont{\expandafter\expandafter\expandafter\luafunction\expandafter\ltj@@jfont at inner\ltj at temp}
 
@@ -487,8 +486,7 @@
 }
 \newluafunction\ltj@@getparam at one@inner
 \directlua{
-  local t = lua.get_functions_table()
-  t[\the\ltj@@getparam at one@inner] = luatexja.ext_get_parameter_unary
+  (lua.get_functions_table())[\the\ltj@@getparam at one@inner] = luatexja.ext_get_parameter_unary
 }
 \luadef\ltj@@getparam at one\ltj@@getparam at one@inner
 \def\ltj@@getparam at two#1#2{%
@@ -600,8 +598,7 @@
 \let\ltj@@orig at insert\insert
 \newluafunction\ltj@@lua at populate@insertwhatsit at inner
 \directlua{
-  local t = lua.get_functions_table()
-  t[\the\ltj@@lua at populate@insertwhatsit at inner]
+  (lua.get_functions_table())[\the\ltj@@lua at populate@insertwhatsit at inner]
     = luatexja.direction.populate_insertion_dir_whatsit
 }
 \luadef\ltj@@lua at populate@insertwhatsit\ltj@@lua at populate@insertwhatsit at inner
@@ -673,8 +670,7 @@
 %%%% \raise, \lower, \moveleft, \moveright
 \newluafunction\ltj@@lua at raisebox@inner
 \directlua{
-  local t = lua.get_functions_table()
-  t[\the\ltj@@lua at raisebox@inner]=luatexja.direction.raise_box
+  (lua.get_functions_table())[\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
@@ -701,8 +697,12 @@
 \let\moveright\ltj@@moveright %% PRIMITIVE
 
 %%%%\vsplit
+\newluafunction\ltj@@vsplit at inner
+\directlua{
+  (lua.get_functions_table())[\the\ltj@@vsplit at inner]=luatexja.direction.vsplit
+}
 \let\ltj@@orig at vsplit\vsplit
-\protected\def\ltj@@vsplit{\directlua{luatexja.direction.vsplit()}}
+\protected\def\ltj@@vsplit{\luafunction\ltj@@vsplit at inner}
 \let\vsplit\ltj@@vsplit %% PRIMITIVE
 
 %%%% \vcenter
@@ -715,30 +715,34 @@
 
 %%%% \unhbox and \unvbox
 \newluafunction\ltj@@lua at unboxcheckdir@inner
+\newluafunction\ltj@@lua at uncopycheckdir@inner
+\newluafunction\ltj@@lua at uncopy@restore at whatsit@inner
 \directlua{
   local t = lua.get_functions_table()
   t[\the\ltj@@lua at unboxcheckdir@inner]=luatexja.direction.unbox_check_dir
+  t[\the\ltj@@lua at uncopycheckdir@inner]=luatexja.direction.uncopy_check_dir
+  t[\the\ltj@@lua at uncopy@restore at whatsit@inner]=luatexja.direction.uncopy_restore_whatsit
 }
 \luadef\ltj@@lua at unboxcheckdir\ltj@@lua at unboxcheckdir@inner
+\luadef\ltj@@lua at uncopycheckdir\ltj@@lua at uncopycheckdir@inner
+\luadef\ltj@@lua at uncopy@restore at whatsit\ltj@@lua at uncopy@restore at whatsit@inner
 \long\def \@gobbletwo #1#2{}
 \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}
+\protected\def\ltj@@unhbox@{\ltj@@lua at unboxcheckdir\expandafter\ltj@@orig at unhbox\the\ltj at tempcnta\relax}
+\protected\def\ltj@@unvbox@{\ltj@@lua at unboxcheckdir\expandafter\ltj@@orig at unvbox\the\ltj at tempcnta\relax}
 \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()}}
+  \ltj@@lua at uncopycheckdir\expandafter\ltj@@orig at unhcopy\the\ltj at tempcnta\relax
+  \ltj@@lua at uncopy@restore at whatsit}%
 \protected\def\ltj@@unvcopy@{%
-  \directlua{luatexja.direction.unbox_check_dir(true)}%
-  \ltj@@orig at unvcopy\ltj at tempcnta
-  \directlua{luatexja.direction.uncopy_restore_whatsit()}}
+  \ltj@@lua at uncopycheckdir\expandafter\ltj@@orig at unvcopy\the\ltj at tempcnta\relax
+  \ltj@@lua at uncopy@restore at whatsit}%
 \let\unhbox\ltj@@unhbox %% PRIMITIVE
 \let\unvbox\ltj@@unvbox %% PRIMITIVE
 \let\unhcopy\ltj@@unhcopy %% PRIMITIVE

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2023-02-11 21:18:39 UTC (rev 65790)
@@ -27,7 +27,7 @@
 \newif\ifltj at disablejfam
 
 %%%% VERSION
-\def\LuaTeXjaversion{20221213.0}
+\def\LuaTeXjaversion{20230211.0}
 
 %% Check if LaTeX is used.
 \begingroup\expandafter\expandafter\expandafter\endgroup

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty	2023-02-11 21:18:04 UTC (rev 65789)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/patches/lltjp-siunitx.sty	2023-02-11 21:18:39 UTC (rev 65790)
@@ -1,5 +1,5 @@
 %
-% lltjp-siunitx.sty 2022-12-12
+% lltjp-siunitx.sty 2022-12-14
 %
 
 \NeedsTeXFormat{LaTeX2e}
@@ -34,17 +34,15 @@
 \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 }
-\AtBeginDocument{
-    \cs_if_exist:NT \TblrNum
-    { \RenewDocumentCommand \TblrNum { m }
-      {
-        \__tblr_siunitx_process:Nn
-          { \cs_set_eq:NN \__siunitx_table_collect_begin:w
-                          \ltj_orig__siunitx_table_collect_begin:w
-            \tablenum}
-          {#1}
-      }
-    }
+\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:
   }
 }% siunitx v3.00 end
 {% siunitx v2.xx



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