リビジョン | 2c45f80f79b73ade1d0fdfcb66734ba4ccd44838 (tree) |
---|---|
日時 | 2020-05-17 10:30:39 |
作者 | Hironori Kitagawa <h_kitagawa2001@yaho...> |
コミッター | Hironori Kitagawa |
updated doc.
@@ -153,6 +153,7 @@ | ||
153 | 153 | \theoremstyle{definition} |
154 | 154 | %<en>\newtheorem{defn}{Definition} |
155 | 155 | %<ja>\newtheorem{defn}{定義} |
156 | +\DeclareMathOperator\nint{nint} | |
156 | 157 | |
157 | 158 | %%%%%%%% logo |
158 | 159 | \usepackage{metalogo} |
@@ -3542,7 +3543,7 @@ The following horizontal JFMs are shipped with \LuaTeX-ja: | ||
3542 | 3543 | %<*en> |
3543 | 3544 | \item[\texttt{jfm-ujis.lua}] A standard horizontal JFM in \LuaTeX-ja. This JFM is |
3544 | 3545 | based on \verb+upnmlminr-h.tfm+, a metric for UTF/OTF package that |
3545 | - is used in \upTeX. When you use the \Pkg{luatexja-otf} package, you should use this JFM. | |
3546 | + is used in \upTeX. When you are going to use the \Pkg{luatexja-otf} package, you should use this JFM. | |
3546 | 3547 | %</en> |
3547 | 3548 | %<*ja> |
3548 | 3549 | \item[\texttt{jfm-ujis.lua}] \LuaTeX-jaの標準JFMである.このJFMは\upTeX で |
@@ -3608,7 +3609,7 @@ The difference among these three~JFMs is shown in \autoref{tab-difjfm}. | ||
3608 | 3609 | \footnote{プロポーショナル組の状況でルビをつけたい,などという状況では\texttt{jfm-propw.lua}が有用かもしれない.}. |
3609 | 3610 | %</ja> |
3610 | 3611 | %<*en> |
3611 | -Furthermore, \LuaTeX-ja also ship two JFMs, namely \texttt{jfm-prop.lua}~and~\emph{\texttt{jfm-propw.lua}}, | |
3612 | +Furthermore, \LuaTeX-ja also ship two JFMs, namely \texttt{jfm-prop.lua}~and~\texttt{jfm-propw.lua}, | |
3612 | 3613 | for ``proportional typesetting''. |
3613 | 3614 | Both JFMs don't have any character width information, nor glues/kerns information. |
3614 | 3615 | \texttt{jfm-prop.lua} also also not have character height and depth information, while \texttt{jfm-propw.lua} has them. |
@@ -3689,6 +3690,7 @@ NFSS2用の命令(\ref{ssec:chgfnt}節,\ref{ssec:nfsspat}節)における | ||
3689 | 3690 | %</ja> |
3690 | 3691 | |
3691 | 3692 | %<*ja> |
3693 | +\newpage | |
3692 | 3694 | \paragraph{\texttt{extend}と\texttt{slant}} |
3693 | 3695 | OpenType機能と見かけ上同じような形式で指定できるものに, |
3694 | 3696 | \begin{description} |
@@ -3709,7 +3711,7 @@ The following setting can be specified as OpenType font features: | ||
3709 | 3711 | \item[\texttt{slant=}<slant>] slant the font. |
3710 | 3712 | \end{cslist} |
3711 | 3713 | Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant} |
3712 | -settings; you have to write new JFMs on purpose. | |
3714 | +settings; one have to write new JFMs on purpose. | |
3713 | 3715 | For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, hence |
3714 | 3716 | letter-spacing and the width of italic correction are not correct: |
3715 | 3717 | %</en> |
@@ -3720,30 +3722,21 @@ letter-spacing and the width of italic correction are not correct: | ||
3720 | 3722 | \end{LTXexample} |
3721 | 3723 | |
3722 | 3724 | %<*ja> |
3723 | -\paragraph{\texttt{ltjksp} 指定} | |
3725 | +\paragraph{\texttt{ltjksp}指定} | |
3724 | 3726 | \label{pg:ltjksp} |
3725 | 3727 | \LuaTeX-ja標準では, |
3726 | -JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\ | |
3728 | +JFM中における\texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\ | |
3727 | 3729 | \texttt{kanjiskip\_shrink}キー(\pageref{pg:ksp_nat}ページ)の使用によって, |
3728 | 3730 | 「JFM由来のグルーの他に,\Param{kanjiskip}の自然長/伸び量/縮み量の一部が |
3729 | 3731 | 同じ場所に挿入される」という状況が起こりうる. |
3730 | 3732 | この機能を無効化し,バージョン20150922.0以前と同じような組版を得るためには |
3731 | -他のOpenType機能と同じように\ \texttt{-ltjksp}\ 指定を行えば良い. | |
3732 | -\begin{LTXexample}[width=16\zw] | |
3733 | -\leavevmode | |
3734 | -\ltjsetparameter{kanjiskip=0pt plus 3\zw} | |
3735 | -\vrule\hbox to 15\zw{あ「い」う,えお}\vrule\\ | |
3736 | -\jfont\G=HaranoAjiMincho-Regular% | |
3737 | - :jfm=ujis;-ltjksp at \zw | |
3738 | -\G\leavevmode% | |
3739 | -\vrule\hbox to 15\zw{あ「い」う,えお}\vrule | |
3740 | -\end{LTXexample} | |
3733 | +他のOpenType機能と同じように\texttt{-ltjksp}指定を行えば良い(\autoref{fig:ltjksp}参照). | |
3741 | 3734 | なお, |
3742 | 3735 | \begin{lstlisting} |
3743 | 3736 | \jfont\G=HaranoAjiMincho-Regular:jfm=ujis;-ltjksp;+ltjksp at \zw |
3744 | 3737 | \end{lstlisting} |
3745 | -のように \texttt{+ltjksp} 指定を行った場合は,\texttt{kanjiskip\_natural} など | |
3746 | -3キーは再び有効化される.\texttt{-ltjksp}, \texttt{+ltjksp} を複数回指定した場合は, | |
3738 | +のように\texttt{+ltjksp}指定を行った場合は,\texttt{kanjiskip\_natural}など | |
3739 | +3キーは再び有効化される.\texttt{-ltjksp}, \texttt{+ltjksp}を複数回指定した場合は, | |
3747 | 3740 | 最後に指定したものが有効となる. |
3748 | 3741 | %</ja> |
3749 | 3742 | %<*en> |
@@ -3753,8 +3746,10 @@ JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\ | ||
3753 | 3746 | \texttt{kanjiskip\_shrink} keys (Page~\pageref{pg:ksp_nat}) makes tha |
3754 | 3747 | \LuaTeX-ja inserts not only a glue which is specified by a JFM, and also |
3755 | 3748 | the natural width/stretch part/shrink part of \Param{kanjiskip}. |
3756 | - | |
3757 | -This functionality is disabled by \texttt{-ltjksp} specification. | |
3749 | +This functionality is disabled by \texttt{-ltjksp} specification, | |
3750 | +as shown in~\autoref{fig:ltjksp}. | |
3751 | +%</en> | |
3752 | +\begin{figure} | |
3758 | 3753 | \begin{LTXexample}[width=16\zw] |
3759 | 3754 | \leavevmode |
3760 | 3755 | \ltjsetparameter{kanjiskip=0pt plus 3\zw} |
@@ -3764,7 +3759,9 @@ This functionality is disabled by \texttt{-ltjksp} specification. | ||
3764 | 3759 | \G\leavevmode% |
3765 | 3760 | \vrule\hbox to 15\zw{あ「い」う,えお}\vrule |
3766 | 3761 | \end{LTXexample} |
3767 | -%</en> | |
3762 | +\caption{\texttt{ltjksp}} | |
3763 | +\label{fig:ltjksp} | |
3764 | +\end{figure} | |
3768 | 3765 | |
3769 | 3766 | |
3770 | 3767 |
@@ -3828,7 +3825,7 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont | ||
3828 | 3825 | \begin{itemize} |
3829 | 3826 | \item OpenType Feature~\texttt{vrt2}% |
3830 | 3827 | \footnote{If the font does not define \texttt{vrt2} feature, |
3831 | - use \texttt{vert} instead.} is automatically activated, | |
3828 | + \texttt{vert} is used instead.} is automatically activated, | |
3832 | 3829 | unless \texttt{vert}~and//or~\texttt{vrt2} are explicitly activated |
3833 | 3830 | or deactivated (as the second line in the example below). |
3834 | 3831 | \begin{lstlisting} |
@@ -3873,6 +3870,8 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont | ||
3873 | 3870 | By default, it substitutes ideographic comma/period for fullwidth comma/period, |
3874 | 3871 | and double prime quotation marks for double quotation marks |
3875 | 3872 | (See~\autoref{fig:jpotf}). |
3873 | + One can customize substitutions by lua~function \verb+luatexja.jfont.register_vert_replace+\ % | |
3874 | + (see Japanese version of this manual). | |
3876 | 3875 | \end{itemize} |
3877 | 3876 | %</en> |
3878 | 3877 | %<*ja> |
@@ -4750,8 +4749,9 @@ Hence we have the following result: | ||
4750 | 4749 | 「実際のグリフの幅に合わせて文字幅を整数倍する」際のしきい値を指定する. |
4751 | 4750 | より正確に述べると,次のようになる.このフィールドに正の数$r$が指定されていたとし, |
4752 | 4751 | 文字クラス0で指定されている文字幅が$w$,文字クラス0に属する文字のグリフの幅が$w'$であったとする. |
4753 | -$n$を$w/w'$に「もっとも近い整数」($\lfloor w/w'+0.5\rfloor$)としたとき, | |
4754 | -もし$|w/w'-n|\char`<r$であれば,JFMで文字幅$nw$が指定されたものとして扱う. | |
4752 | +$n=\nint(w/w')$とした | |
4753 | +\footnote{ここで,$\nint(a)=\lfloor a+0.5\rfloor$は$a$に「もっとも近い整数」を表す.} | |
4754 | +とき,もし$w'>w$かつ$|w/w'-n|\char`<r$であれば,JFMで文字幅$nw$が指定されたものとして扱う. | |
4755 | 4755 | |
4756 | 4756 | この機能は,ほとんど源ノ明朝・源ノ角ゴシックにおける2倍角・3倍角ダッシュの合字のために実装されたと |
4757 | 4757 | 言ってもよい.これらのグリフは\LuaTeX 内部ではUnicodeの私用領域に割り当てられるので, |
@@ -4852,7 +4852,7 @@ as follows: | ||
4852 | 4852 | %<ja>\paragraph{仮想的な文字} |
4853 | 4853 | %<en>\paragraph{Imaginary characters} |
4854 | 4854 | %<*en> |
4855 | -As described before, you can specify several ``imaginary characters'' in | |
4855 | +As described before, one can specify several ``imaginary characters'' in | |
4856 | 4856 | \texttt{chars} field. The most of these characters are regarded as the |
4857 | 4857 | characters of class 0 in \pTeX. |
4858 | 4858 | As a result, \LuaTeX-ja can control typesetting finer than \pTeX. |
@@ -5002,7 +5002,7 @@ an external package is needed to support this in plain \TeX\ and | ||
5002 | 5002 | \autoref{tab-math} shows counterparts to \TeX's primitives for math |
5003 | 5003 | font families. There is no relation between the value of |
5004 | 5004 | \cs{fam} and that of \cs{jfam}; with appropriate settings, |
5005 | -you can set both \cs{fam} and \cs{jfam} to the same value. | |
5005 | +one can set both \cs{fam} and \cs{jfam} to the same value. | |
5006 | 5006 | Here <jfont\_cs> in the argument of \Param{jatextfont} etc.\ is |
5007 | 5007 | a control sequence which is defined by \cs{jfont}, i.e., |
5008 | 5008 | a \emph{horizontal} Japanese font. |
@@ -5053,7 +5053,7 @@ be accessed via \verb+luatexbase.add_to_callback+ function and so on, as other c | ||
5053 | 5053 | %<en>\item[\texttt{luatexja.load\_jfm} callback] |
5054 | 5054 | %<ja>\item[\texttt{luatexja.load\_jfm}コールバック] |
5055 | 5055 | %<*en> |
5056 | -With this callback you can overwrite JFMs. | |
5056 | +With this callback, one can overwrite JFMs. | |
5057 | 5057 | This callback is called when a new JFM is loaded. |
5058 | 5058 | %</en> |
5059 | 5059 | %<*ja> |
@@ -129,10 +129,12 @@ local function capsule_glyph_yoko(p, met, char_data, head, dir) | ||
129 | 129 | |
130 | 130 | local q |
131 | 131 | head, q = node_remove(head, p) |
132 | - if char_data.round_threshold then | |
133 | - local frac = pwidth / fwidth | |
134 | - local quot = floor(frac+0.5) | |
135 | - if abs(frac-quot) <char_data.round_threshold then fwidth = fwidth * quot end | |
132 | + if pwidth > fwidth then | |
133 | + if char_data.round_threshold then | |
134 | + local frac = pwidth / fwidth | |
135 | + local quot = floor(frac+0.5) | |
136 | + if abs(frac-quot) <char_data.round_threshold then fwidth = fwidth * quot end | |
137 | + end | |
136 | 138 | end |
137 | 139 | local xo, yo = getoffsets(p) |
138 | 140 | setoffsets(p, xo + char_data.align*(fwidth-pwidth) - fshift.left, |
@@ -196,7 +198,7 @@ local function capsule_glyph_tate(p, met, char_data, head, dir) | ||
196 | 198 | pwidth, ascender = feir.vheight[pc]*met.size, feir.vorigin[pc]*met.size |
197 | 199 | end |
198 | 200 | fwidth = fwidth or pwidth |
199 | - if fwidth~=pwidth and char_data.round_threshold then | |
201 | + if pwidth>fwidth and char_data.round_threshold then | |
200 | 202 | local frac = pwidth / fwidth |
201 | 203 | local quot = floor(frac+0.5) |
202 | 204 | if abs(frac-quot) <char_data.round_threshold then fwidth = fwidth * quot end |