texlive[63801] Master/texmf-dist: luatexja (3jul22)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 3 22:58:43 CEST 2022


Revision: 63801
          http://tug.org/svn/texlive?view=revision&revision=63801
Author:   karl
Date:     2022-07-03 22:58:43 +0200 (Sun, 03 Jul 2022)
Log Message:
-----------
luatexja (3jul22)

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-preset.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
    trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
    trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/README	2022-07-03 20:57:54 UTC (rev 63800)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/README	2022-07-03 20:58:43 UTC (rev 63801)
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20220530.0
+The LuaTeX-ja Package 20220703.0
 --------------------------------
 Copyright (c) 2011--2022 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 20220530.0 in the Git repository by
+      or tagged as 20220703.0 in the Git repository by
       <http://git.osdn.jp/view?p=luatex-ja/luatexja.git
-                              ;a=snapshot;h=refs/tags/20220530.0;sf=tgz>
+                              ;a=snapshot;h=refs/tags/20220703.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: Mon May 30 12:00:10 2022 +0900
+Last commit date: Sun Jul 3 11:15:41 2022 +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	2022-07-03 20:57:54 UTC (rev 63800)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex	2022-07-03 20:58:43 UTC (rev 63801)
@@ -2,7 +2,7 @@
 %%% a test of ruby.
 \documentclass[a4paper,10ptj]{ltjsarticle}
 \usepackage[rgb]{xcolor}
-\usepackage{enumitem,mleftright}
+\usepackage{enumitem,mleftright,pict2e}
 \usepackage{luatexja-otf,amsmath,bxghost}
 \usepackage[no-math]{fontspec}
 \usepackage[match]{luatexja-fontspec}
@@ -36,7 +36,6 @@
 	allcolors=blue,
 	pdftitle={luatexja-ruby.sty}
 }
-
 \def\Node#1#2{\,\vcenter{\hbox{\fboxsep=1pt\fbox{\vbox{\small\halign{\hfil##\hfil\cr
   #1\mathstrut\cr\noalign{\smallskip\hrule height.4pt\smallskip}\strut\<#2\cr}}}}}\,}
 \def\LuaTeX{Lua\TeX}
@@ -70,6 +69,15 @@
 \ExplSyntaxOff
 %%%%
 
+\makeatletter
+\def\figureautorefname{図}
+\def\HyRef at autoref#1#2{%
+  \begingroup
+    \Hy at safe@activestrue
+    \expandafter\HyRef at autosetref\csname r@#2\endcsname{#2}{#1}%
+  \endgroup\eghostguarded{}%" 欧文ゴースト
+}
+
 \title{\textsf{luatexja-ruby}パッケージ}
 \author{\LuaTeX-jaプロジェクトチーム}
 \date{\texttt{\csname ver at luatexja-ruby.sty\endcsname}(\today)}
@@ -132,7 +140,12 @@
   本来foohogeにおいては……
 \end{quote}
 
+また,「親文字全角幅」「親文字全角高さ」という用語は,それぞれ親文字の和文フォントにおける
+\cs{zw},~\cs{zh}命令で取得できる値を表す.多くの場合は両者は同じ値であるが,いつでもそうであるという保証はない.
+「ルビ全角幅」「ルビ全角高さ」についても同様である.
+
 \subsection{\ruby{命|令}{めい|れい}}
+\label{ssec:ltjruby}
 \paragraph{\cs{ltjruby}}
 ルビ出力用命令の本体.\verb+\ruby+ という別名を定義している.
 \begin{quote}
@@ -194,11 +207,11 @@
 既定値は\ \verb+{1}{1}{0}+ である.
 
 \item[maxmargin=<real>] 親文字の方がルビより長い時に,ルビの先頭と親文字の先頭,及び
-ルビ末尾と親文字の末尾の間に許される最大の空白量.\textbf{親文字全角単位}で指定し,既定値は0.5.
+ルビ末尾と親文字の末尾の間に許される最大の空白量.\textbf{親文字全角幅単位}で指定し,既定値は0.5.
 
 \medskip
 \item[size=<real>] ルビ文字の親文字に対する大きさ.既定値は0.5.
-\item[intergap=<real>] ルビ文字と親文字との空きを親文字全角単位で指定.既定値は0.
+\item[intergap=<real>] ルビ文字と親文字との空きを親文字全角高さ単位で指定.既定値は0.
 \item[rubysmash=<bool>] ルビの高さを0にするか.既定値は偽.次が例である.
 \begin{LTXexample}[width=0.3\textwidth, preset=\Large]
 \ \vrule width 0pt height 2\zw depth 1\zw
@@ -212,12 +225,13 @@
   {本}{ほん}}
 \end{LTXexample}
 \item[ybaseheight=<real>] 非負の値が指定された場合,
-  \emph{縦組以外での}ルビの親文字の高さを全角高さの<real>倍と強制的に固定する.
+  \emph{縦組以外での}親文字の高さを親文字全角高さの<real>倍と強制的に固定する.
   負の値が指定された場合は「固定しない」(すなわち,v0.3より前の挙動と同じになる).
-  既定値は0.88.
-\item[tbaseheight=<real>] \texttt{ybaseheight}と同様だが,こちらは\emph{縦組での}ルビの親文字の高さを指定する.
-  既定値は0.5.
+  既定値は$0.88$.
+\item[tbaseheight=<real>] \texttt{ybaseheight}と同様だが,こちらは\emph{縦組での}親文字の高さを指定する.
+  既定値は$0.5$.
 \item[baseheight=<real>] \texttt{ybaseheight},\texttt{tbaseheight}を同時に指定したことと同義.
+  次の例や\autoref{fig:ruby_vertical}を参照.
 \begin{LTXexample}[width=0.3\textwidth, preset=\Large]
 \noindent
 \ltjruby[baseheight=0.88]{本}{ほん}\ 
@@ -229,9 +243,66 @@
 \ltjruby[baseheight=-1]{本}{ほん}\ 
 \ltjruby[baseheight=-1]{dvi}{ディーヴィーアイ}
 \end{LTXexample}
+\item[yrubydepth=<real>] 非負の値が指定された場合,
+  \emph{縦組以外での}ルビの深さをルビ全角の<real>倍と強制的に固定する.
+  負の値が指定された場合は「固定しない」(すなわち,v0.52以前の挙動と同じになる).
+  既定値は$0.12$.
+\item[trubydepth=<real>] \texttt{yrubydepth}と同様だが,こちらは\emph{縦組での}ルビの深さを指定する.
+  既定値は$0.5$.
+\item[rubydepth=<real>] \texttt{yrubydepth},\texttt{trubydepth}を同時に指定したことと同義.
+  次の例や\autoref{fig:ruby_vertical}を参照.
+\begin{LTXexample}[width=0.3\textwidth, preset=\Large]
+\noindent
+\ltjruby[rubydepth=0.12]{◆}{ほん}\ 
+\ltjruby[rubydepth=0.12]{◆}{pdf}\ 
+\ltjruby[rubydepth=0.12]{◆}{dvi}\\
+\ltjruby[rubydepth=0]{◆}{ほん}\ 
+\ltjruby[rubydepth=0]{◆}{pdf}\ 
+\ltjruby[rubydepth=0]{◆}{dvi}\\
+\ltjruby[rubydepth=-1]{◆}{ほん}\ 
+\ltjruby[rubydepth=-1]{◆}{pdf}\
+\ltjruby[rubydepth=-1]{◆}{dvi}
+\end{LTXexample}
 
+\begin{figure}[t]
+  {\centering\fontsize{48}{48}\selectfont\unitlength=\zw
+  \begin{picture}(7,2.5)(-0.5,-0.5)
+    \linethickness{0.4mm}
+    \put(0,0){\makebox(0,0)[l]{\smash{\hbox to 6.5\zw{親文字$\int_0^1 x\,dx$}}}}
+    \polygon(0,-.12)(0,0.88)(6.5,0.88)(6.5,-0.12)
+    \put(0,1.35){\makebox(0,0)[l]{\fontsize{24}{24}\selectfont\smash{\hbox to 13\zw{ルビ文字列◆◆◆◆◆◆◆◆}}}}
+    \polygon(0,1.2)(0,1.79)(6.5,1.79)(6.5,1.2)
+    \linethickness{0.125mm}
+    \put(-0.5,0){\line(1,0){7}}
+    \put(-0.5,1.35){\line(1,0){7}}
+    \put(-0.5,1.2){\line(1,0){0.5}}
+    \put(-0.5,0.88){\line(1,0){0.5}}
+    \put(-0.25,0){\vector(0,1){0.88}}
+    \put(-0.25,1.35){\vector(0,-1){0.15}}
+    \put(-0.25,0.44){\normalsize\makebox(0,0)[r]{$H$\,\,}}
+    \put(-0.25,1.45){\normalsize\makebox(0,0)[b]{$D$}}
+    \put(-0.125,0.88){\vector(0,1){0.32}}
+    \put(-0.125,1.04){\normalsize\makebox(0,0)[l]{\,\,$\mbox{\texttt{intergap}}\cdot p$}}
+  \end{picture}\par}
 
+  \normalsize\leftskip=0.5\dimexpr\textwidth-30\zw \rightskip=\leftskip
+  ここで$p$は親文字における全角高さ,$r$はルビ文字における全角高さであり,
+  \begin{gather*}
+  H=
+  \begin{cases}
+    \mbox{\texttt{[yt]baseheight}}\cdot p&\mbox{if\ $\mbox{\texttt{[yt]baseheight}}\ge 0$,}\\
+    \mbox{(自然高さ)}&\mbox{if\ $\mbox{\texttt{[yt]baseheight}}\string<0$,}
+  \end{cases}\\
+  D=
+  \begin{cases}
+    \mbox{\texttt{[yt]rubydepth}}\cdot r&\mbox{if\ $\mbox{\texttt{[yt]rubydepth}}\ge 0$,}\\
+    \mbox{(自然深さ)}&\mbox{if\ $\mbox{\texttt{[yt]rubydepth}}\string<0$.}
+  \end{cases}
+  \end{gather*}
+  \caption{ルビの垂直配置}\label{fig:ruby_vertical}
+\end{figure}
 
+
 \item[kenten=<command>]各文字につく圏点の出力命令を指定する.
   既定値は「\verb+\textbullet+」である.
 
@@ -268,11 +339,12 @@
 <option>の既定値を指定する.\textsf{luatexja-ruby}読み込み時の値は
 各項目の所で既に説明してあるが,次のようになっている.
 \begin{verbatim}
-  pre=-1, post=-1, mode=1, 
+  pre=-1, post=-1, mode=1,
   stretchruby={1}{2}{1}, stretch = {1}{2}{1},
   stretchbol={0}{1}{1}, stretcheol={1}{1}{0},
   maxmargin=0.5, size=0.5, intergap=0, rubysmash=false,
   kenten=\textbullet, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5,
+  yrubydepth=0.12, trubydepth=0.5,
   intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip
 \end{verbatim}
 
@@ -280,7 +352,7 @@
 \begin{description}
 \item[\Param{rubypreintrusion}\ttfamily =\{<chr\_code>, <pre\_int>\}]
   文字<chr\_code> に,その\textbf{直後}のルビによって掛けられるルビ文字列の最大長
-  (つまり,\underline{前文字進入許容量})をルビ全角単位で指定.
+  (つまり,\underline{前文字進入許容量})をルビ全角幅単位で指定.
 
   \textbf{v0.5以降での変更点}:もし$-a$~($a>0$)を指定した場合は,実際の\underline{前文字進入許容量}は$a$となるが,
   文字<chr\_code>の前のJFMグルーに進入が発生した場合には,\underline{前文字進入許容量}が0でなかった場合は,の後のJFMグルーにはルビの進入は発生しない.
@@ -287,7 +359,7 @@
 
 \item[\Param{rubypostintrusion}\ttfamily =\{<chr\_code>, <post\_int>\}]
   文字<chr\_code> に,その\textbf{直前}のルビによって掛けられるルビ文字列の最大長
-  (つまり,\underline{後文字進入許容量})をルビ全角単位で指定.
+  (つまり,\underline{後文字進入許容量})をルビ全角幅単位で指定.
 
   \textbf{v0.5以降での変更点}:もし$-a$~($a>0$)を指定した場合は,実際の\underline{後文字進入許容量}は$a$となるが,
   実際の\underline{後文字進入量}が0でなかった場合は,文字<chr\_code>の後のJFMグルーにはルビの進入は発生しない.
@@ -323,7 +395,7 @@
 
 
 \paragraph{\cs{ltjkenten}}
-圏点を出力する命令で,\verb+\kenten+ という別名を定義している.
+圏点を出力する命令であり,
 \begin{quote}
  \ttfamily\cs{ltjkenten}[<option>]\{親文字\}
 \end{quote}
@@ -355,7 +427,6 @@
   親文字全角の$1/1000$だけルビ文字列が長くなることを許容している.
 }であれば,
 単純グループルビの並びとして扱われる.すなわち,次ページ冒頭の2行は全くの等価となる.
-\newpage
 \begin{verbatim}
 \ltjruby{普|通|車}{ふ|つう|しや}
 \ltjruby{普}{ふ}\ltjruby{通}{つう}\ltjruby{車}{しや}
@@ -402,6 +473,12 @@
 エラーが発生して止まることもあるし,エラーが発生しなくても正しく組まれない.
 \end{itemize}
 
+\paragraph{別名について}
+\verb+\begin{document}+時に%
+\begin{itemize}
+ \item \cs{ruby}がすでに定義されていない場合に限り,\cs{ruby}が\cs{ltjruby}の別名として定義される.
+ \item \cs{kenten}がすでに定義されていない場合に限り,\cs{kenten}が\cs{ltjkenten}の別名として定義される.
+\end{itemize}
 
 \section{\ruby{注|意|点}{ちゆう|い|てん}}
 \paragraph{前後からのルビ文字のはみ出し1}
@@ -507,6 +584,7 @@
 
 \newpage
 \section{\ruby{実|装}{じつ|そう}について}
+
 \subsection{進入量の計算}
 \label{ssec:calc_intrusion}
 ルビ文字を自然に組んだときの幅が親文字のそれより多い場合,
@@ -880,6 +958,31 @@
   \makebox[10\zw][s]{値とは\ruby{\texttt{;}}{セミコロン}で区切}%
 
   \ltjruby{痛}{いたみ}(\ltjruby{病}{びやう}あ
+
+  v0.53\ \ruby{コギト}{Cogito}
+  \ruby{コイト}{Coito}
+  \ruby{ノ}{no}
+  \ruby{ト}{TO}
+  \ruby{ヨ}{yo}
+  \ruby{ぢ}{dji}
+  \\
+  \ruby[intergap=-1.5]{ノ}{no}
+  \ruby[intergap=-1.5]{ト}{TO}
+  \ruby[intergap=-1.5]{ヨ}{yo}
+  \ruby[intergap=-1.5]{ぢ}{dji}
+           
+  v0.52\ \ruby[rubydepth=-1]{コギト}{Cogito}  % too high
+  \ruby[rubydepth=-1]{コイト}{Coito}  % too low
+  \ruby[rubydepth=-1]{ノ}{no}  % too low
+  \ruby[rubydepth=-1]{ト}{TO}  % too low
+  \ruby[rubydepth=-1]{ヨ}{yo}  % too high
+  \ruby[rubydepth=-1]{ぢ}{dji}  % too high
+  \\
+  \ruby[intergap=-1.5,rubydepth=-1]{ノ}{no}  % too low
+  \ruby[intergap=-1.5,rubydepth=-1]{ト}{TO}  % too low
+  \ruby[intergap=-1.5,rubydepth=-1]{ヨ}{yo}  % too high
+  \ruby[intergap=-1.5,rubydepth=-1]{ぢ}{dji}  % too high
+
 }
 \fbox{\box0}
 

Modified: trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2022-07-03 20:57:54 UTC (rev 63800)
+++ trunk/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx	2022-07-03 20:58:43 UTC (rev 63801)
@@ -1651,7 +1651,7 @@
   \hyphenchar\font=-1 \exhyphenchar=-1
   haranoaji, hiragino-pro, hiragino-pron, ipa, ipa-hg, ipaex, ipaex-hg,
   kozuka-pr6, kozuka-pr6n, kozuka-pro, moga-mobo, moga-mobo-ex,
-  bizud, morisawa-pr6n, morisawa-pro, ms, ms-hg, noembed, noto-otc, noto-otf,
+  bizud, morisawa-pr6n, morisawa-pro, ms, ms-hg, noembed, noto-otc, noto-otf, noto, noto-jp, 
   sourcehan, sourcehan-jp, ume, yu-osx, yu-win, yu-win10
 \end{quote}
 
@@ -8733,12 +8733,14 @@
 
  \item[noto-otc]  Noto Serif CJK and Noto Sans CJK fonts (OTC)
 %<en>    \\*[-\dimexpr\medskipamount+\baselineskip\relax]
- \item[noto-otf]  Noto Serif CJK and Noto Sans CJK fonts (Language-specific OTF)
+ \item[noto-otf\textrm{, }noto]  Noto Serif CJK and Noto Sans CJK fonts (Language-specific OTF)
+%<en>    \\*[-\dimexpr\medskipamount+\baselineskip\relax]
+ \item[noto-jp]  Noto Serif CJK and Noto Sans CJK fonts (Region-specific subset OTF)
 \begin{center}\small
-\def\AD#1#2{Noto #1 CJK #2&Noto #1 CJK JP #2}%
+\def\AD#1#2{Noto #1 CJK #2&Noto #1 CJK JP #2&Noto #1 JP #2}%
 \begin{tabular}{lllll}
 \toprule
-\bf family&\bf series&\texttt{noto-otc}&\texttt{noto-otf}\\
+\bf family&\bf series&\texttt{noto-otc}&\texttt{noto-otf}, \texttt{noto}&\texttt{noto-jp}\\
 \midrule
  &light&\AD{Serif}{Light}\\
 %<en>\textit{mincho}%
@@ -8749,7 +8751,7 @@
  &&\AD{Sans}{Regular*}\\
  &\smash{\raisebox{1.5ex}{medium}}
  &\AD{Sans}{Medium}\\
-\cmidrule(l){2-4}
+\cmidrule(l){2-5}
 %<en>\smash{\raisebox{2ex}{\textit{gothic}}}%
 %<ja>\smash{\raisebox{2ex}{\textgt{ゴシック}}}%
  &bold&\AD{Sans}{Bold}\\

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty	2022-07-03 20:57:54 UTC (rev 63800)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-preset.sty	2022-07-03 20:58:43 UTC (rev 63801)
@@ -1,5 +1,5 @@
 % luatexja-preset.sty
-\ProvidesPackage{luatexja-preset}[2020-09-14 Japanese font presets]
+\ProvidesPackage{luatexja-preset}[2022-06-19 Japanese font presets]
 
 \RequirePackage{expl3,l3keys2e}
 \RequirePackage{luatexja}
@@ -211,7 +211,7 @@
     mc =   A-OTF-RyuminPr6N-Light.otf,      mc-b = A-OTF-FutoMinA101Pr6N-Bold.otf,
     gt-d = A-OTF-GothicBBBPr6N-Medium.otf , gt-b = A-OTF-FutoGoB101Pr6N-Bold.otf,
     gt-u = A-OTF-GothicBBBPr6N-Medium.otf , gt-eb = A-OTF-MidashiGoPr6N-MB31.otf,
-    mg-m = A-OTF-Jun101Pr6N-Light.otf,
+    mg-m = A-OTF-ShinMGoPr6N-Light.otf,
     __custom = false, __office = false, __noembed = false,
 }
 
@@ -312,6 +312,20 @@
     mc-l =  Noto~Serif~CJK~JP~Light,
     __custom = false, __office = false, __noembed = false,
 }
+\ltjpreset_declare_preset:nx{noto}{
+    noto-otf,
+}
+\ltjpreset_declare_preset:nx{noto-jp}{
+    mc-m =  Noto~Serif~JP~Regular,
+    mc-b =  Noto~Serif~JP~Bold,
+    gt-d =  Noto~Sans~JP~Regular,
+    gt-b =  Noto~Sans~JP~Bold,
+    gt-u =  Noto~Sans~JP~Medium,
+    gt-eb = Noto~Sans~JP~Black,
+    mg-m =  Noto~Sans~JP~Medium,
+    mc-l =  Noto~Serif~JP~Light,
+    __custom = false, __office = false, __noembed = false,
+}
 
 % HaranoAji {Mincho, Gothic}
 \ltjpreset_declare_preset:nx{haranoaji}{

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2022-07-03 20:57:54 UTC (rev 63800)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/addons/luatexja-ruby.sty	2022-07-03 20:58:43 UTC (rev 63801)
@@ -4,7 +4,7 @@
 
 % LaTeX only!
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luatexja-ruby}[2021-05-17 v0.52]
+\ProvidesPackage{luatexja-ruby}[2022-07-03 v0.53]
 \RequirePackage{luatexja}
 
 %%------------------
@@ -78,6 +78,14 @@
   \expandafter\def\csname ltj@@rubyip at tbaseheight\endcsname{#1}%
 }
 %% これらの値が正のとき,親文字の高さをこの値(\zh 単位)とみなす
+
+\ltj@@rkeydef{yrubydepth} % 縦組以外 (yoko, utod, dtou)
+\ltj@@rkeydef{trubydepth} % 縦組
+\define at key[ltj]{ruby}{rubydepth}{%
+  \expandafter\def\csname ltj@@rubyip at yrubydepth\endcsname{#1}%
+  \expandafter\def\csname ltj@@rubyip at trubydepth\endcsname{#1}%
+}
+
 \define at boolkey[ltj]{ruby}{intrude_jfmgk}[true]{}
 \define at boolkey[ltj]{ruby}{intrude_xkanjiskip}[true]{}
 \define at boolkey[ltj]{ruby}{intrude_kanjiskip}[true]{}
@@ -100,7 +108,7 @@
 % Lua ソースに渡す table 生成
 \bgroup
 \catcode`\_=11
-\gdef\ltj@@ruby at create@table#1{% #1: ルビ全角
+\gdef\ltj@@ruby at create@table#1#2{% #1: ルビ全角幅,#2: ルビ全角高さ
     \string{
       eps = \ltj at safe@dimen{\ltj@@rubyip at epsilon\zw},
       before_jfmgk = 0, after_jfmgk = 0,
@@ -119,6 +127,8 @@
           + 1048576 * \ifltj at ruby@rubysmash1\else0\fi),
       baseheight = \ltj at safe@dimen{\ifnum\ltjgetparameter{direction}=3
                      \ltj@@rubyip at tbaseheight\else\ltj@@rubyip at ybaseheight\fi\zh},
+      rubydepth = \ltj at safe@dimen{\ifnum\ltjgetparameter{direction}=3
+                     \ltj@@rubyip at trubydepth\else\ltj@@rubyip at yrubydepth\fi#2},
       intrude_jfmgk = \string{
        \ifltj at ruby@intrude_jfmgk [luatexja.icflag_table.FROM_JFM]=true,\fi
        \ifltj at ruby@intrude_kanjiskip
@@ -181,9 +191,10 @@
 \protected\def\ltjruby{\@ifnextchar[\ltj@@ruby{\ltj@@ruby[]}}%]
 \AtBeginDocument{%
   \ifdefined\ruby\else\let\ruby=\ltjruby\fi
+  \ifdefined\kenten\else\let\kenten=\ltjkenten\fi
   \directlua{luatexja.ruby.read_old_break_info()}%
 }
-\def\ltj@@ruby[#1]#2#3{{% #1: option #2: 親文字群,#3: ルビ文字列群,共に| 区切り
+\protected\def\ltj@@ruby[#1]#2#3{{% #1: option #2: 親文字群,#3: ルビ文字列群,共に| 区切り
   \setkeys[ltj]{ruby}{#1}%
   \directlua{luatexja.ruby.ruby_tmplist_r = \string{\string};
 	luatexja.ruby.ruby_tmplist_p = \string{\string}}%
@@ -191,9 +202,10 @@
   % 引数展開,テーブルにセット
   \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}%
-  {\fontsize{\ltj@@rubyip at size\dimen0}\z@\selectfont\ltj@@rubyip at fontcmd\global\dimen1=\zw}%
+  {\fontsize{\ltj@@rubyip at size\dimen0}\z@\selectfont\ltj@@rubyip at fontcmd
+    \global\dimen1=\zw\global\dimen2=\zh}%
   \directlua{%
-    luatexja.ruby.texiface(\ltj@@ruby at create@table{\dimen1},
+    luatexja.ruby.texiface(\ltj@@ruby at create@table{\dimen1}{\dimen2},
     luatexja.ruby.ruby_tmplist_r, luatexja.ruby.ruby_tmplist_p)}%
 }}
 
@@ -207,7 +219,6 @@
 }
 
 \protected\def\ltjkenten{\@ifnextchar[\ltj@@kenten{\ltj@@kenten[]}}%]
-\let\kenten=\ltjkenten
 \def\ltj@@kenten[#1]#2{{%
   \setkeys[ltj]{ruby}{#1, stretchruby=101}%
   \@tfor\ltj@@kenten at temp:=#2\do{\ltj@@ruby[]{\ltj@@kenten at temp}{\ltj@@rubyip at kenten}}%
@@ -244,11 +255,12 @@
 \ltjsetparameter{rubypreintrusion={-1,1}}
 
 \setkeys[ltj]{ruby}{
-  pre=-1, post=-1, mode=1, 
+  pre=-1, post=-1, mode=1,
   stretchruby={1}{2}{1}, stretch = {1}{2}{1},
   stretchbol={0}{1}{1}, stretcheol={1}{1}{0},
   maxmargin=0.5, size=0.5, intergap=0, rubysmash=false,
   kenten=\textbullet, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5,
+  yrubydepth=0.12, trubydepth=0.5,
   intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip,
   epsilon=0.0001,
 }

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2022-07-03 20:57:54 UTC (rev 63800)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/ltj-ruby.lua	2022-07-03 20:58:43 UTC (rev 63801)
@@ -3,7 +3,7 @@
 --
 luatexbase.provides_module({
   name = 'luatexja.ruby',
-  date = '2022-02-03',
+  date = '2022-06-25',
   description = 'Ruby annotation',
 })
 luatexja.ruby = {}
@@ -398,6 +398,7 @@
    setfield(a, 'depth', 0); setfield(k, 'kern', tmp_tbl.intergap)
    insert_after(r, r, a); insert_after(r, a, k);
    insert_after(r, k, p); setfield(p, 'next', nil)
+   if tmp_tbl.rubydepth >= 0 then setfield(r, 'depth', tmp_tbl.rubydepth) end
    if tmp_tbl.baseheight >= 0 then setfield(p, 'height', tmp_tbl.baseheight) end
    a = node.direct.vpack(r); setfield(a, 'shift', 0)
    set_attr(a, attr_ruby, post_intrusion)

Modified: trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2022-07-03 20:57:54 UTC (rev 63800)
+++ trunk/Master/texmf-dist/tex/luatex/luatexja/luatexja.sty	2022-07-03 20:58:43 UTC (rev 63801)
@@ -27,7 +27,7 @@
 \newif\ifltj at disablejfam
 
 %%%% VERSION
-\def\LuaTeXjaversion{20220530.0}
+\def\LuaTeXjaversion{20220703.0}
 
 %% Check if LaTeX is used.
 \begingroup\expandafter\expandafter\expandafter\endgroup



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