diff options
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/README | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf | bin | 400713 -> 400691 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf | bin | 452484 -> 457434 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf | bin | 703072 -> 699627 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf | bin | 1137731 -> 1136733 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.pdf | bin | 375376 -> 380466 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex | 45 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx | 186 |
8 files changed, 182 insertions, 57 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README index a4c13844661..3a23ede8a4f 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/README +++ b/Master/texmf-dist/doc/luatex/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/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf Binary files differindex 37e43d896fa..bbae89d4e13 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf Binary files differindex db3c1284a41..f599de92214 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf Binary files differindex 890021f98c6..7c0497cdbed 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf Binary files differindex 41e9b9ba33a..b06dc04aff8 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.pdf Binary files differindex 0b436587ab6..5365af4335a 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex index d135b02acc4..7d5226e47c4 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ruby.tex +++ b/Master/texmf-dist/doc/luatex/luatexja/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/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx index 18379733c55..eaf4b8ebae6 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx +++ b/Master/texmf-dist/doc/luatex/luatexja/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} |