summaryrefslogtreecommitdiff
path: root/macros/luatex/generic
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-07-04 03:03:43 +0000
committerNorbert Preining <norbert@preining.info>2022-07-04 03:03:43 +0000
commit1c10375ec46d7d83b2f1efc2a71b7ea114c889f0 (patch)
tree47b3469111105b7767111dcb89858fbc1e73377f /macros/luatex/generic
parent34d318af65decbdb242ae03b64bf3f53266067b6 (diff)
CTAN sync 202207040303
Diffstat (limited to 'macros/luatex/generic')
-rw-r--r--macros/luatex/generic/luatexja/README8
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-en.pdfbin717450 -> 717582 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ja.pdfbin1149239 -> 1149384 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ruby.pdfbin381090 -> 390299 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ruby.tex129
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja.dtx12
-rw-r--r--macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty18
-rw-r--r--macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty26
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-ruby.lua3
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja.sty2
10 files changed, 165 insertions, 33 deletions
diff --git a/macros/luatex/generic/luatexja/README b/macros/luatex/generic/luatexja/README
index d22404d610..a769b41a75 100644
--- a/macros/luatex/generic/luatexja/README
+++ b/macros/luatex/generic/luatexja/README
@@ -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 @@ Installation
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 @@ Notes
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
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
index 06cae0dffc..7ad9b0ebc5 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
index f5a92ac497..8f1095869c 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ja.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf b/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf
index 2dce1034fc..870d9963ae 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ruby.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex b/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
index 3148d1df9e..e51f4558bb 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
@@ -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@autoref#1#2{%
+ \begingroup
+ \Hy@safe@activestrue
+ \expandafter\HyRef@autosetref\csname r@#2\endcsname{#2}{#1}%
+ \endgroup\eghostguarded{}%" 欧文ゴースト
+}
+
\title{\textsf{luatexja-ruby}パッケージ}
\author{\LuaTeX-jaプロジェクトチーム}
\date{\texttt{\csname ver@luatexja-ruby.sty\endcsname}(\today)}
@@ -132,7 +140,12 @@ plain \LuaTeX でのロードはまだサポートしておらず,
本来foohogeにおいては……
\end{quote}
+また,「親文字全角幅」「親文字全角高さ」という用語は,それぞれ親文字の和文フォントにおける
+\cs{zw},~\cs{zh}命令で取得できる値を表す.多くの場合は両者は同じ値であるが,いつでもそうであるという保証はない.
+「ルビ全角幅」「ルビ全角高さ」についても同様である.
+
\subsection{\ruby{命|令}{めい|れい}}
+\label{ssec:ltjruby}
\paragraph{\cs{ltjruby}}
ルビ出力用命令の本体.\verb+\ruby+ という別名を定義している.
\begin{quote}
@@ -194,11 +207,11 @@ plain \LuaTeX でのロードはまだサポートしておらず,
既定値は\ \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 @@ plain \LuaTeX でのロードはまだサポートしておらず,
{本}{ほん}}
\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,7 +243,64 @@ plain \LuaTeX でのロードはまだサポートしておらず,
\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>]各文字につく圏点の出力命令を指定する.
@@ -268,11 +339,12 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
<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,14 +352,14 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
\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グルーにはルビの進入は発生しない.
\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 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
\paragraph{\cs{ltjkenten}}
-圏点を出力する命令で,\verb+\kenten+ という別名を定義している.
+圏点を出力する命令であり,
\begin{quote}
\ttfamily\cs{ltjkenten}[<option>]\{親文字\}
\end{quote}
@@ -355,7 +427,6 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
親文字全角の$1/1000$だけルビ文字列が長くなることを許容している.
}であれば,
単純グループルビの並びとして扱われる.すなわち,次ページ冒頭の2行は全くの等価となる.
-\newpage
\begin{verbatim}
\ltjruby{普|通|車}{ふ|つう|しや}
\ltjruby{普}{ふ}\ltjruby{通}{つう}\ltjruby{車}{しや}
@@ -402,6 +473,12 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
エラーが発生して止まることもあるし,エラーが発生しなくても正しく組まれない.
\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 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
\newpage
\section{\ruby{実|装}{じつ|そう}について}
+
\subsection{進入量の計算}
\label{ssec:calc_intrusion}
ルビ文字を自然に組んだときの幅が親文字のそれより多い場合,
@@ -880,6 +958,31 @@ $r_2$,~$g_2$を行Bから除去・メモリ解放し,代わりに$n_3$を行B
\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}
diff --git a/macros/luatex/generic/luatexja/doc/luatexja.dtx b/macros/luatex/generic/luatexja/doc/luatexja.dtx
index 89bdf86348..7c167d96f6 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja.dtx
+++ b/macros/luatex/generic/luatexja/doc/luatexja.dtx
@@ -1651,7 +1651,7 @@ The following presets are defined:
\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 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
\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 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
&&\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}\\
diff --git a/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty b/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty
index 3da21dd155..b1d5873ab6 100644
--- a/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty
+++ b/macros/luatex/generic/luatexja/src/addons/luatexja-preset.sty
@@ -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}{
diff --git a/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty b/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty
index 8367feb047..1e50b1f680 100644
--- a/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty
+++ b/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty
@@ -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@tbaseheight\endcsname{#1}%
}
%% これらの値が正のとき,親文字の高さをこの値(\zh 単位)とみなす
+
+\ltj@@rkeydef{yrubydepth} % 縦組以外 (yoko, utod, dtou)
+\ltj@@rkeydef{trubydepth} % 縦組
+\define@key[ltj]{ruby}{rubydepth}{%
+ \expandafter\def\csname ltj@@rubyip@yrubydepth\endcsname{#1}%
+ \expandafter\def\csname ltj@@rubyip@trubydepth\endcsname{#1}%
+}
+
\define@boolkey[ltj]{ruby}{intrude_jfmgk}[true]{}
\define@boolkey[ltj]{ruby}{intrude_xkanjiskip}[true]{}
\define@boolkey[ltj]{ruby}{intrude_kanjiskip}[true]{}
@@ -100,7 +108,7 @@
% Lua ソースに渡す table 生成
\bgroup
\catcode`\_=11
-\gdef\ltj@@ruby@create@table#1{% #1: ルビ全角
+\gdef\ltj@@ruby@create@table#1#2{% #1: ルビ全角幅,#2: ルビ全角高さ
\string{
eps = \ltj@safe@dimen{\ltj@@rubyip@epsilon\zw},
before_jfmgk = 0, after_jfmgk = 0,
@@ -119,6 +127,8 @@
+ 1048576 * \ifltj@ruby@rubysmash1\else0\fi),
baseheight = \ltj@safe@dimen{\ifnum\ltjgetparameter{direction}=3
\ltj@@rubyip@tbaseheight\else\ltj@@rubyip@ybaseheight\fi\zh},
+ rubydepth = \ltj@safe@dimen{\ifnum\ltjgetparameter{direction}=3
+ \ltj@@rubyip@trubydepth\else\ltj@@rubyip@yrubydepth\fi#2},
intrude_jfmgk = \string{
\ifltj@ruby@intrude_jfmgk [luatexja.icflag_table.FROM_JFM]=true,\fi
\ifltj@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@decompbar{#2}{\let\ltj@@ruby@mark\ltj@@ruby@sp\pxrr@res}%
\pxrr@decompbar{#3}{\let\ltj@@ruby@mark\ltj@@ruby@sr\pxrr@res}%
- {\fontsize{\ltj@@rubyip@size\dimen0}\z@\selectfont\ltj@@rubyip@fontcmd\global\dimen1=\zw}%
+ {\fontsize{\ltj@@rubyip@size\dimen0}\z@\selectfont\ltj@@rubyip@fontcmd
+ \global\dimen1=\zw\global\dimen2=\zh}%
\directlua{%
- luatexja.ruby.texiface(\ltj@@ruby@create@table{\dimen1},
+ luatexja.ruby.texiface(\ltj@@ruby@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@temp:=#2\do{\ltj@@ruby[]{\ltj@@kenten@temp}{\ltj@@rubyip@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,
}
diff --git a/macros/luatex/generic/luatexja/src/ltj-ruby.lua b/macros/luatex/generic/luatexja/src/ltj-ruby.lua
index 320b7307f0..7fa7ea927e 100644
--- a/macros/luatex/generic/luatexja/src/ltj-ruby.lua
+++ b/macros/luatex/generic/luatexja/src/ltj-ruby.lua
@@ -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 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
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)
diff --git a/macros/luatex/generic/luatexja/src/luatexja.sty b/macros/luatex/generic/luatexja/src/luatexja.sty
index eae7d5040b..aa3d1f5463 100644
--- a/macros/luatex/generic/luatexja/src/luatexja.sty
+++ b/macros/luatex/generic/luatexja/src/luatexja.sty
@@ -27,7 +27,7 @@
\newif\ifltj@disablejfam
%%%% VERSION
-\def\LuaTeXjaversion{20220530.0}
+\def\LuaTeXjaversion{20220703.0}
%% Check if LaTeX is used.
\begingroup\expandafter\expandafter\expandafter\endgroup