summaryrefslogtreecommitdiff
path: root/macros/luatex/generic
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-12-24 03:01:00 +0000
committerNorbert Preining <norbert@preining.info>2020-12-24 03:01:00 +0000
commit8d92194a9263ebe948f6518d273b641bc75b9692 (patch)
tree4177040c86fc56c0d0b590bb152cab0418f2312c /macros/luatex/generic
parent6fb328049faa528f5ee3bd6aadb19902dccc32e1 (diff)
CTAN sync 202012240301
Diffstat (limited to 'macros/luatex/generic')
-rw-r--r--macros/luatex/generic/luatexja/README8
-rw-r--r--macros/luatex/generic/luatexja/doc/ltjclasses.pdfbin400713 -> 400691 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/ltjsclasses.pdfbin452484 -> 457434 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-en.pdfbin703072 -> 699627 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ja.pdfbin1137731 -> 1136733 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ruby.pdfbin375376 -> 380466 bytes
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja-ruby.tex45
-rw-r--r--macros/luatex/generic/luatexja/doc/luatexja.dtx186
-rw-r--r--macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty14
-rw-r--r--macros/luatex/generic/luatexja/src/jfm-ujis.lua9
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-adjust.lua3
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-jfmglue.lua146
-rw-r--r--macros/luatex/generic/luatexja/src/ltj-ruby.lua89
-rw-r--r--macros/luatex/generic/luatexja/src/ltjsclasses.dtx18
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja-core.sty15
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja.lua3
-rw-r--r--macros/luatex/generic/luatexja/src/luatexja.sty4
-rw-r--r--macros/luatex/generic/luatexja/src/patches/lltjp-tascmac.sty4
18 files changed, 420 insertions, 124 deletions
diff --git a/macros/luatex/generic/luatexja/README b/macros/luatex/generic/luatexja/README
index a4c1384466..3a23ede8a4 100644
--- a/macros/luatex/generic/luatexja/README
+++ b/macros/luatex/generic/luatexja/README
@@ -1,4 +1,4 @@
-The LuaTeX-ja Package 20201030.0
+The LuaTeX-ja Package 20201224.0
--------------------------------
Copyright (c) 2011--2020 The LuaTeX-ja project
License: modified BSD (see COPYING)
@@ -45,9 +45,9 @@ Installation
2. If you must/want to install manually:
a. Download the source archive from CTAN,
- or tagged as 20201030.0 in the Git repository by
+ or tagged as 20201224.0 in the Git repository by
<http://git.osdn.jp/view?p=luatex-ja/luatexja.git
- ;a=snapshot;h=refs/tags/20201030.0;sf=tgz>
+ ;a=snapshot;h=refs/tags/20201224.0;sf=tgz>
b. Extract the archive and process following three files by LuaLaTeX
to generate classes for Japanese typesetting:
@@ -96,4 +96,4 @@ Notes
This file and ltj-kinsoku.lua are not used anymore.
(Do not remove ltj-kinsoku.tex.)
-Last commit date: Fri Oct 30 14:32:37 2020 +0900
+Last commit date: Thu Dec 24 05:08:02 2020 +0900
diff --git a/macros/luatex/generic/luatexja/doc/ltjclasses.pdf b/macros/luatex/generic/luatexja/doc/ltjclasses.pdf
index 37e43d896f..bbae89d4e1 100644
--- a/macros/luatex/generic/luatexja/doc/ltjclasses.pdf
+++ b/macros/luatex/generic/luatexja/doc/ltjclasses.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf b/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf
index db3c1284a4..f599de9221 100644
--- a/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf
+++ b/macros/luatex/generic/luatexja/doc/ltjsclasses.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexja/doc/luatexja-en.pdf b/macros/luatex/generic/luatexja/doc/luatexja-en.pdf
index 890021f98c..7c0497cdbe 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 41e9b9ba33..b06dc04aff 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 0b436587ab..5365af4335 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 d135b02acc..7d5226e47c 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
+++ b/macros/luatex/generic/luatexja/doc/luatexja-ruby.tex
@@ -52,6 +52,7 @@
\def\mybox#1{\unskip\ {\Large \fboxrule=0.1mm\fboxsep=0mm\fcolorbox{cyan}{white}{\hbox{\<\ltjjachar#1\<}}}\ }
\begin{document}
+
\catcode`\<=13
\def<#1>{{\rmfamily\mdseries\itshape$\langle$#1\/$\rangle$}}
%\fontsize{13.19873}{15}\selectfont%
@@ -207,8 +208,7 @@ plain \LuaTeX でのロードはまだサポートしておらず,
\item[kenten=<command>]各文字につく圏点の出力命令を指定する.
- 既定値は「\verb+\ltjalchar`+\texttt{\ltjalchar`•}」であり,\texttt{U+2022}~(Bullet)を
- \textbf{ALchar}として出力することを指定している.
+ 既定値は「\verb+\textbullet+」である.
\item[fontcmd=<command>]ルビ用のフォント切り替え命令を指定する.
このキーの内容が実行された後に\ \verb+\fontsize...\selectfont+\ が実行されるので,
@@ -248,18 +248,25 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{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=\ltjalchar`•, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5,
+ kenten=\textbullet, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5,
intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip
\end{verbatim}
-\paragraph{\texttt{\textbackslash ltjsetparamater} に追加されるキー}
+\paragraph{\cs{ltjsetparamater} に追加されるキー}
\begin{description}
\item[\Param{rubypreintrusion}\ttfamily =\{<chr\_code>, <pre\_int>\}]
文字<chr\_code> に,その\textbf{直後}のルビによって掛けられるルビ文字列の最大長
(つまり,\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{後文字進入許容量})をルビ全角単位で指定.
+
+ \textbf{v0.5以降での変更点}:もし$-a$~($a>0$)を指定した場合は,実際の\underline{後文字進入許容量}は$a$となるが,
+ 実際の\underline{後文字進入量}が0でなかった場合は,文字<chr\_code>の後のJFMグルーにはルビの進入は発生しない.
\end{description}
以下の文字は\Param{rubypreintrusion},~\Param{rubypostintrusion}とも初期値は1である:
\begin{quote}
@@ -272,15 +279,15 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
\begin{quote}
中点類\@for\@tmp:=`\・,`\:,`\; \do{\mybox{\@tmp}}
\end{quote}
-また,以下の文字は\Param{rubypreintrusion}のみ初期値は1である:
+また,以下の文字は\Param{rubypreintrusion}のみ初期値は$-1$である:
\begin{quote}
始め括弧類
\@for\@tmp:=`\‘,`\“,`\〈,`\《,`\「,`\『,`\【,`\〔,`\〖,`\〘,`\〝,`\(,`\[,`\{,`\⦅ \do{\mybox{\@tmp}}\unskip,
「文字コード$-1$の文字
- \footnote{段落開始の\ \texttt{\textbackslash parindent}分インデントを表す.
+ \footnote{段落開始の\ \cs{parindent}分インデントを表す.
通常の\LuaTeX-jaにおける指定では「文字コード$-1$」は文中数式境界を表していることに注意.}」
\end{quote}
-さらに,以下の文字は\Param{rubypostintrusion}のみ初期値は1である:
+さらに,以下の文字は\Param{rubypostintrusion}のみ初期値は$-1$である:
\begin{quote}
閉じ括弧類
\@for\@tmp:=`\’,`\”,`\〉,`\》,`\」,`\』,`\】,`\〕,`\〗,`\〙,`\〟,`\),`\],`\},`\⦆ \do{\mybox{\@tmp}}\unskip,
@@ -290,7 +297,8 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
以上で記述されていない\Param{rubypreintrusion},~\Param{rubypostintrusion}の初期値はすべて0である.
-\paragraph{\texttt{\textbackslash ltjkenten}}
+
+\paragraph{\cs{ltjkenten}}
圏点を出力する命令で,\verb+\kenten+ という別名を定義している.
\begin{quote}
\ttfamily\cs{ltjkenten}[<option>]\{親文字\}
@@ -367,8 +375,8 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
\section{\ruby{注|意|点}{ちゆう|い|てん}}
-\paragraph{前後からのルビ文字のはみ出し}
-「日本語組版処理の要件」の図3.82のように,
+\paragraph{前後からのルビ文字のはみ出し1}
+「日本語組版処理の要件」の図117\footnote{2020-08-11版での番号.2012-04-03版では図3.82.}のように,
前後からのルビ文字のはみ出しが繋がらないようにする処理が組み込まれている.
例えば,
@@ -379,8 +387,8 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
において,1行目右側の「\ltjruby{陵}{みささぎ}」のルビが前の「と」にかかる量は次のように決まる:
\begin{enumerate}
\item 1回目の実行では,行分割前に「\ltjruby{陵}{りよう}」の\underline{後文字進入量}は前もって知ることはでき
- ない.なので,「\ltjruby{陵}{りよう}」は行中形で組まれるものとして
-「\ltjruby{陵}{みささぎ}」前文字進入許容量は
+ ない.そのため,「\ltjruby{陵}{りよう}」は行中形で組まれるものと想定し,
+「\ltjruby{陵}{みささぎ}」の前文字進入許容量は
\[
\underbrace{0.5\,\mathrm{zw}}_{\text{元々の許容量}}
-\underbrace{0.25\,\mathrm{zw}}_{\text{前のルビの\underline{後文字進入量}(行中形)}}=0.25\,\mathrm{zw}
@@ -394,6 +402,7 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
-\underbrace{0.25\,\mathrm{zw}}_{\text{前のルビの\underline{後文字進入量}(from \texttt{.ltjruby})}}=0.25\,\mathrm{zw}.
\]
\end{enumerate}
+
<jobname>\texttt{.ltjruby}ファイルに保存する際,各 \verb+\ltjruby+ 命令の呼び出しを識別するキーが必要になるが,
そのキーとしては単純に「何個目の \verb+\ltjruby+ 命令か」である.
@@ -401,6 +410,18 @@ mode=9, stretch={1}{2}{1}, stretchruby={0}{0}{1}
「\ltjruby{陵}{みささぎ}」の\emph{\underline{前文字進入許容量}指定(\texttt{pre})が自動}になっている場合のみ
実施される.
+
+\paragraph{前後からのルビ文字のはみ出し2}
+また,本パッケージのv0.**以降では,「日本語組版処理の要件」にある
+\begin{quote}
+ 後ろにくる終わり括弧類,句点類若しくは読点類,又は前にくる始め括弧類には,
+ 最大でルビ文字サイズの全角までルビ文字を掛けてもよい.
+ この場合,後ろにくる終わり括弧類,句点類若しくは読点類の後ろの空き量,
+ 又は前にくる始め括弧類の前の空き量に掛けてはならない.
+\end{quote}
+という処理も組み込まれており,<jobname>\texttt{.ltjruby}に「前後の和文処理グルーに正の量だけ進入したか」という情報を
+保存することによって実装されている.
+
\paragraph{段落末尾のルビ}
段落がルビで終わった場合,そのルビが行末形で組まれることはない.
これは,段落の「本当の」末尾には \verb+\penalty10000\parfillskip+ があるためで,
diff --git a/macros/luatex/generic/luatexja/doc/luatexja.dtx b/macros/luatex/generic/luatexja/doc/luatexja.dtx
index 18379733c5..eaf4b8ebae 100644
--- a/macros/luatex/generic/luatexja/doc/luatexja.dtx
+++ b/macros/luatex/generic/luatexja/doc/luatexja.dtx
@@ -212,7 +212,7 @@
#1\mathstrut\cr\noalign{\vskip1pt\hrule height.4pt\vskip1pt}%
width:\hfill\ #2\cr height:\hfill\ #3\cr depth:\hfill\ #4\cr
}}}}}\,}
-
+\protected\def\+{\insertxkanjiskip late}
\makeatletter
\def\Param#1{\texorpdfstring{\@Param{#1}}{#1}} % parameter name
\protected\def\@Param#1{\eghostguarded{\hyperlink{fld:#1}{\underline{\smash{\textsf{#1}}}}}}
@@ -2268,7 +2268,7 @@ JFMは「望ましい\Param{kanjiskip}の値」や
It is not desirable that \Param{xkanjiskip} is inserted into every
boundary between \textbf{JAchar}s and \textbf{ALchar}s. For example,
\Param{xkanjiskip} should not be inserted after opening parenthesis
-(\textit{e.g.}, compare ``(あ'' and ``(\hskip\ltjgetparameter{xkanjiskip}あ'').
+(\textit{e.g.}, compare ``(あ'' and ``(\+あ'').
\LuaTeX-ja can control whether \Param{xkanjiskip} can be inserted
before/after a character, by changing \Param{jaxspmode} for \textbf{JAchar}s and
\Param{alxspmode} parameters \textbf{ALchar}s respectively.
@@ -2276,7 +2276,7 @@ before/after a character, by changing \Param{jaxspmode} for \textbf{JAchar}s and
%<*ja>
\Param{xkanjiskip}がすべての\textbf{JAchar}と\textbf{ALchar}の境界に
挿入されるのは望ましいことではない.例えば,\Param{xkanjiskip}は開き括弧の
-後には挿入されるべきではない(「(あ」と「(\hskip\ltjgetparameter{xkanjiskip}あ」を
+後には挿入されるべきではない(「(あ」と「(\+あ」を
比べてみよ).
\LuaTeX-jaでは\Param{xkanjiskip}をある文字の前/後に挿入するかどうかを,
\textbf{JAchar}に対しては\Param{jaxspmode}を,\textbf{ALchar}に対しては
@@ -3585,8 +3585,8 @@ JFMもサイズも同じなので,普通に「)\nobreak【」と入力した
\label{fig:jfmfeat}
\end{figure}
-%<en>\paragraph{Default horizontal JFMs}
-%<ja>\paragraph{標準の横組用JFM}
+%<en>\paragraph{Horizontal JFMs}
+%<ja>\paragraph{横組用JFM}
\begin{table}[t]
%<en>\caption{Differences between horizontal JFMs shipped with \LuaTeX-ja}
%<ja>\caption{\LuaTeX-ja に同梱されている横組用JFMの違い}
@@ -3598,7 +3598,7 @@ JFMもサイズも同じなので,普通に「)\nobreak【」と入力した
\hbox{\Large\vrule
\parbox[b]{7\zw}{%
\addjfontfeatures{YokoFeatures={JFM=#1}}\noindent
- \color{#2}\transparent{0.5}
+ \color{#2}\transparent{0.5}%
◆◆◆◆◆◆◆
ある日モモちゃんがお使いで迷子になって泣きました.
}\vrule}}
@@ -3675,30 +3675,32 @@ JFMもサイズも同じなので,普通に「)\nobreak【」と入力した
(\verb+min10.tfm+)に相当し,行末で文字が揃うようにするために「っ」など一部の文字幅が変わっ
ている.\verb+min10.tfm+ については\cite{min10}が詳しい.
%</ja>
-\end{description}
%<*en>
-The difference among these three~JFMs is shown in \autoref{tab-difjfm}.
+\item[\texttt{jfm-prop.lua}] A JFM for proportional typesetting.
+ This JFM doesn't have any information of character dimension (width, height, depth), nor glues/kerns information.
%</en>
%<*ja>
-これら3つのJFMの違いは\autoref{tab-difjfm}に示した.表中の文例の一部には,
-\cite{min10}の図3,~4のものを用いた.
+\item[\texttt{jfm-prop.lua}] プロポーショナル組用のJFM.
+ 文字幅・高さ・深さの情報も自動挿入されるグルー・カーンの情報は持たない(つまりグリフの文字幅をそのまま採用する).
%</ja>
-
+%<*en>
+\item[\texttt{jfm-propw.lua}] Another JFM for proportional typesetting.
+ In contrast to \texttt{jfm-prop.lua}, this JFM has informations of character height and depth.
+%</en>
%<*ja>
-また,プロポーショナル組用に\texttt{jfm-prop.lua}と\texttt{jfm-propw.lua}も用意されている.
-どちらのJFMも文字幅の情報と自動挿入されるグルー・カーンの情報は持たない(つまりグリフの文字幅をそのまま採用する).
-\texttt{jfm-prop.lua}と\texttt{jfm-propw.lua}の差は,前者が
-文字の高さ・深さ情報も持たないのに対し,後者は持っている点である
-\footnote{プロポーショナル組の状況でルビをつけたい,などという状況では\texttt{jfm-propw.lua}が有用かもしれない.}.
+\item[\texttt{jfm-propw.lua}] プロポーショナル組用のさらなるJFM.
+ \texttt{jfm-prop.lua}と異なり,高さ・深さの情報は持っている.
%</ja>
+\end{description}
%<*en>
-Furthermore, \LuaTeX-ja also ship two JFMs, namely \texttt{jfm-prop.lua}~and~\texttt{jfm-propw.lua},
- for ``proportional typesetting''.
-Both JFMs don't have any character width information, nor glues/kerns information.
-\texttt{jfm-prop.lua} also also not have character height and depth information, while \texttt{jfm-propw.lua} has them.
+See \autoref{tab-difjfm} for the difference among \texttt{jfm-ujis.lua}, \texttt{jfm-jis.lua},
+\texttt{jfm-min.lua}.
%</en>
-
-
+%<*ja>
+\texttt{jfm-ujis.lua}, \texttt{jfm-jis.lua},
+\texttt{jfm-min.lua}の違いは\autoref{tab-difjfm}に示した.表中の文例の一部には,
+\cite{min10}の図3,~4のものを用いた.
+%</ja>
\begin{figure}
\begin{LTXexample}[pos=t]
@@ -4073,7 +4075,7 @@ makes that IPA~Mincho and IPA~Gothic will be used as default Japanese fonts, ins
Harano Aji fonts.
%IPAex~Mincho and IPAex~Gothic.
-This feature is intended for classes which use special JFMs
+This feature is intended for classes which use special JFMs%
\footnote{This is because commands has \texttt{@} in their names.}.
It is recommended to use \cs{luatexja-preset}~or~\cs{luatexja-fontspec} package
to select standard fonts in ordinary \LaTeX\ sources.
@@ -4810,13 +4812,13 @@ Hence we have the following result:
「実際のグリフの幅に合わせて文字幅を整数倍する」際のしきい値を指定する.
より正確に述べると,次のようになる.このフィールドに正の数$r$が指定されていたとし,
-文字クラス0で指定されている文字幅が$w$,文字クラス0に属する文字のグリフの幅が$w'$であったとする.
-$n=\nint(w/w')$とした
+JFM中で「文字クラス0の文字幅」と指定されている値が$w$,文字クラス0に属する文字のあるグリフの実際の幅が$w'$であったとする.
+$n=\nint(w'/w)$とした
\footnote{ここで,$\nint(a)=\lfloor a+0.5\rfloor$は$a$に「もっとも近い整数」を表す.}
-とき,もし$w'>w$かつ$|w/w'-n|\char`<r$であれば,JFMで文字幅$nw$が指定されたものとして扱う.
+とき,もし$w'>w$かつ$\lvert w'/w-n\rvert \char`<r$であれば,JFMで文字幅$nw$が指定されたものとして扱う.
この機能は,ほとんど源ノ明朝・源ノ角ゴシックにおける2倍角・3倍角ダッシュの合字のために実装されたと
-言ってもよい.これらのグリフは\LuaTeX 内部ではUnicodeの私用領域に割り当てられるので,
+言ってもよい(この場合$w'=2$,~$3$である).これらのグリフは\LuaTeX 内部ではUnicodeの私用領域に割り当てられるので,
JFM側で番号を指定することができない.
%</ja>
%<*en>
@@ -6077,14 +6079,14 @@ To change characters of Chinese numerals for each digit, set \Param{kansujichar}
%</en>
-\subsection{\cs{inhibitglue}}
+\subsection{\cs{inhibitglue}, \cs{disinhibitglue}}
%<*en>
-\cs{inhibitglue} suppresses the insertion of \textbf{JAglue}.
+\cs{inhibitglue} suppresses the insertion of a glue/kern soecified in JFM at the place.
The following is an example, using a special JFM that there will be a glue between
the beginning of a box and ``あ'', and also between ``あ''~and~``ウ''.
%</en>
%<*ja>
-\cs{inhibitglue} は\textbf{JAglue}の挿入を抑制する.
+\cs{inhibitglue} は発行箇所でのJFM由来グルー/カーンの挿入を抑制する.
以下は,ボックスの始めと「あ」の間,「あ」「ウ」の間にグルーが入る特別なJFMを用いた例で
ある.
%</ja>
@@ -6095,6 +6097,7 @@ the beginning of a box and ``あ'', and also between ``あ''~and~``ウ''.
\inhibitglue\par\noindent あ1
\par\inhibitglue\noindent あ2
\par\noindent\inhibitglue あ3
+\par )4)\inhibitglue 5
\par\hrule\noindent あoff\inhibitglue ice
\end{LTXexample}
@@ -6118,11 +6121,20 @@ With the help of this example, we remark the specification of \cs{inhibitglue}:
%</ja>
%<*en>
+\item \cs{inhibitglue} does \emph{not} suppress \Param{kanjiskip} or \cs{xkanjiskip}.
+%</en>
+%<*ja>
+\item \cs{inhibitglue}は\Param{kanjiskip}, \Param{xkanjiskip}の挿入は抑制しない.
+ 例えば上の例の6行目では,「)」と「5」の間には本来はJFM由来の半角空きが挿入されるはずだが,
+ それが\cs{inhibitglue}で無効になったため,\Param{xkanjiskip}が代わりに挿入されている.
+%</ja>
+
+%<*en>
\item The call of \cs{inhibitglue} in the (restricted) horizontal
mode is only effective on the spot; does not get over boundary of
paragraphs. Moreover, \cs{inhibitglue} cancels ligatures and
kernings, as shown in the last line of above example.
-%</en>
+%</en>i
%<*ja>
\item \cs{inhibitglue} の(制限された)水平モード中での呼び出しはその場でのみ
有効であり,段落の境界を乗り越えない.
@@ -6146,6 +6158,24 @@ With the help of this example, we remark the specification of \cs{inhibitglue}:
%</ja>
\end{itemize}
+%<*en>
+\cs{disinhibitglue} suppresses the effect of \cs{inhbitglue}.
+In other words, \cs{disinhibitglue} allows the insertion of a glue/kern specified by JFM.
+If \cs{inhibitglue}~and~\cs{disinhibitglue} both specified at the same time,
+the latest one is effective.
+This commans is added in the version 20201224.0.
+
+Note that \cs{disinhibitglue} also cancels ligatures and kernings.
+%</en>
+%<*ja>
+\cs{disinhibitglue}は\cs{inhibitglue}の効果を無効化する.
+言い換えれば,(\cs{inhibitglue}で抑制されたはずの))JFM由来グルー/カーンの挿入を許可する.
+同じ箇所に\cs{inhibitglue}と\cs{disinhibitglue}が両方ある場合は,後ろの指定が有効になる.
+この命令はバージョン20201224.0で追加された.
+
+なお,\cs{disinhibitglue}もリガチャやカーニングを打ち消すことに注意されたい.これは
+(\cs{inhibitglue}と同様に)whatsitノードを使って実装されていることによる.
+%</ja>
\subsection{\cs{ltjfakeboxbdd}, \cs{ltjfakeparbegin}}
%<*en>
@@ -6206,6 +6236,77 @@ As an example, the example above can be improved as follows:
\end{LTXexample}
+\subsection{\cs{insertxkanjiskip}, \cs{insertkanjiskip}}
+%<*en>
+There are some situations which one wants to insert \Param{xkanjiskip} manually.
+A simple approach is to use \cs{hskip}\cs{ltjgetparameter\{xkanjiskip\}}, but this approach has
+several weak points. To cope with these weak points, \LuaTeX-ja defines a command \cs{insertxkanjiskip} which
+inserts \Param{xkanjiskip} glue manually, from the version 20201224.0.
+\begin{itemize}
+ \item ``\cs{insertxkanjiskip}'' (without any keyword) uses the value of \Param{xkanjiskip} at the place.
+ \item ``\cs{insertxkanjiskip late}'' (with ``\texttt{late}''~keyword) uses the value of \Param{xkanjiskip}
+ at the end of a paragraph/hbox.
+\end{itemize}
+See the example below.
+%</en>
+%<*ja>
+\TeX で日本語の文章を作成していると,
+しばしば「手動で和欧文間空白\Param{xkanjiskip}を挿入したい」という状況に遭遇する.
+このような場合,\cs{hskip}\cs{ltjgetparameter\{xkanjiskip\}}\+とするのがよくある対応であったが,これらには
+次のような難点がある:
+\begin{itemize}
+ \item \cs{xkanjiskip}は「段落やhboxでの終端での値がその段落/hbox全体で用いられる」となっているため,
+ \cs{hskip}\cs{ltjgetparameter\{xkanjiskip\}}\+以降に\Param{xkanjiskip}の値が変わる場合に対応できない.
+ \item \LuaTeX-jaでは,\cs{xkanjiskip}の自然長が$\cs{maxdimen}=(2^{30}-1)\,\mbox{sp}$であった場合,
+ JFMで指定された値を実際に利用することになっているが,それに対応できていない.
+ \item \Pkg{luatexja-adjust}(\ref{ssec:adj}節)による優先度行長調整では,
+ \cs{hskip}\cs{ltjgetparameter\{xkanjiskip\}}\+は手動で挿入したグルーであるから,
+ 自動で挿入された\Param{xkanjiskip}とは
+ 伸縮の優先順序が異なってしまう.
+\end{itemize}
+
+これらの難点に対処した,\Param{xkanjiskip}をグルーとして手動挿入する命令が\cs{insertxkanjiskip}である.
+これはバージョン20201224.0で追加された.
+以下の実行例に示すように,
+\begin{itemize}
+ \item 単独で\cs{insertxkanjiskip}とした場合は,その時点での\Param{xkanjiskip}の値を使用する
+ \item 「\cs{insertxkanjiskip~late}」と\texttt{late}キーワードを後置した場合は,
+ 段落/hbox終了時にそのときの\Param{xkanjiskip}の値に自動設定される
+ (段落/hbox途中での値は未定義)
+ \item どちらであっても,実行箇所に本来なら自動挿入されるはずのJFM由来グルー/カーンは挿入されない
+\end{itemize}
+となっている.
+%</ja>
+\begin{LTXexample}[width=0.3333\textwidth]
+\ltjsetparameter{xkanjiskip=0.25\zw}
+あ(% 0.5\zw (from JFM)
+あ\insertxkanjiskip (% 0.25\zw (xkanjiskip at here)
+あ\insertxkanjiskip late (% 0.25\zw (xkanjiskip at EOP)
+あa% 1.25\zw (xkanjiskip at EOP)
+\\%
+\ltjsetparameter{xkanjiskip=1.25\zw}
+あ\insertxkanjiskip (% 1.25\zw (xkanjiskip at here)
+あa% 1.25\zw (xkanjiskip at EOP)
+%% At the end of the paragraph (EOP), xkanjiskip is 1.25\zw.
+\end{LTXexample}
+
+%<*en>
+There is a similar command \cs{insertkanjiskip} (\Param{kanjiskip} instead~of \Param{xkanjiskip}) is also defined.
+Note that any shorthand form of \cs{insert}[\texttt{x}]\texttt{kanjiskip} are not defined by \LuaTeX-ja.
+%</en>
+%<*ja>
+\cs{insertxkanjiskip}(または\texttt{late}つき)の短縮形
+\footnote{ちょうど\cs{inhibitglue}の短縮形\cs{\ltjalchar`\<}\+に対応するもの.}は
+\LuaTeX-jaでは定義していない.短縮形を使いたい人は,面倒でも各自で
+\begin{lstlisting}
+ \protected\def\+{\insertxkanjiskip late}
+\end{lstlisting}
+などと定義してほしい.
+
+最後になるが,以上の説明の\Param{xkanjiskip}をすべて標準の和文間空白\Param{kanjiskip}に置き換えた
+\cs{insertkanjiskip}命令も準備されている.
+%</ja>
+
\subsection{\cs{ltjdeclarealtfont}}
\label{ssec:altfont}
%<*en>
@@ -9022,6 +9123,9 @@ Glues from an italic correction, but already processed in the insertion process
\item[\textit{boxbdd} (75)]
%<en>Glues/kerns that inserted just the beginning or the ending of an hbox or a paragraph.
%<ja>hboxか段落の最初か最後に挿入されたグルー/カーン.
+\item[\textit{special\_jaglue} (76)]
+%<en>Glues from \cs{insert}[\texttt{x}]\texttt{kanjiskip}.
+%<ja>\cs{insert}[\texttt{x}]\texttt{kanjiskip}由来のグルー.
\end{description}
%<*ja>
@@ -10199,9 +10303,9 @@ $q$と$r$の間は(実フォントが同じなのに)\texttt{jfmvar} キー
結果として,2つの\textbf{JAchar}間には常に何らかのグルー/カーンが挿入されることとなる.
\begin{enumerate}
\item 両クラスタ(厳密には$\mathit{Nq}.\mathit{tail}$,$\mathit{Np}.\mathit{head}$)の中身の文字コードに対する
-\Param{autospacing}パラメタが両方ともfalseだった場合は,長さ0のglueとする.
-\item ユーザ側から見た\Param{kanjiskip}パラメタの自然長が$\cs{maxdimen}=(2^{30}-1)\,{\rm sp}$で
-なければ,\Param{kanjiskip}パラメタの値を持つglueを採用する.
+\Param{autospacing}パラメータが両方ともfalseだった場合は,長さ0のglueとする.
+\item ユーザ側から見た\Param{kanjiskip}パラメータの自然長が$\cs{maxdimen}=(2^{30}-1)\,\mbox{sp}$で
+なければ,\Param{kanjiskip}パラメータの値を持つglueを採用する.
\item 2.でない場合は,\textit{Nq}, \textit{Np}で使われているJFMに指定されている\Param{kanjiskip}の値を用いる.
どちらか片方のクラスタだけが\textbf{JAchar}(\textsf{和文A}・\textsf{和文B})のときは,そちらのクラスタで使われている
JFM由来の値だけを用いる.もし両者で使われているJFMが異なった場合は,上の[M]~3.と同様の方法を用いて調整する.
@@ -10338,7 +10442,7 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K]
\item $\mathit{Np}.\mathit{id}$が\textit{id\_math}のとき(つまりクラスタ\textit{Np}が文中数式を表す)
ときは,$x=-1$.
\item \textit{Np}の中身の中身の文字コードについて,「直前への\Param{xkanjiskip}の挿入」が禁止されている
-(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメタが偶数)ときは,
+(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメータが偶数)ときは,
$x=\text{\texttt{'nox\_alchar'}}$.
\item 以上のいずれでもないときは,$x=\text{\texttt{'alchar'}}$.
\end{itemize}
@@ -10350,14 +10454,14 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K]
\begin{enumerate}
\item 以下のいずれかの場合は,\Param{xkanjiskip}の挿入は抑止される.しかし,実際には行分割を許容するために,長さ0のglueを採用する:
\begin{itemize}
-\item 両クラスタにおいて,それらの中身の文字コードに対する\Param{autoxspacing}パラメタが共にfalseである.
+\item 両クラスタにおいて,それらの中身の文字コードに対する\Param{autoxspacing}パラメータが共にfalseである.
\item \textit{Nq}の中身の文字コードについて,「直後への\Param{xkanjiskip}の挿入」が禁止されている
-(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメタが2以上).
+(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメータが2以上).
\item \textit{Np}の中身の文字コードについて,「直前への\Param{xkanjiskip}の挿入」が禁止されている
-(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメタが偶数).
+(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメータが偶数).
\end{itemize}
-\item ユーザ側から見た\Param{xkanjiskip}パラメタの自然長が$\cs{maxdimen}=(2^{30}-1)\,{\rm sp}$で
-なければ,\Param{xkanjiskip}パラメタの値を持つglueを採用する.
+\item ユーザ側から見た\Param{xkanjiskip}パラメータの自然長が$\cs{maxdimen}=(2^{30}-1)\,{\rm sp}$で
+なければ,\Param{xkanjiskip}パラメータの値を持つglueを採用する.
\item 2.でない場合は,\textit{Nq}, \textit{Np}(\textsf{和文A}/\textsf{和文B}なのは片方だけ)
で使われているJFMに指定されている\Param{xkanjiskip}の値を用いる.
\end{enumerate}
@@ -10385,7 +10489,7 @@ $x$は\textit{Nq}から\textsf{欧文境界B~[\NB]}におけるそれと同じ
\texttt{'nox\_alchar'}か\texttt{'alchar'}は
\begin{quote}
\textit{Nq}の中身の文字コードについて,「直後への\Param{xkanjiskip}の挿入」が禁止されている
-(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメタが2以上).
+(つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメータが2以上).
\end{quote}
か否かで判断する.
\end{enumerate}
diff --git a/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty b/macros/luatex/generic/luatexja/src/addons/luatexja-ruby.sty
index 149dd03de7..90dfece2b9 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}[2020-10-30 v0.4]
+\ProvidesPackage{luatexja-ruby}[2020-12-24 v0.5]
\RequirePackage{luatexja}
%%------------------
@@ -18,9 +18,9 @@
%% 引数:ルビ全角を単位とした実数
%% この文字への pre-, post-intrusion の許容量
\define@key[ltj]{japaram}{rubypreintrusion}{%
- \ltj@@set@stack@real{RIPRE}{0}{0x7FFFFFFF}#1 }
+ \ltj@@set@stack@real{RIPRE}{-0x7FFFFFFF}{0x7FFFFFFF}#1 }
\define@key[ltj]{japaram}{rubypostintrusion}{%
- \ltj@@set@stack@real{RIPOST}{0}{0x7FFFFFFF}#1 }
+ \ltj@@set@stack@real{RIPOST}{-0x7FFFFFFF}{0x7FFFFFFF}#1 }
\def\ltj@@set@stack@real#1#2#3{%
\directlua{luatexja.stack.set_stack_perchar(luatexja.stack_table_index.#1,
#2, #3, token.scan_word)}}
@@ -226,15 +226,15 @@
\advance\count@1\repeat
%% 開き括弧・閉じ括弧
\@for\@tmp:=`\‘,`\“,`\〈,`\《,`\「,`\『,`\【,`\〔,`\〖,`\〘,`\〝,`\(,`\[,`\{,`\⦅ \do
- {\ltjsetparameter{rubypreintrusion={\@tmp,1}}}
+ {\ltjsetparameter{rubypreintrusion={\@tmp,-1}}}
\@for\@tmp:=`\’,`\”,`\〉,`\》,`\」,`\』,`\】,`\〕,`\〗,`\〙,`\〟,`\),`\],`\},`\⦆ \do
- {\ltjsetparameter{rubypostintrusion={\@tmp,1}}}
+ {\ltjsetparameter{rubypostintrusion={\@tmp,-1}}}
%% 中点類
\@for\@tmp:=`\・,`\:,`\;,`\―,`\‥,`\…,`〳,`\〴,`\〵,"2014 \do
{\ltjsetparameter{rubypreintrusion={\@tmp,0.5},rubypostintrusion={\@tmp,0.5}}}
%% 読点・句点
\@for\@tmp:=`\、,`\,,`\。,`\. \do
- {\ltjsetparameter{rubypostintrusion={\@tmp,1}}}
+ {\ltjsetparameter{rubypostintrusion={\@tmp,-1}}}
%% 段落インデント部分
\ltjsetparameter{rubypreintrusion={-1,1}}
@@ -243,7 +243,7 @@
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=\ltjalchar`•, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5,
+ kenten=\textbullet, fontcmd=\relax, ybaseheight=0.88, tbaseheight=0.5,
intrude_jfmgk, intrude_kanjiskip, intrude_xkanjiskip
}
diff --git a/macros/luatex/generic/luatexja/src/jfm-ujis.lua b/macros/luatex/generic/luatexja/src/jfm-ujis.lua
index 07c51b554f..08f567d20a 100644
--- a/macros/luatex/generic/luatexja/src/jfm-ujis.lua
+++ b/macros/luatex/generic/luatexja/src/jfm-ujis.lua
@@ -356,6 +356,15 @@ for i,v in pairs(t) do
if v.kern and v.kern[0] then v.kern[100] = v.kern[0] end
end
end
+t[200]=table.fastcopy(t[0])
+t[200].chars={ 0x3031,0x3032 }
+t[200].height=1.38; t[200].depth=0.62
+for i,v in pairs(t) do
+ if type(i)=='number' and type(v)=='table' then
+ if v.glue and v.glue[0] then v.glue[200] = v.glue[0] end
+ if v.kern and v.kern[0] then v.kern[200] = v.kern[0] end
+ end
+end
local jf = luatexja.jfont.jfm_feature
if jf and jf.beginpar_middledot_zw==true then
diff --git a/macros/luatex/generic/luatexja/src/ltj-adjust.lua b/macros/luatex/generic/luatexja/src/ltj-adjust.lua
index c7d145d2f6..56effa3c57 100644
--- a/macros/luatex/generic/luatexja/src/ltj-adjust.lua
+++ b/macros/luatex/generic/luatexja/src/ltj-adjust.lua
@@ -287,7 +287,10 @@ local aw_step2, aw_step2_dummy
do
local node_hpack = node.direct.hpack
local function repack(p)
+ local orig_of, orig_hfuzz, orig_hbad = tex.overfullrule, tex.hfuzz, tex.hbadness
+ tex.overfullrule=0; tex.hfuzz=1073741823; tex.hbadness=10000
local f = node_hpack(getlist(p), getfield(p, 'width'), 'exactly')
+ tex.overfullrule=orig_of; tex.hfuzz=orig_hfuzz; tex.hbadness=orig_hbad
setfield(f, 'head', nil)
setfield(p, 'glue_set', getfield(f, 'glue_set'))
setfield(p, 'glue_order', getfield(f, 'glue_order'))
diff --git a/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua b/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua
index 7775e4720d..019e24ae2e 100644
--- a/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua
+++ b/macros/luatex/generic/luatexja/src/ltj-jfmglue.lua
@@ -3,7 +3,7 @@
--
luatexbase.provides_module({
name = 'luatexja.jfmglue',
- date = '2020-10-22',
+ date = '2020-12-22',
description = 'Insertion process of JFM glues, [x]kanjiskip and others',
})
luatexja.jfmglue = luatexja.jfmglue or {}
@@ -78,6 +78,7 @@ local FROM_JFM = luatexja.icflag_table.FROM_JFM
local PROCESSED = luatexja.icflag_table.PROCESSED
local IC_PROCESSED = luatexja.icflag_table.IC_PROCESSED
local BOXBDD = luatexja.icflag_table.BOXBDD
+local SPECIAL_JAGLUE = luatexja.icflag_table.SPECIAL_JAGLUE
local PROCESSED_BEGIN_FLAG = luatexja.icflag_table.PROCESSED_BEGIN_FLAG
local attr_icflag = luatexbase.attributes['ltj@icflag']
@@ -459,7 +460,7 @@ calc_np_auxtable = {
if lps==sid_user then
if getfield(lp, 'user_id')==luatexja.userid_table.IHB then
local lq = node_next(lp);
- head = node_remove(head, lp); node_free(lp); non_ihb_flag = false
+ head = node_remove(head, lp); node_free(lp); non_ihb_flag = getfield(lp, 'value')~=1
return false, lq;
elseif getfield(lp, 'user_id')==luatexja.userid_table.JA_AL_BDD then
local lq = node_next(lp);
@@ -499,7 +500,11 @@ calc_np_auxtable = {
end,
[id_glue] = function(lp)
Np.first, Np.nuc, Np.last = (Np.first or lp), lp, lp;
- Np.id = getid(lp); set_attr(lp, attr_icflag, PROCESSED)
+ Np.id = getid(lp);
+ local f = luatexbase.call_callback("luatexja.jfmglue.special_jaglue", lp)
+ if f then
+ set_attr(lp, attr_icflag, PROCESSED)
+ end
return true, node_next(lp)
end,
[id_disc] = function(lp)
@@ -562,7 +567,7 @@ function calc_np(last, lp)
while lp ~= last do
local lpa = has_attr(lp, attr_icflag) or 0
-- unbox 由来ノードの検出
- if lpa>=PACKED then
+ if (lpa>=PACKED) and (lpa%PROCESSED_BEGIN_FLAG<=BOXBDD) then
if lpa%PROCESSED_BEGIN_FLAG == BOXBDD then
local lq = node_next(lp)
head = node_remove(head, lp); node_free(lp); lp = lq
@@ -1095,13 +1100,15 @@ local adjust_nq
do
local adjust_nq_aux = {
[id_glyph] = function() after_alchar(Nq) end, -- after_alchar(Nq)
- [id_hlist] = function() after_hlist(Nq) end,
+ [id_hlist] = function() after_hlist(Nq) end,
[id_pbox] = function() after_hlist(Nq) end,
[id_disc] = function() after_hlist(Nq) end,
- [id_pbox_w] = function()
- luatexbase.call_callback("luatexja.jfmglue.whatsit_after",
- false, Nq, Np)
- end,
+ [id_glue] = function()
+ luatexbase.call_callback("luatexja.jfmglue.special_jaglue_after", Nq.nuc)
+ end,
+ [id_pbox_w]= function()
+ luatexbase.call_callback("luatexja.jfmglue.whatsit_after", false, Nq, Np)
+ end,
}
adjust_nq = function()
@@ -1265,14 +1272,20 @@ do
local node_prev = node.direct.getprev
local node_write = node.direct.write
- -- \inhibitglue
- function luatexja.jfmglue.create_inhibitglue_node()
+ -- \inhibitglue, \disinhibitglue
+ local function ihb_node(v)
local tn = node_new(id_whatsit, sid_user)
setfield(tn, 'user_id', IHB)
setfield(tn, 'type', 100)
- setfield(tn, 'value', 1)
+ setfield(tn, 'value', v)
node_write(tn)
end
+ function luatexja.jfmglue.create_inhibitglue_node()
+ ihb_node(1)
+ end
+ function luatexja.jfmglue.create_disinhibitglue_node()
+ ihb_node(0)
+ end
-- Node for indicating beginning of a paragraph
-- (for ltjsclasses)
@@ -1346,8 +1359,117 @@ do
"luatexja.beginpar.np_info", 1)
luatexbase.add_to_callback("luatexja.jfmglue.whatsit_after", whatsit_after_callback,
"luatexja.beginpar.np_info_after", 1)
+end
+do
+ local node_prev = node.direct.getprev
+ local node_write = node.direct.write
+ local XKANJI_SKIP = luatexja.icflag_table.XKANJI_SKIP
+ local XKANJI_SKIP_JFM = luatexja.icflag_table.XKANJI_SKIP_JFM
+ local KANJI_SKIP = luatexja.icflag_table.KANJI_SKIP
+ local KANJI_SKIP_JFM = luatexja.icflag_table.KANJI_SKIP_JFM
+ local XSK = luatexja.stack_table_index.XSK
+ local KSK = luatexja.stack_table_index.KSK
+ local attr_yablshift = luatexbase.attributes['ltj@yablshift']
+ local attr_tablshift = luatexbase.attributes['ltj@tablshift']
+ local getcount, abs, scan_keyword = tex.getcount, math.abs, token.scan_keyword
+ local get_current_jfont
+ do
+ local attr_curjfnt = luatexbase.attributes['ltj@curjfnt']
+ local attr_curtfnt = luatexbase.attributes['ltj@curtfnt']
+ local dir_tate = luatexja.dir_table.dir_tate
+ local get_dir_count = ltjd.get_dir_count
+ function get_current_jfont()
+ return tex.getattribute((get_dir_count()==dir_tate) and attr_curtfnt or attr_curjfnt)
+ end
+ end
+ -- \insertxkanjiskip
+ -- SPECIAL_JAGLUE のノード:
+ -- * (X)KANJI_SKIP(_JFM): その場で値が決まっている
+ -- * PROCESSED_BEGIN_FLAG + (X)KANJI_SKIP: 段落終了時に決める
+ local function insert_k_skip_common(ind, name, ica, icb)
+ if abs(tex.nest[tex.nest.ptr].mode) ~= ltjs.hmode then return end
+ local g = node_new(id_glue); set_attr(g, attr_icflag, SPECIAL_JAGLUE)
+ local is_late = scan_keyword("late")
+ if not is_late then
+ local st = ltjs.get_stack_skip(ind, getcount('ltj@@stack'))
+ if st.width==1073741823 then
+ local bk = ltjf_font_metric_table[get_current_jfont()][name]
+ if bk then
+ setglue(g, bk[1] or 0, bk[2] or 0, bk[3] or 0, 0, 0)
+ end
+ set_attr(g, attr_yablshift, icb); node_write(g); return
+ end
+ setglue(g, st.width, st.stretch, st.shrink, st.stretch_order, st.shrink_order)
+ set_attr(g, attr_yablshift, ica)
+ else
+ set_attr(g, attr_yablshift, PROCESSED_BEGIN_FLAG + ica)
+ set_attr(g, attr_tablshift, get_current_jfont())
+ end
+ node_write(g)
+ end
+ function luatexja.jfmglue.insert_xk_skip()
+ insert_k_skip_common(XSK, "xkanjiskip", XKANJI_SKIP, XKANJI_SKIP_JFM)
+ end
+ function luatexja.jfmglue.insert_k_skip()
+ insert_k_skip_common(KSK, "kanjiskip", KANJI_SKIP, KANJI_SKIP_JFM)
+ end
+ -- callback
+ local getglue = luatexja.getglue
+ local function special_jaglue(lx)
+ local lxi = get_attr_icflag(lx)
+ if lxi==SPECIAL_JAGLUE then
+ non_ihb_flag = false; return false
+ else
+ return lx
+ end
+ end
+ local function special_jaglue_after(lx)
+ if get_attr_icflag(lx)==SPECIAL_JAGLUE then
+ lxi=has_attr(lx, attr_yablshift)
+ if lxi>=PROCESSED_BEGIN_FLAG then
+ lxi = lxi%PROCESSED_BEGIN_FLAG
+ if lxi == KANJI_SKIP then
+ local w, st, sh, sto, sho = getglue(kanji_skip)
+ if w~=1073741823 then
+ setglue(lx, w, st, sh, sto, sho); set_attr(lx, attr_icflag, KANJI_SKIP)
+ else
+ local m = ltjf_font_metric_table[has_attr(lx, attr_tablshift)]
+ local bk = m.kanjiskip or null_skip_table
+ setglue(lx, bk[1], bk[2], bk[3], 0, 0)
+ set_attr(lx, attr_icflag, KANJI_SKIP_JFM)
+ end
+ elseif lxi == XKANJI_SKIP then
+ local w, st, sh, sto, sho = getglue(xkanji_skip)
+ if w~=1073741823 then
+ setglue(lx, w, st, sh, sto, sho); set_attr(lx, attr_icflag, XKANJI_SKIP)
+ else
+ local m = ltjf_font_metric_table[has_attr(lx, attr_tablshift)]
+ local bk = m.xkanjiskip or null_skip_table
+ setglue(lx, bk[1], bk[2], bk[3], 0, 0)
+ set_attr(lx, attr_icflag, XKANJI_SKIP_JFM)
+ end
+ end
+ else
+ set_attr(lx, attr_icflag, lxi)
+ end
+ Np.first = lx
+ if node_prev(lx) then
+ local lxp = node_prev(lx)
+ if lxp and getid(lxp)==id_penalty and get_attr_icflag(lxp)==KINSOKU then
+ Bp[#Bp+1]=lxp
+ end
+ end
+ non_ihb_flag = false; return false
+ end
+ return true
+ end
+ luatexbase.create_callback("luatexja.jfmglue.special_jaglue", "list",
+ special_jaglue)
+ luatexbase.create_callback("luatexja.jfmglue.special_jaglue_after", "list",
+ special_jaglue_after)
end
+
luatexja.jfmglue.after_hlist = after_hlist
luatexja.jfmglue.check_box_high = check_box_high
diff --git a/macros/luatex/generic/luatexja/src/ltj-ruby.lua b/macros/luatex/generic/luatexja/src/ltj-ruby.lua
index 685e19bb0b..34cdc8c7fc 100644
--- a/macros/luatex/generic/luatexja/src/ltj-ruby.lua
+++ b/macros/luatex/generic/luatexja/src/ltj-ruby.lua
@@ -52,6 +52,9 @@ local attr_ruby = luatexbase.attributes['ltj@rubyattr']
-- * (whatsit).value node ではルビ全角の値(sp単位)
-- * 行分割で whatsit の前後に並ぶノードでは,「何番目のルビ関連ノード」か
-- * (whatsit).value に続く整形済み vbox たちでは post_intrusion の値
+local attr_ruby_post_jfmgk = luatexbase.attributes['ltj@kcat3']
+-- JAglue 処理時に,2つ前のクラスタもルビであれば,そのルビが直後の和文処理グルーへ
+-- 正の進入をしたか否か(した:1,しなかった:0)
local cat_lp = luatexbase.catcodetables['latex-package']
local round, floor = tex.round, math.floor
@@ -341,16 +344,24 @@ local function enlarge_parent(r, p, tmp_tbl, no_begin, no_end)
setfield(p, 'width', rwidth)
local ps = getlist(p)
setfield(ps, 'width', getfield(ps, 'width') - pre_intrusion)
- local orig_post_intrusion = post_intrusion
- if no_end then orig_post_intrusion = max(orig_post_intrusion - tmp_tbl.after_jfmgk, 0) end
- return r, p, orig_post_intrusion
+ local orig_post_intrusion, post_jfmgk = post_intrusion, false
+ if no_end then
+ if orig_post_intrusion > tmp_tbl.after_jfmgk then
+ orig_post_intrusion = orig_post_intrusion - tmp_tbl.after_jfmgk
+ post_jfmgk = (tmp_tbl.after_jfmgk > 0)
+ else
+ orig_post_intrusion = 0
+ post_jfmgk = (post_intrusion > 0)
+ end
+ end
+ return r, p, orig_post_intrusion, post_jfmgk
end
-- ルビボックスの生成(単一グループ)
-- returned value: <new box>, <ruby width>, <post_intrusion>
local max_margin
local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
- local post_intrusion = 0
+ local post_intrusion, post_jfmgk = 0, false
local imode
local ppre, pmid, ppost = tmp_tbl.ppre, tmp_tbl.pmid, tmp_tbl.ppost
local mapre, mapost = tmp_tbl.mapre, tmp_tbl.mapost
@@ -360,7 +371,7 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
imode = (imode-rpost)/8; rmid = imode%8;
imode = (imode-rmid)/8; rpre = imode%8
if getfield(r, 'width') > getfield(p, 'width') then -- change the width of p
- r, p, post_intrusion = enlarge_parent(r, p, tmp_tbl, no_begin, no_end)
+ r, p, post_intrusion, post_jfmgk = enlarge_parent(r, p, tmp_tbl, no_begin, no_end)
elseif getfield(r, 'width') < getfield(p, 'width') then -- change the width of r
r = enlarge(r, getfield(p, 'width'), rpre, rmid, rpost, 0, 0)
post_intrusion = 0
@@ -390,6 +401,7 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_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)
+ set_attr(a, attr_ruby_post_jfmgk, post_jfmgk and 1 or 0)
if rsmash or getfield(a, 'height')<getfield(p, 'height') then
local k = node_new(id_kern, 1)
setfield(k, 'kern', -getfield(a, 'height')+getfield(p, 'height'))
@@ -397,12 +409,12 @@ local function new_ruby_box(r, p, tmp_tbl, no_begin, no_end)
setfield(a, 'height', getfield(p, 'height'))
end
- return a, getfield(r, 'width'), post_intrusion
+ return a, getfield(r, 'width'), post_intrusion, post_jfmgk
end
-- High-level routine in pre_linebreak_filter
-local post_intrusion_backup
+local post_intrusion_backup, post_jfmgk_backup
local max_allow_pre, max_allow_post
@@ -425,7 +437,7 @@ local function pre_low_cal_box(w, cmp)
local nt, nta, ntb = wv, nil, nil -- nt*: node temp
rst.ppre, rst.pmid, rst.ppost = rtb[6], rtb[5], rtb[4]
rst.mapre, rst.mapost = max_allow_pre, 0
- for i = 1, cmp do
+ for i = 1, cmp do
nt = node_next(nt); rb[i] = nt; nta = concat(nta, node_copy(nt))
nt = node_next(nt); pb[i] = nt; ntb = concat(ntb, node_copy(nt))
coef[i] = {}
@@ -455,7 +467,7 @@ local function pre_low_cal_box(w, cmp)
for j = 1, 2*cmp+1 do coef[2*cmp+1][j] = 1 end
rst.ppre, rst.pmid, rst.ppost = rtb[3], rtb[2], rtb[1]
rst.mapre, rst.mapost = max_allow_pre, max_allow_post
- kf[2*cmp+1], coef[2*cmp+1][2*cmp+2], post_intrusion_backup
+ kf[2*cmp+1], coef[2*cmp+1][2*cmp+2], post_intrusion_backup, post_jfmgk_backup
= new_ruby_box(nta, ntb, rst, true, true)
-- w.value の node list 更新.
@@ -517,7 +529,7 @@ end
local function pre_high(ahead)
if not ahead then return ahead end
local head = to_direct(ahead)
- post_intrusion_backup = 0
+ post_intrusion_backup, post_jfmgk_backup = 0, false
local n = first_whatsit(head)
while n do
if getsubtype(n) == sid_user and getfield(n, 'user_id') == RUBY_PRE then
@@ -526,17 +538,22 @@ local function pre_high(ahead)
max_allow_pre = rst.pre or 0
local atr = has_attr(n, attr_ruby) or 0
if max_allow_pre < 0 then
- if atr>0 then
- -- 直前のルビで intrusion がおこる可能性あり.
- -- 前 run のデータが残っていればそれを使用,
- -- そうでなければ行中形のデータを利用する
- local op = old_break_info[atr] or post_intrusion_backup
- max_allow_pre = max(0, -max_allow_pre - op)
- else
- max_allow_pre = -max_allow_pre
- end
+ -- 直前のルビで intrusion がおこる可能性あり.
+ -- 前 run のデータが残っていればそれを使用,
+ -- そうでなければ行中形のデータを利用する
+ local op = (atr>0) and (old_break_info[atr] or post_intrusion_backup) or 0
+ max_allow_pre = max(0, -max_allow_pre - op)
+ end
+ if rst.exclude_pre_from_prev_ruby and ((atr>0) and (old_break_info[-atr]>0) or post_jfmgk_backup) then
+ -- 「直前のルビが JFM グルーに進入→現在のルビの前文字進入はなし」という状況
+ max_allow_pre = 0; rst.exclude_pre_from_prev_ruby=false
end
- post_intrusion_backup = 0
+ if rst.exclude_pre_jfmgk_from_prev_ruby
+ and (atr>0) and ((old_break_info[atr] or post_intrusion_backup) > 0) then
+ -- 「直前のルビが文字に進入→現在のルビの和文処理グルーへの進入はなし」という状況
+ rst.before_jfmgk = 0
+ end
+ post_intrusion_backup, post_jfmgk_backup = 0, false
max_allow_post = rst.post or 0
max_margin = rst.maxmargin or 0
local coef = pre_low_cal_box(n, rst.count)
@@ -558,11 +575,11 @@ luatexbase.add_to_callback('hpack_filter', pre_high, 'ltj.ruby.pre', 100)
----------------------------------------------------------------
local post_lown
do
- local function write_aux(wv, num)
+ local function write_aux(wv, num, bool)
local id = has_attr(wv, attr_ruby_id)
if id>0 and cache_handle then
cache_handle:write(
- 'lrob[' .. tostring(id) .. ']=' .. num .. '\n')
+ 'lrob[' .. tostring(id) .. ']=' .. num .. '\nlrob[' .. tostring(-id) .. ']=' .. tostring(bool) .. '\n')
end
end
@@ -578,7 +595,7 @@ do
node_remove(wv, hn)
insert_after(ch, rs[1], hn)
set_attr(hn, attr_icflag, PROCESSED)
- write_aux(wv, has_attr(hn, attr_ruby))-- 行中形
+ write_aux(wv, has_attr(hn, attr_ruby), has_attr(hn, attr_ruby_post_jfmgk))-- 行中形
else
local deg, hn = (fn-1)/2, wv
for i = 1, deg do hn = node_next(hn) end;
@@ -586,7 +603,7 @@ do
setfield(hn, 'next', nil)
insert_after(ch, rs[1], hn)
set_attr(hn, attr_icflag, PROCESSED)
- write_aux(wv, has_attr(hn, attr_ruby))
+ write_aux(wv, has_attr(hn, attr_ruby), has_attr(hn, attr_ruby_post_jfmgk))
end
else
local deg, hn = max((hn-1)/2,2), wv
@@ -597,7 +614,7 @@ do
insert_after(ch, rs[1], hn)
set_attr(hn, attr_icflag, PROCESSED)
if fn == 2*cmp-1 then
- write_aux(wv, has_attr(hn, attr_ruby))
+ write_aux(wv, has_attr(hn, attr_ruby), has_attr(hn, attr_ruby_post_jfmgk))
end
end
for i = 1,#rs do
@@ -682,6 +699,8 @@ luatexbase.add_to_callback('hpack_filter', post_high_hbox, 'ltj.ruby.post_hbox',
----------------------------------------------------------------
do
local RIPRE = luatexja.stack_table_index.RIPRE
+ local RIPOST = luatexja.stack_table_index.RIPOST
+ local abs = math.abs
local function whatsit_callback(Np, lp, Nq)
if Np.nuc then return Np
elseif getfield(lp, 'user_id') == RUBY_PRE then
@@ -694,25 +713,27 @@ do
if type(Nq.char)=='number' then
-- Nq is a JAchar
if rst.pre < 0 then -- auto
- local p = round((ltjs.table_current_stack[RIPRE + Nq.char] or 0)
- *rst.rubyzw)
+ local s = ltjs.table_current_stack[RIPRE + Nq.char] or 0
+ local p = round(abs(s)*rst.rubyzw)
if rst.mode%2 == 0 then -- intrusion 無効
p = 0
end
- rst.pre = -p
+ rst.pre = -p; rst.exclude_pre_from_prev_ruby = (s<0);
+ rst.exclude_pre_jfmgk_from_prev_ruby = (ltjs.table_current_stack[RIPOST +Nq.char] or 0)<0;
end
if Nq.prev_ruby then
set_attr(lp, attr_ruby, Nq.prev_ruby)
end
elseif rst.pre < 0 then -- auto
if Nq.char == 'parbdd' then
- local p = round((ltjs.table_current_stack[RIPRE-1] or 0)
- *rst.rubyzw)
+ local s = ltjs.table_current_stack[RIPRE - 1] or 0
+ local p = round(abs(s)*rst.rubyzw)
p = min(p, Nq.width)
- if rst.mode%2 == 0 then -- intrusion 無効
+ if rst.mode%2 == 0 then -- intrusion 無効
p = 0
end
- rst.pre = p
+ rst.pre = p; rst.exclude_pre_from_prev_ruby = (s<0);
+ rst.exclude_pre_jfmgk_from_prev_ruby = (ltjs.table_current_stack[RIPOST -1] or 0)<0;
else
rst.pre = 0
end
@@ -741,6 +762,7 @@ do
end
end
local RIPOST = luatexja.stack_table_index.RIPOST
+ local abs = math.abs
local function whatsit_after_callback(s, Nq, Np)
if not s and getfield(Nq.nuc, 'user_id') == RUBY_PRE then
if Np then
@@ -764,8 +786,7 @@ do
if Np and Np.id ~=id_pbox_w and type(Np.char)=='number' then
-- Np is a JAchar
if rst.post < 0 then -- auto
- local p = round((ltjs.table_current_stack[RIPOST + Np.char] or 0)
- *rst.rubyzw)
+ local p = round(abs(ltjs.table_current_stack[RIPOST + Np.char] or 0)*rst.rubyzw)
if rst.mode%2 == 0 then -- intrusion 無効
p = 0
end
diff --git a/macros/luatex/generic/luatexja/src/ltjsclasses.dtx b/macros/luatex/generic/luatexja/src/ltjsclasses.dtx
index ff2104c042..f0c8830bfd 100644
--- a/macros/luatex/generic/luatexja/src/ltjsclasses.dtx
+++ b/macros/luatex/generic/luatexja/src/ltjsclasses.dtx
@@ -6,13 +6,13 @@
% pLaTeX2ε新ドキュメントクラス(日本語 TeX 開発コミュニティ版)
% 原作者:奥村晴彦 <okumura@okumuralab.org>
%
-% Copyright 1993-2016
+% Copyright 1993-2020
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
% Copyright 1995-1999 ASCII Corporation.
% Copyright 1999-2016 Haruhiko Okumura
-% Copyright 2016-2018 Japanese TeX Development Community
+% Copyright 2016-2020 Japanese TeX Development Community
% -----------------------------------------
%
% \fi
@@ -44,7 +44,7 @@
%<*driver>
\ProvidesFile{ltjsclasses.dtx}
%</driver>
- [2020/05/30 ltjsclasses ]
+ [2020/12/23 ltjsclasses ]
%<*driver>
\IfFileExists{luatex85.sty}{\RequirePackage{luatex85}}{}
\documentclass[disablejfam]{ltjsarticle}
@@ -3663,7 +3663,7 @@
%
% \begin{macrocode}
\newcommand{\labelenumi}{\theenumi.}
-\newcommand{\labelenumii}{\inhibitglue(\theenumii)\inhibitglue}
+\newcommand{\labelenumii}{\inhibitglue (\theenumii)\inhibitglue}
\newcommand{\labelenumiii}{\theenumiii.}
\newcommand{\labelenumiv}{\theenumiv.}
% \end{macrocode}
@@ -3682,7 +3682,7 @@
%
% \begin{macrocode}
\renewcommand{\p@enumii}{\theenumi}
-\renewcommand{\p@enumiii}{\theenumi\inhibitglue(\theenumii)}
+\renewcommand{\p@enumiii}{\theenumi\inhibitglue (\theenumii)}
\renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
% \end{macrocode}
% \end{macro}
@@ -4082,7 +4082,7 @@
% 数式番号の形式です。
% デフォルトの値をコメントアウトして示しておきます。
%
-% |\inhibitglue(\theequation)\inhibitglue| のように和文かっこ
+% |\inhibitglue (\theequation)\inhibitglue| のように和文かっこ
% を使うことも可能です。
%
% \begin{macrocode}
@@ -4093,7 +4093,7 @@
% |amsmath| パッケージを使う場合は |\tagform@| を次のように修正します。
%
% \begin{macrocode}
-% \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)}}
+% \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr )}}
% \end{macrocode}
%
% \subsection{フロート}
@@ -4897,7 +4897,7 @@
% とりあえずコメントアウトしておきますので,必要に応じて生かしてください。
%
% \begin{macrocode}
-% \def\@biblabel#1{\inhibitglue[#1]\inhibitglue}
+% \def\@biblabel#1{\inhibitglue [#1]\inhibitglue}
% \end{macrocode}
% \end{macro}
%
@@ -4924,7 +4924,7 @@
% \@latex@warning
% {Citation `\@citeb' on page \thepage \space undefined}}%
% {\@cite@ofmt{\csname b@\@citeb\endcsname}}}}{#1}}
-% \def\@cite#1#2{\inhibitglue[{#1\if@tempswa ,#2\fi}]\inhibitglue}
+% \def\@cite#1#2{\inhibitglue [{#1\if@tempswa ,#2\fi}]\inhibitglue}
% \end{macrocode}
%
% 引用番号を上ツキの 1)のようなスタイルにするには次のようにします。
diff --git a/macros/luatex/generic/luatexja/src/luatexja-core.sty b/macros/luatex/generic/luatexja/src/luatexja-core.sty
index 5cbf4e8da9..3ad5657432 100644
--- a/macros/luatex/generic/luatexja/src/luatexja-core.sty
+++ b/macros/luatex/generic/luatexja/src/luatexja-core.sty
@@ -65,7 +65,7 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja-core}[2020-09-27 Core of LuaTeX-ja]
+ \ProvidesPackage{luatexja-core}[2020-12-22 Core of LuaTeX-ja]
\fi %</LaTeX>
%% Load prerequisite packages.
@@ -151,6 +151,10 @@
\ltj@charclass\z@
\ltj@curjfnt\m@ne
\ltj@curtfnt\m@ne
+\ltj@yablshift\z@
+\ltj@ykblshift\z@
+\ltj@tablshift\z@
+\ltj@tkblshift\z@
%%%%%%%% Attributes for character ranges
\newcount\ltj@tempcnta
@@ -249,24 +253,33 @@
%%%%%%%% \inhibitglue
\newluafunction\ltj@reset@globaldefs@inner
\newluafunction\ltj@restore@globaldefs@inner
+\newluafunction\ltj@@disihb@inner
\newluafunction\ltj@@ihb@inner
\newluafunction\ltj@@fakeparbegin@inner
\newluafunction\ltj@@fakeboxbdd@inner
+\newluafunction\ltj@@ins@xk@inner
+\newluafunction\ltj@@ins@k@inner
\directlua{
local t = lua.get_functions_table()
t[\the\ltj@reset@globaldefs@inner]
= function() luatexja.global_temp = tex.globaldefs; tex.globaldefs = 0 end
t[\the\ltj@restore@globaldefs@inner]
= function() tex.globaldefs = luatexja.global_temp end
+ t[\the\ltj@@disihb@inner] = luatexja.jfmglue.create_disinhibitglue_node
t[\the\ltj@@ihb@inner] = luatexja.jfmglue.create_inhibitglue_node
t[\the\ltj@@fakeparbegin@inner] = luatexja.jfmglue.create_beginpar_node
t[\the\ltj@@fakeboxbdd@inner] = luatexja.jfmglue.create_boxbdd_node
+ t[\the\ltj@@ins@xk@inner] = luatexja.jfmglue.insert_xk_skip
+ t[\the\ltj@@ins@k@inner] = luatexja.jfmglue.insert_k_skip
}
\protected\luadef\ltj@reset@globaldefs \ltj@reset@globaldefs@inner
\protected\luadef\ltj@restore@globaldefs\ltj@restore@globaldefs@inner
+\protected\def\disinhibitglue{\ifhmode\relax\luafunction\ltj@@disihb@inner\fi}
\protected\def\inhibitglue{\ifhmode\relax\luafunction\ltj@@ihb@inner\fi}
\protected\def\ltjfakeparbegin{\ifhmode\relax\luafunction\ltj@@fakeparbegin@inner\fi}
\protected\def\ltjfakeboxbdd{\ifhmode\relax\luafunction\ltj@@fakeboxbdd@inner\fi}
+\protected\luadef\insertxkanjiskip \ltj@@ins@xk@inner
+\protected\luadef\insertkanjiskip \ltj@@ins@k@inner
%%%%%%%% \ltjdefcharrange<name>{100-200,3000-,5000,...}
diff --git a/macros/luatex/generic/luatexja/src/luatexja.lua b/macros/luatex/generic/luatexja/src/luatexja.lua
index 1c039a7d9f..b4e2e68efb 100644
--- a/macros/luatex/generic/luatexja/src/luatexja.lua
+++ b/macros/luatex/generic/luatexja/src/luatexja.lua
@@ -42,6 +42,9 @@ icflag_table.LINEEND = 72
icflag_table.PROCESSED = 73
icflag_table.IC_PROCESSED = 74
icflag_table.BOXBDD = 75
+icflag_table.SPECIAL_JAGLUE = 76
+-- 段落組版中のノードリストでは通常のノード (not whatsit) だが
+-- 和文処理グルー挿入プロセスで長さが決定されるもの
icflag_table.PROCESSED_BEGIN_FLAG = 4096 -- sufficiently large power of 2
local stack_ind = {}
diff --git a/macros/luatex/generic/luatexja/src/luatexja.sty b/macros/luatex/generic/luatexja/src/luatexja.sty
index f70120dd1f..4d749c40ef 100644
--- a/macros/luatex/generic/luatexja/src/luatexja.sty
+++ b/macros/luatex/generic/luatexja/src/luatexja.sty
@@ -35,13 +35,13 @@
\expandafter\let\csname ifltj@in@latex\expandafter\endcsname
\csname iftrue\endcsname
\NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{luatexja}[2020-10-30 Japanese Typesetting with Lua(La)TeX]
+ \ProvidesPackage{luatexja}[2020-12-24 Japanese Typesetting with Lua(La)TeX]
\DeclareOption{disablejfam}{\ltj@disablejfamtrue}
\DeclareOption*{}
\ProcessOptions\relax
\fi %</LaTeX>
%%%% VERSION
-\def\LuaTeXjaversion{20201030.0}
+\def\LuaTeXjaversion{20201224.0}
\directlua{require('ltj-unicode-ccfix.lua')}% catcode of ideographs
diff --git a/macros/luatex/generic/luatexja/src/patches/lltjp-tascmac.sty b/macros/luatex/generic/luatexja/src/patches/lltjp-tascmac.sty
index d0ac424701..4d2d350553 100644
--- a/macros/luatex/generic/luatexja/src/patches/lltjp-tascmac.sty
+++ b/macros/luatex/generic/luatexja/src/patches/lltjp-tascmac.sty
@@ -7,7 +7,7 @@
% \dimen...=\ybaselineshift ==> \dimen...=\ltj@yablshift sp
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-tascmac}[2017/12/23 Patch to (t)ascmac for LuaTeX-ja]
+\ProvidesPackage{lltjp-tascmac}[2020/12/24 Patch to (t)ascmac for LuaTeX-ja]
\RequirePackage{tascmac}
@@ -37,7 +37,7 @@
\@whiledim \wd\@nbox<\hsize \do{
\setbox\@nbox=\hbox{\@ascgrp\unhbox\@nbox \hss a\hss b}}
\setbox\@nbox=\hbox to\hsize{\@ascgrp\unhbox\@nbox \hss a\hss b%
- \vrule width1.08pt depth35pt}
+ \vrule width1.08pt depth35pt}%
\@bw=\wd\@nbox\advance\@bw -40pt
\begin{lrbox}{\@nbody}\begin{minipage}{\@bw}% (KN:1998/02/27)
\ltj@yablshift\@saveybaselineshift \ltj@tablshift\@savetbaselineshift}%