OSDN Git Service

fig a bug in lltjext + array
[luatex-ja/luatexja.git] / doc / luatexja.dtx
index faafe48..82a7ec2 100644 (file)
 %<*en>
 \title{The \LuaTeX-ja package}
 \author{The \LuaTeX-ja project team}
+\date{\LuaTeXjaversion~(\today)}
 %</en>
 %<*ja>
 \title{\LuaTeX-jaパッケージ}
 \author{\LuaTeX-jaプロジェクトチーム}
+\date{\LuaTeXjaversion(\today)}
 %</ja>
 \hypersetup{%
        unicode,
        pdftitle={LuaTeX-jaパッケージ}
 %</ja>
 }
+%<*ja>
+\def\HyRef@autoref#1#2{%
+  \begingroup
+    \Hy@safe@activestrue
+    \expandafter\HyRef@autosetref\csname r@#2\endcsname{#2}{#1}%
+  \endgroup\ltjalchar"200C %" 欧文ゴースト
+}
+\def\figureautorefname{図}
+\def\tableautorefname{表}
+%</ja>
 
 %%%%%%%% definition env.
 \usepackage{amsthm}
@@ -625,8 +637,8 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}.
 \item \LuaTeX\ beta-0.85.0 (or later)
 \item \Pkg{luaotfload} v2.6 (or later)
 \item \Pkg{adobemapping} (Adobe cmap and pdfmapping files)
-\item \Pkg{everysel} (if you want to use \LuaTeX-ja with \LaTeXe)
-\item \Pkg{ltxcmds}, \Pkg{pdftexcmds}, \Pkg{atbegshi}
+\item \Pkg{etoolbox}, \Pkg{everysel} (if you want to use \LuaTeX-ja with \LaTeXe)
+\item \Pkg{ltxcmds}, \Pkg{pdftexcmds}, \Pkg{filehook}, \Pkg{atbegshi}
 \item \Pkg{fontspec} v2.4 (or later)
 %<en>\item \emph{IPAex fonts} (\url{http://ipafont.ipa.go.jp/})
 %<ja>\item \emph{IPAexフォント(\url{http://ipafont.ipa.go.jp/})}
@@ -1087,9 +1099,9 @@ classes in \pLaTeX) and \Pkg{jsclasses} (classes by Haruhiko
 Okumura), namely, \Pkg{ltjclasses}\footnote{%
   \texttt{ltjarticle.cls},~\texttt{ltjbook.cls}, \texttt{ltjreport.cls},
   \texttt{ltjtarticle.cls}, \texttt{ltjtbook.cls}, \texttt{ltjtreport.cls}.
-  The latter \texttt{ltjt*.cls} are for vertically writtened Japanese documents.
+  The latter \texttt{ltjt*.cls} are for vertically written Japanese documents.
 } and \Pkg{ltjsclasses}\footnote{%
-  \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls},~\texttt{ltjskiyou.cls}.}.
+  \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls}, \texttt{ltjsreport.cls},~\texttt{ltjskiyou.cls}.}.
 
 Original \Pkg{jsclasses} use \cs{mag}~primitive to set the main document font size.
 However, \LuaTeX\ beta-0.87.0~or~later does not support \cs{mag} in PDF~output,
@@ -1108,7 +1120,7 @@ to set the main document font size.
   縦組用は \texttt{ltjtarticle.cls}, \texttt{ltjtbook.cls}, \texttt{ltjtreport.cls} である.
 },
 \Pkg{ltjsclasses}\footnote{%
-  \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls},~\texttt{ltjskiyou.cls}.}%
+  \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls}, \texttt{ltjsreport.cls},~\texttt{ltjskiyou.cls}.}%
 がそれぞれ用意されている.
 
 元々の\Pkg{ltjsclasses}ではフォントサイズを指定するのに\cs{mag}プリミティブが使われていたが,
@@ -1705,16 +1717,27 @@ since we use same font for both series of \textit{gothic}.
 \item[jis2004]
 %<en>Use JIS2004 glyph variants if possible.
 %<ja>出来る限りJIS2004の字形を使う.
-\item[jis]
+\item[jfm\_yoko=<jfm>]
+%<*en>
+Use the JFM \texttt{jfm-<jfm>.lua} for horizontal direction, instead of \texttt{jfm-ujis.lua}~(default JFM).
+%</en>
+%<*ja>
+横組用和文フォントで用いるJFMを\texttt{jfm-<jfm>.lua}にする.このオプションがない時は
+\LuaTeX\nobreakdash -ja標準の\texttt{jfm-ujis.lua}が用いられる.
+%</ja>
+\item[jfm\_tate=<jfm>]
 %<*en>
-Use the JFM \texttt{jfm-jis.lua}, instead of \texttt{jfm-ujis.lua}, which is the default JFM of
-\LuaTeX-ja.
+Use the JFM \texttt{jfm-<jfm>.lua} for vertical direction, instead of \texttt{jfm-ujisv.lua}~(default JFM).
 %</en>
 %<*ja>
\94¨ã\81\84ã\82\8bJFMã\82\92ï¼\88JISã\83\95ã\82©ã\83³ã\83\88ã\83¡ã\83\88ã\83ªã\83\83ã\82¯é¡\9eä¼¼ã\81®ï¼\89\texttt{jfm-jis.lua}にする.このオプションがない時は
-\LuaTeX-ja標準の\texttt{jfm-ujis.lua}が用いられる.
¸¦ç\94¨å\92\8cæ\96\87ã\83\95ã\82©ã\83³ã\83\88ã\81§ç\94¨ã\81\84ã\82\8bJFMã\82\92\texttt{jfm-<jfm>.lua}にする.このオプションがない時は
+\LuaTeX-ja標準の\texttt{jfm-ujisv.lua}が用いられる.
 %</ja>
 
+\item[jis]
+%<en>Same as \texttt{jfm\_yoko=jis}.
+%<ja>\texttt{jfm\_yoko=jis}と同じ.ここで用いるJFM\texttt{jfm-jis.lua}はJISフォントメトリックを元にしたものである.
+
 \end{cslist}
 %<*en>
 Note that \texttt{90jis} and \texttt{jis2004} only affect with \textit{mincho},
@@ -1850,7 +1873,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 \end{tabular}
 \end{center}
 
-%<en>\newpage
+\newpage
  \item[yu-win]  Yu fonts bundled with Windows~8.1.
 %<en>    \\*[-\dimexpr\medskipamount+\baselineskip\relax]
  \item[yu-win10]  Yu fonts bundled with Windows~10.
@@ -1882,10 +1905,10 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 \end{tabular}
 \end{center}
 
-%<ja>\newpage
 \item[moga-mobo]  MogaMincho, MogaGothic, and MoboGothic.
+%<en>    \\*[-\dimexpr\medskipamount+\baselineskip\relax]
 \item[moga-mobo-ex]  MogaExMincho, MogaExGothic, and MoboExGothic.
-%<en>These fonts can be downloaded from\\\hfill \url{http://yozvox.web.fc2.com/}.
+%<en>\par These fonts can be downloaded from \url{http://yozvox.web.fc2.com/}.
 %<ja>これらのフォントは \url{http://yozvox.web.fc2.com/} からダウンロードできる.
 \begin{center}\small
 \begin{tabular}{clll}
@@ -1913,7 +1936,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 %<ja>\texttt{moga-mobo-ex}オプション指定時にはMogaEx90MinchoなどのExが名前についたフォントが使われる.
 
 \item[ume]  Ume Mincho and Ume Gothic.
-%<en>These fonts can be downloaded from\\\hfill \url{https://ja.osdn.net/projects/ume-font/wiki/FrontPage}.
+%<en>\par These fonts can be downloaded from\\\hfill \url{https://ja.osdn.net/projects/ume-font/wiki/FrontPage}.
 %<ja>これらのフォントは \url{https://ja.osdn.net/projects/ume-font/wiki/FrontPage} からダウンロードできる.
 \begin{center}\small
 \begin{tabular}{cll}
@@ -1940,6 +1963,70 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 \end{tabular}
 \end{center}
 
+%<ja>\newpage
+ \item[sourcehan]  Source Han Serif and Source Han Sans fonts (Language-specific OTF \textit{or} OTC)
+%<en>    \\*[-\dimexpr\medskipamount+\baselineskip\relax]
+ \item[sourcehan-jp]  Source Han Serif JP and Source Han Sans JP fonts (Region-specific Subset OTF)
+\begin{center}\small
+\def\AD#1#2{Source Han #1 #2&Source Han #1 JP #2}%
+\begin{tabular}{cllll}
+\toprule
+\bf family&\bf series&\texttt{sourcehan}&\texttt{sourcehan-jp}\\
+\midrule
+ &medium&\AD{Serif}{Regular}\\
+%<en>\smash{\raisebox{1.5ex}{\textit{mincho}}}%
+%<ja>\smash{\raisebox{1.5ex}{\gt 明朝}}%
+ &bold&\AD{Serif}{Bold}\\
+\midrule
+ &&\AD{Sans}{Regular*}\\
+ &\smash{\raisebox{1.5ex}{medium}}
+ &\AD{Sans}{Medium}\\
+\cmidrule(l){2-4}
+%<en>\smash{\raisebox{2ex}{\textit{gothic}}}%
+%<ja>\smash{\raisebox{2ex}{\gt ゴシック}}%
+ &bold&\AD{Sans}{Bold}\\
+ &heavy&\AD{Sans}{Heavy}\\
+\midrule
+%<en>\textit{rounded gothic}
+%<ja>\gt 丸ゴシック
+&&\AD{Sans}{Heavy}\\
+\bottomrule
+\end{tabular}
+\end{center}
+
+
+ \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)
+\begin{center}\small
+\def\AD#1#2{Noto #1 CJK #2&Noto #1 CJK JP #2}%
+\begin{tabular}{cllll}
+\toprule
+\bf family&\bf series&\texttt{noto-otc}&\texttt{noto-otf}\\
+\midrule
+ &medium&\AD{Serif}{Regular}\\
+%<en>\smash{\raisebox{1.5ex}{\textit{mincho}}}%
+%<ja>\smash{\raisebox{1.5ex}{\gt 明朝}}%
+ &bold&\AD{Serif}{Bold}\\
+\midrule
+ &&\AD{Sans}{Regular*}\\
+ &\smash{\raisebox{1.5ex}{medium}}
+ &\AD{Sans}{Medium}\\
+\cmidrule(l){2-4}
+%<en>\smash{\raisebox{2ex}{\textit{gothic}}}%
+%<ja>\smash{\raisebox{2ex}{\gt ゴシック}}%
+ &bold&\AD{Sans}{Bold}\\
+ &heavy&\AD{Sans}{Black}\\
+\midrule
+%<en>\textit{rounded gothic}
+%<ja>\gt 丸ゴシック
+&&\AD{Sans}{Black}\\
+\bottomrule
+\end{tabular}
+\end{center}
+
+
+
 \end{cslist}
 %<en>\paragraph{Presets for single weight}
 %<ja>\paragraph{単ウェイト用プリセット一覧}
@@ -2344,16 +2431,16 @@ This range consists of the following Unicode ranges, \emph{except characters in
 \end{multicols}
 %<*en>
 \item[Range~3${}^{\text{\kern.1emJ}}$] Punctuations and Miscellaneous symbols. The block list is
-          indicated in Table~\ref{table-rng3}.
+          indicated in \autoref{tab:rng3}.
 %</en>
 %<*ja>
-\item[範囲3${}^{\text{\kern.1emJ}}$] 句読点と記号類.ブロックのリストは表\ref{table-rng3}%
+\item[範囲3${}^{\text{\kern.1emJ}}$] 句読点と記号類.ブロックのリストは\autoref{tab:rng3}%
                              に示してある.
 %</ja>
 \begin{table}[!tb]
 %<en>\caption{Unicode blocks in predefined character range~3.}\medskip
 %<ja>\caption{文字範囲3に指定されているUnicodeブロック.}
-\label{table-rng3}
+\label{tab:rng3}
 \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
 \centering\small
 \begin{tabular}{llll}
@@ -2397,12 +2484,12 @@ This range consists of the following Unicode ranges, \emph{except characters in
 \end{lstlisting}
 %<en>\item[Range~5${}^{\text{A}}$] Surrogates and Supplementary Private Use Areas.
 %<ja>\item[範囲5${}^{\text{A}}$] 代用符号と補助私用領域.
-%<en>\item[Range~6${}^{\text{\kern.1emJ}}$] Characters used in Japanese. The block list is indicated in Table~\ref{table-rng6}.
-%<ja>\item[範囲6${}^{\text{\kern.1emJ}}$] 日本語で用いられる文字.ブロックのリストは表\ref{table-rng6}に示す.
+%<en>\item[Range~6${}^{\text{\kern.1emJ}}$] Characters used in Japanese. The block list is indicated in \autoref{tab:rng6}.
+%<ja>\item[範囲6${}^{\text{\kern.1emJ}}$] 日本語で用いられる文字.ブロックのリストは\autoref{tab:rng6}に示す.
 \begin{table}[!tb]
 %<en>\caption{Unicode blocks in predefined character range~6.}\medskip
 %<ja>\caption{文字範囲6に指定されているUnicodeブロック.}
-\label{table-rng6}
+\label{tab:rng6}
 \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
 \centering\small
 \begin{tabular}{llll}
@@ -2427,17 +2514,17 @@ This range consists of the following Unicode ranges, \emph{except characters in
 \end{table}
 %<*en>
 \item[Range~7${}^{\text{\kern.1emJ}}$] Characters used in CJK languages, but not included in  Adobe-Japan1-6.
-The block list is indicated in Table~\ref{table-rng7}.
+The block list is indicated in \autoref{tab:rng7}.
 %</en>
 %<*ja>
 \item[範囲7${}^{\text{\kern.1emJ}}$] CJK言語で用いられる文字のうち,Adobe-Japan1-6に
                             含まれていないもの.
-                            ブロックのリストは表\ref{table-rng7}に示す.
+                            ブロックのリストは\autoref{tab:rng7}に示す.
 %</ja>
 \begin{table}[!tb]
 %<en>\caption{Unicode blocks in predefined character range~7.}\medskip
 %<ja>\caption{文字範囲7に指定されているUnicodeブロック.}
-\label{table-rng7}
+\label{tab:rng7}
 \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
 \centering\small
 \begin{tabular}{llll}
@@ -2763,24 +2850,29 @@ becuse a \emph{JAchar} is encapsulated by a horizontal box if needed.
 
 %<*ja>
 \paragraph{数式における挙動:\pTeX との違い}
-\textbf{ALchar}のベースラインを補正する \Param{yalbaselineshift} パラメータは
-ほぼ\pTeX における \cs{ybaselineshift} に対応しているものであるが,
+\textbf{ALchar}のベースラインを補正する\Param{yalbaselineshift}, \Param{talbaselineshift}パラメータは
+ほぼ\pTeX における \cs{ybaselineshift}, \cs{tbaselineshift} に対応しているものであるが,
 数式中の挙動は異なっているので注意が必要である.
-例えば,表\ref{tab:math_bsa}のように,数式中に明示的に現れた \cs{hbox} は,
+例えば,\autoref{tab:math_bsa}のように,数式中に明示的に現れた \cs{hbox},~\cs{vbox} は,横組において
 \begin{itemize}
  \item 2015年以前の\pTeX では,ボックス全体が \cs{ybaselineshift} だとシフトされるので,
表\ref{tab:math_bsa}中の``い''のように,ボックス中の和文文字は
\autoref{tab:math_bsa}中の``い''のように,ボックス中の和文文字は
  \ \cs{ybaselineshift} だけシフトされ,一方,``for all''のように,
  ボックス内の欧文文字は2重にシフトされることになる.
  \item 一方,\LuaTeX-jaではそのようなことはおこらず,
- 数式中に明示的に現れた \cs{hbox} はシフトしない.そのため,
表\ref{tab:math_bsa}中の``い''も``for all''も,それぞれ本文中に
+ 数式中に明示的に現れた \cs{hbox},~\cs{vbox} はシフトしない.そのため,
\autoref{tab:math_bsa}中の``い''も``for all''も,それぞれ本文中に
  書かれたときと同じ上下位置に組まれる.
 
  なお,\TeX~Live~2016以降の\pTeX では改修がなされ,\LuaTeX-jaと
  近い挙動になるようにしているが,数式中に直に書かれた``あ''のベースラインについては
  まだ違いが見られる.
 \end{itemize}
+
+なお,20170401.0版以降の\LuaTeX-jaでは,\cs{vcenter} によるボックスには
+全体が\Param{yalbaselineshift}, \Param{talbaselineshift} パラメータが反映されるようにしている.
+その方が結果が自然であることによる変更なのだが,結果的に\cs{vcenter} については\pTeX と同じ挙動となった.
+
 \begin{table}
 \small\centering
 \caption{数式関係のベースライン補正($\Param{yalbaselineshift}=10\,\textrm{pt}$)}
@@ -2833,6 +2925,7 @@ However, the penalty inserted after it is 10 which is the \Param{postbreakpenalt
 ``ア'', not 20.
 %</en>
 %<*ja>
+\newpage
 \subsection{禁則処理関連パラメータとOpenTypeのfont feature}
 禁則処理や \Param{kanjiskip}, \Param{xkanjiskip} の挿入に関連したパラメータのうち
 \begin{quote}
@@ -2872,7 +2965,7 @@ However, the penalty inserted after it is 10 which is the \Param{postbreakpenalt
 \subsection{予備知識:\pTeX と\upTeX における \cs{kcatcode}}
 \pTeX,\upTeX においては,和文文字が制御綴内で利用できるかどうか
 は \cs{kcatcode} の値によって決定されるのであった.
-詳細は表\ref{table-kcat}を参照されたい.
+詳細は\autoref{tab:kcat}を参照されたい.
 %</ja>
 %<*en>
 \section{\cs{catcode} in \LuaTeX-ja}
@@ -2880,13 +2973,13 @@ However, the penalty inserted after it is 10 which is the \Param{postbreakpenalt
 \subsection{Preliminaries: \cs{kcatcode} in \pTeX\ and \upTeX}
 In \pTeX~and~\upTeX, the value of \cs{kcatcode} determines
 whether a Japanese character can be used in a control word.
-For the detail, see Table~\ref{table-kcat}.
+For the detail, see \autoref{tab:kcat}.
 %</en>
 
 \begin{table}[t]
 \small
 \caption{\cs{kcatcode} in \upTeX}
-\label{table-kcat}
+\label{tab:kcat}
 %<en>\medskip
 
 \noindent\hfill
@@ -3048,7 +3141,7 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.}
 %<en>\caption{Difference of the set of non-kanji JIS~X~0208 characters which can be used in a control word}
 %<ja>\caption{制御綴中に使用出来るJIS~X~0208非漢字の違い}
 %<en>\medskip
-\label{table-kcat-diff}
+\label{tab:kcat-diff}
 \def\D#1#2#3#4{%
   {\fboxsep0pt\fcolorbox{cyan}{white}%
   {\large\char"#1#2#3#4}}\ (\texttt{U+#1#2#3#4})} %"
@@ -3109,7 +3202,7 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.}
 \subsection{Non-kanji characters in a control word}
 Because the engine differ, so non-kanji JIS~X~0208 characters
 which can be used in a control word differ in \pTeX, in \upTeX,~and~in \LuaTeX-ja.
-Table~\ref{table-kcat-diff} shows the difference.
+\autoref{tab:kcat-diff} shows the difference.
 Except for four characters ``・'',~``゛'', ``゜'',~``゠'',
 \LuaTeX-ja admits more characters in a control word than \upTeX.
 
@@ -3122,7 +3215,7 @@ For the detail, see \url{https://github.com/h-kitagawa/kct}.
 
 エンジンが異なるので,\pTeX, \upTeX, \LuaTeX-ja
 において制御綴中に使用可能なJIS~X~0208の文字は異なる.
-異なっているところだけを載せると,表\ref{table-kcat-diff}のようになる.
+異なっているところだけを載せると,\autoref{tab:kcat-diff}のようになる.
 「・」「゛」「゜」「゠」を除けば,\LuaTeX-jaでは\upTeX より多くの文字が
 制御綴に使用可能になっている.
 
@@ -3226,7 +3319,7 @@ Example&\obox{\yoko}&\obox{\tate}&\obox{\dtou}&\obox{\utod}\\
 \end{table}
 
 %<*en>
-\LuaTeX-ja supports four directions, as shown in Table~\ref{tab-dir}.
+\LuaTeX-ja supports four directions, as shown in \autoref{tab-dir}.
 The second column (\emph{yoko} direction) is just horizontal writing,
 and the third column (\emph{tate} direction) is vertical writing.
 The fourth column (\emph{dtou} direction) is actually a hidden feature of \pTeX.
@@ -3239,7 +3332,7 @@ only when the current list is null. Also, the direction of a math formula is cha
 %</en>
 
 %<*ja>
-\LuaTeX-jaがサポートする組方向は表\ref{tab-dir}に示す4つである.
+\LuaTeX-jaがサポートする組方向は\autoref{tab-dir}に示す4つである.
 4列目の \cs{dtou} は聞き慣れない命令だと思うが,
 実は\pTeX に同名の命令が(ドキュメントには書かれていないが)存在する.
 Down-TO-Upの意味なのだろう.\cs{dtou} を使用する機会はないだろうが,
@@ -3267,7 +3360,7 @@ The below is an example.
 また横組に戻る% yoko
 \end{LTXexample}
 
-Table~\ref{tab-diffdir} shows how a box is arranged when
+\autoref{tab-diffdir} shows how a box is arranged when
 the direction  inside the box and that outside the box differ.
 %</en>
 %<*ja>
@@ -3288,7 +3381,7 @@ the direction  inside the box and that outside the box differ.
 \end{LTXexample}
 
 異なる組方向のボックスを配置した場合にどう組まれるかの仕様も,\pTeX を
-踏襲している.表\ref{tab-diffdir}に示す.
+踏襲している.\autoref{tab-diffdir}に示す.
 %</ja>
 
 \begin{table}[t]
@@ -3601,7 +3694,7 @@ These commands set the dimension of \cs{box<num>}. One does not need
 \ltjsetwd42 20pt,  \ltjsetwd42=20pt,  \ltjsetwd=42 20pt,  \ltjsetwd=42=20pt
 \end{lstlisting}
 
-設定値は「横組」「縦組及び \cs{utod} 方向」「\cs{dtou} 方向」
+設定値は「横組」「縦組及びutod方向」「dtou方向」
 の3種ごとに独立して記録される.参考として,Gitリポジトリ内の
              \verb+test/test55-boxdim_diffdir.{tex,pdf}+ を挙げておく.
 
@@ -3875,10 +3968,10 @@ The following JFMs are shipped with \LuaTeX-ja:
 %</ja>
 \end{description}
 %<*en>
-The difference among these three~JFMs is  shown in Table~\ref{tab-difjfm}.
+The difference among these three~JFMs is  shown in \autoref{tab-difjfm}.
 %</en>
 %<*ja>
-これら3つのJFMの違いは表\ref{tab-difjfm}に示した.表中の文例の一部には,
+これら3つのJFMの違いは\autoref{tab-difjfm}に示した.表中の文例の一部には,
 \cite{min10}の図3,~4のものを用いた.
 %</ja>
 
@@ -3908,11 +4001,11 @@ Sometimes there is a need that \ldots.
 \item[jfmvar=<string>]
 標準では,JFMとサイズが同じで,
   実フォントだけが異なる2つの和文フォントは「区別されない」.例えば
-図\ref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが,
+\autoref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが,
 JFMもサイズも同じなので,普通に「)【」と入力した時と同じように半角空きとなる.
 
 しかし,JFMとサイズが同じであっても,\texttt{jfmvar} キーの異なる
-2つの和文フォント,例えば図\ref{fig:jfmvar}で言う \cs{F} と \cs{H},
+2つの和文フォント,例えば\autoref{fig:jfmvar}で言う \cs{F} と \cs{H},
 は「区別される」.異なる和文フォントに異なる \texttt{jfmvar} キーを割り当て,
 かつ\Param{differentjfm}パラメータを \texttt{both} に設定すれば,
 \pTeX と似た状況で組版されることになる.
@@ -3945,7 +4038,7 @@ JFMもサイズも同じなので,普通に「)【」と入力した時と
 Some fonts have information for inter-glyph spacing.
 This version of \LuaTeX-ja treats kerning spaces like an italic correction;
 any glue and/or kern from the JFM and a kerning space can coexist.
-See Figure~\ref{fig:kern-jfm} for detail.
+See \autoref{fig:kern-jfm} for detail.
 
 Note that in \cs{setmainjfont} etc.\ which are provided by \Pkg{luatexja-fontspec}
 package, kerning option is set \emph{off} (\texttt{Kerning=Off}) by default,
@@ -3956,7 +4049,7 @@ because of the compatibility with previous versions of \LuaTeX-ja.
 このカーニング情報は以前の\LuaTeX-ja とはあまり相性が良くなかったが,
 本バージョンではカーニングによる空白はイタリック補正と同様に扱うことになっている.
 つまり,カーニング由来の空白とJFM由来のグルー・カーンは同時に入りうる.
-図\ref{fig:kern-jfm}を参照.
+\autoref{fig:kern-jfm}を参照.
 \begin{itemize}
  \item \emph{\cs{jfont} や,
 NFSS2用の命令(\ref{ssec-chgfnt}節,\ref{ssec-nfsspat}節)における指定では
@@ -4041,12 +4134,12 @@ JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
 %<ja>\subsection{\cs{tfont} 命令}
 
 
+{\catcode`\<=12\catcode`\>=12
 \begin{table}[t]
 %<en>\caption{Differences between vertical JFMs shipped with \LuaTeX-ja}
 %<ja>\caption{\LuaTeX-ja に同梱されている縦組用 JFM の違い}
 %<en>\medskip
 \label{tab-difjfm-tate}
-\catcode`\<=12\catcode`\>=12
 \ltjsetparameter{jacharrange={+3}}
 \small
 \def\r#1#2{%
@@ -4083,6 +4176,7 @@ JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
 \end{minipage}
 \ltjsetparameter{jacharrange={-3}}
 \end{table}
+}
 
 %<*en>
 ...
@@ -4103,7 +4197,7 @@ JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
 \end{lstlisting}
  \item \ref{ssec-math}節で述べる,数式中の和文フォントには縦組用和文フォントは指定できない.
  \item \texttt{jfm=<name>}\ の部分には縦組用JFMを指定する.
-以下の縦組用JFMが\LuaTeX-jaには同梱されており,違いを表\ref{tab-difjfm-tate}に示した.
+以下の縦組用JFMが\LuaTeX-jaには同梱されており,違いを\autoref{tab-difjfm-tate}に示した.
 \begin{description}
 \item[\tt jfm-ujisv.lua] \LuaTeX-jaの標準縦組用JFMである.このJFMは\upTeX で
   用いられるUTF/OTFパッケージ用の和文用TFMである \verb+upnmlminr-v.tfm+ を
@@ -4394,7 +4488,7 @@ Direction of JFM&\textbf{\texttt{'yoko'} (horizontal)}&\multicolumn{1}{l}{\textb
 \end{table}
 Specify the width of characters in character class~$i$, the height, the depth and
 the amount of italic correction. All characters in character class~$i$ are regarded that its width, height, and depth are
-as values of these fields. The default values are shown in Table~\ref{tab-wid}.
+as values of these fields. The default values are shown in \autoref{tab-wid}.
 %</en>
 %<*ja>
 \begin{table}[t]
@@ -4431,7 +4525,7 @@ These fields are for adjusting the position of the ``real'' glyph. Legal
             treated as~0, and \texttt{align} field is treated as
             \texttt{'left'}.
 The effects of these 3~fields are indicated in
-Figures \ref{fig-pos}~and~\ref{fig-pos-tate}.
+\autoref{fig:pos}~and~\autoref{fig:pos-tate}.
 %</en>
 %<*ja>
 これらのフィールドは実際のグリフの位置を調整するためにある.
@@ -4439,8 +4533,8 @@ Figures \ref{fig-pos}~and~\ref{fig-pos-tate}.
 \texttt{'right'} のいずれかである.もしこれら3つのフィールドのうちの1つが省かれた
 場合,\texttt{left} と \texttt{down} は0,\texttt{align} フィールドは
 \ \texttt{'left'} であるものとして扱われる.
-これら3つのフィールドの意味については図\ref{fig-pos}(横組用和文フォント),
-図\ref{fig-pos-tate}(縦組用和文フォント)で説明する.
+これら3つのフィールドの意味については\autoref{fig:pos}(横組用和文フォント),
+\autoref{fig:pos-tate}(縦組用和文フォント)で説明する.
 %</ja>
 
 %<*en>
@@ -4557,7 +4651,7 @@ Furthermore, the glyph is shifted according to values of fields
 %<en>The position of the real glyph (horizontal Japanese fonts)
 %<ja>横組和文フォントにおける「実際の」グリフの位置
 }
-\label{fig-pos}
+\label{fig:pos}
 \end{figure}
 \begin{figure}[!tb]
 \begin{minipage}{0.4\textwidth}%
@@ -4638,7 +4732,7 @@ Furthermore, the glyph is shifted according to values of fields
 %<en>The position of the real glyph (vertical Japanese fonts)
 %<ja>縦組和文フォントにおける「実際の」グリフの位置
 }
-\label{fig-pos-tate}
+\label{fig:pos-tate}
 \end{figure}
 
 \item[kern={\{[$j$]=<kern>, [$j'$]=\{<kern>, [ratio=<ratio>]\}, ...\}}]
@@ -5004,7 +5098,7 @@ an external package is needed to support this in plain \TeX\ and
 
 %<*en>
 \LuaTeX-ja's handling of Japanese fonts in math formulas is similar;
-Table~\ref{tab-math} shows counterparts to \TeX's primitives for math
+\autoref{tab-math} shows counterparts to \TeX's primitives for math
 font families. There is no relation between the value of
 \cs{fam} and that of \cs{jfam}; with appropriate settings,
 you can set both \cs{fam} and \cs{jfam} to the same value.
@@ -5014,7 +5108,7 @@ a \emph{horizontal} Japanese font.
 %</en>
 %<*ja>
 \LuaTeX-jaの数式中での和文フォントの扱いも同様である.
-表\ref{tab-math}は数式フォントファミリに対する \TeX のプリミティブと対応する
+\autoref{tab-math}は数式フォントファミリに対する \TeX のプリミティブと対応する
 ものを示している.\cs{fam} と \cs{jfam} の値の間には関係はなく,
 適切な設定の下では \cs{fam} と \cs{jfam} の両方に同じ値を設定することができる.
 \Param{jatextfont} 他の第2引数<jfont\_cs>は,\cs{jfont} で定義された
@@ -5140,16 +5234,9 @@ For $i\in\omega$, \texttt{char\_type[$i$]} is information of characters whose cl
   0&\text{\texttt{'left'} (default)}\\0.5&\text{\tt 'middle'}\\1&\text{\tt 'right'}
  \end{cases}
 \]
-\item For $j\in \omega$, \texttt{[$j$]} stores a kern or a glue which will be inserted
-between character class~$i$ and class~$j$.
-
-If a kern will be inserted, the value of this field is \texttt{[$j$]=\{false, <kern\_node>, <ratio>\}},
-where <kern\_node> is a node\footnote{%
- This version of \LuaTeX-ja uses ``direct access
-      model'' for accessing nodes, if possible. }.
-If a glue will be inserted, we have \texttt{[$j$]=\{false, <spec\_node>, <ratio>, <icflag>\}},
-where <spec\_node> is also a node, and $\text{<icflag>}=\textit{from\_jfm}+\text{<priority>}$.
 \end{itemize}
+For $i$,~$j\in \omega$, \texttt{char\_type[$i$][$j$]} stores a kern or a glue which will be inserted
+between character class~$i$ and class~$j$.
 \end{description}
 %</en>
 %<*ja>
@@ -5182,23 +5269,34 @@ JFMで指定されているそれぞれの値をスケーリングしたもの
  \end{cases}
 \]
 のいずれかの値をとる.
-\item $j\in \omega$に対して,\texttt{[$j$]} は文字クラス$i$の文字と$j$の文字の間に挿入されるkern
-      やglueを格納している.
-間に入るものがkernであれば,このフィールドの値は\
-\texttt{[$j$]=\{false, <kern\_node>, <ratio>\}} である.
-<kern\_node>はkernを表すノードそのものである\footnote{%
+\end{itemize}
+$i$,~$j\in \omega$に対して,\texttt{char\_type[$i$][$j$]} は
+文字クラス$i$の文字と$j$の文字の間に挿入されるグルーやカーンを格納している.
+\begin{itemize}
+  \item 間に入るものがカーンであれば,この値は\
+\texttt{[$j$]=\{[1]=<kern\_node>, ratio=<ratio>\}} であり,
+<kern\_node>はカーンを表すノードそのものである\footnote{%
 本バージョンではノードのアクセス手法にdirect access
       modelを用いている.そのため,例えば\LuaTeX\ beta-0.78.2では,単なる自然数のようにし
       か見えないことに注意.
 }.
-glueであれば,\texttt{[$j$]=\{false, <spec\_node>, <ratio>, <icflag>\}} である.
-<spec\_node>はglueの長さを表すノードそのものであり,
-      $\text{<icflag>}=\textit{from\_jfm}+\text{<priority>}$である.
+  \item グルーであれば,この値は以下のキーを持つテーブルである.
+  \begin{description}
+    \item[\texttt{width}, \texttt{stretch}, \texttt{shrink}]
+    グルーのそれぞれ自然長,伸び量,縮み量をsp単位で表したもの.
+    \item[\texttt{priority}] (バージョン2以降の)JFMでの指定 \texttt{\{<stretch>,<shrink>\}} を
+    \[
+      (\text{<stretch>}+4)\cdot 8+\text{<shrink>}+4
+    \]
+    として0--63の整数にパックしたもの.
+    \item[\texttt{ratio}, \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch}, \texttt{kanjiskip\_shrink}]
+    JFM中の同名のフィールドの値がそのまま使われている.
+  \end{description}
 \end{itemize}
 \item[ascent\textrm{, }descent]
 ……
 \item[chars\_cbcache]
-……
+文字クラス決定の処理で.キャッシュとして使われる.
 \end{cslist}
 %</ja>
 
@@ -6037,6 +6135,65 @@ With the help of this example, we remark the specification of \cs{inhibitglue}:
 \end{itemize}
 
 
+\subsection{\cs{ltjfakeboxbdd}, \cs{ltjfakeparbegin}}
+%<*en>
+Sometimes \texttt{'parbdd'}~and~\texttt{'boxbdd'} specifications~look like ``fail'',
+especially in paragraphs inside list environments.
+This is because \cs{everypar} inserts some nodes such as boxes and kerns, so
+the ``first letter'' in a paragraph is in fact not the first letter.
+%</en>
+%<*ja>
+リスト環境内での\cs{item}で始まる各項目などでは,
+「段落最初の鍵括弧が余計に半角字下げされる」など,
+JFMにある\texttt{'parbdd'}, \texttt{'boxbdd'}の指定が見かけ上破綻していることがある.
+
+これは\TeX が\cs{everypar}を用いて段落開始時に記号類や空白などを挿入してしまっているため,
+段落最初の鍵括弧が実際には段落最初のノードではないことに起因する.以下に例を示した.
+%</ja>
+\begin{LTXexample}[width=0.3\textwidth]
+\parindent1\zw
+\noindent ああああああああ\par % for comparison
+「ああああああ \par            % normal paragraph
+
+\everypar{\null}
+「ああああああ \par            % ???
+\end{LTXexample}
+%<*en>
+\cs{ltjfakeboxbdd}~and~\cs{ltjfakeparbegin} primitives resolve this situation.
+\begin{itemize}
+  \item \cs{ltjfakeparbegin} creates a node which indicates
+  ``beginning of an indented paragraph'' to the insertion process of \textbf{JAglue}.
+ \item \cs{ltjfakeboxbdd} creates a node which indicates
+  ``beginning/ending of a box'' to the insertion process of \textbf{JAglue}.
+\end{itemize}
+As an example, the example above can be improved as follows:
+%</en>
+%<*ja>
+\cs{ltjfakeboxbdd}, \cs{ltjfakeparbegin}はこの状況を改善する命令である.
+実際には\cs{everypar}の末尾にこれらを追加するという使い方がほとんどになるだろう.
+\begin{itemize}
+  \item \cs{ltjfakeparbegin}は,実行された箇所が「インデントあり段落の開始」であると\LuaTeX-jaの
+  和文処理グルー挿入処理に認識させる.この命令の直前に\textbf{JAchar}があった場合,
+  この文字の後ろに入るグルー等の処理については未定義である
+  \footnote{%
+    この命令と同等の内容は,\cs{dirrctlua}の形で\Pkg{ltjsclasses}内で以前から使われていた.
+    一般ユーザでも利用しやすくするため,20170505.0版では新たに命令として定義した.
+  }.
+  \item \cs{ltjfakeboxbdd}は,実行された箇所が「ボックスの先頭と末尾」であると\LuaTeX-jaの
+  和文処理グルー挿入処理に認識させる.
+\end{itemize}
+例えば,先ほどの例に対して適用すると,次のようになる.
+%</ja>
+\begin{LTXexample}[width=0.3\textwidth]
+\parindent1\zw
+\noindent ああああああああ\par % for comparison
+「ああああああ \par            % normal paragraph
+
+\everypar{\null\ltjfakeparbegin}
+「ああああああ \par
+\end{LTXexample}
+
+
 \subsection{\cs{ltjdeclarealtfont}}
 \label{ssec-altfont}
 %<*en>
@@ -6373,7 +6530,7 @@ characters in <range> of the Japanese font (we say the \emph{base font})
 which specified by first 4 arguments are typeset
 by the Japanese font which specified by fifth to eighth arguments
 (we say the \emph{alternate font}).
-An example is shown in Figure~\ref{fig:altkanji}.
+An example is shown in \autoref{fig:altkanji}.
 
 \begin{itemize}
  \item
@@ -6593,6 +6750,40 @@ for example, the meaning of \cs{TU\cs{textquotedblleft}} is \cs{ltjalchar8220\lt
 \cs{TU\cs{textquotedblleft}}は \cs{ltjalchar8220\ltjalchar"2423 } という定義になっている.%"
 %</ja>
 
+\begin{table}[t]
+  \centering\small
+  \caption{strut}\label{tab:strutbox}
+  \begin{tabular}{llcccl}
+    \toprule
+    \textbf{box}&\textbf{direction}&\textbf{width}&\textbf{height}&\textbf{depth}
+    &\textbf{user command}\\
+    \midrule
+  \cs{ystrutbox}&yoko&0&0.7\cs{baselineskip}&0.3\cs{baselineskip}&\cs{ystrut}\\\midrule
+  \cs{tstrutbox}&tate, utod&0&0.5\cs{baselineskip}&0.5\cs{baselineskip}&\cs{tstrut}\\\midrule
+  \cs{dstrutbox}&dtou&0&0.7\cs{baselineskip}&0.3\cs{baselineskip}&\cs{dstrut}\\\midrule
+  \cs{zstrutbox}&---&0&0.7\cs{baselineskip}&0.3\cs{baselineskip}&\cs{zstrut}\\\bottomrule
+  \end{tabular}
+\end{table}
+%<*en>
+\subsection{\cs{strutbox}}
+As \pLaTeX~(2017/04/08 or later), \cs{strutbox} is \emph{a macro} which is expanded to one of
+\cs{ystrutbox},~\cs{tstrutbox},~and~\cs{dstrutbox}
+(all of them are shown in \autoref{tab:strutbox}), according to the current direction.
+Similarly, \cs{strut} now uses one of these boxes.
+%</en>
+%<*ja>
+\subsection{\cs{strutbox}}
+\pLaTeX~2017/04/08以降と同じように,
+\cs{strutbox}は現在の組方向によって\cs{ystrutbox}, \cs{tstrutbox}, \cs{dstrutbox}の
+いずれかに展開される\emph{マクロ}となっている(これらについては\autoref{tab:strutbox}参照).
+同様に\cs{strut}もこの3\nobreak ボックスのいずれかを組方向によって使い分けるようになっている.
+
+\cs{zstrutbox}はutod方向(\pTeX でいう縦数式ディレクション)で使われる支柱ボックスであるが,
+実際に使われるのは\cs{zstrut}が明示的に発行された時,そして
+\Pkg{lltjext}パッケージで追加される組方向指定で \texttt{<u>} を指定した時,および
+周囲が縦組の状況で \texttt{<z>} を指定した時に限られている.
+%</ja>
+
 %<*en>
 \section{Addon packages}
 \LuaTeX-ja has several addon packages.
@@ -6693,22 +6884,22 @@ The \texttt{TateFeatures} key specifies font features which are only turned~on i
 vertical writing, such as \texttt{Style=VerticalKana}~(\texttt{vkna} feature).
 Similarly, the \texttt{TateFont} key specifies the Japanese font which will be used only
             in vertical writing.
-A demonstrarion is shown in Figure~\ref{fig:yokotate-fontspec}.
+A demonstrarion is shown in \autoref{fig:yokotate-fontspec}.
 %</en>
 %<*ja>
 縦組において使用されるフォントや,縦組においてのみ適用されるフォント機能達を
-指定する.使用例は図\ref{fig:yokotate-fontspec}参照.
+指定する.使用例は\autoref{fig:yokotate-fontspec}参照.
 %</ja>
 
 \item[YokoFeatures=\{<features>\}]
 %<*en>
 The \texttt{YokoFeatures} key specifies font features which are only turned~on in
 horizontal writing,.
-A demonstrarion is shown in Figure~\ref{fig:yokotate-fontspec}.
+A demonstrarion is shown in \autoref{fig:yokotate-fontspec}.
 %</en>
 %<*ja>
 同様に,横組においてのみ適用されるフォント機能達を
-指定する.使用例は図\ref{fig:yokotate-fontspec}参照.
+指定する.使用例は\autoref{fig:yokotate-fontspec}参照.
 %</ja>
 
 
@@ -6757,11 +6948,11 @@ AltFont = {
 %<*en>
 Each sublist should have the \texttt{Range} key
 (sublist which does not contain \texttt{Range} key is simply ignored).
-A demonstrarion is shown in Figure~\ref{fig:altkanji-fontspec}.
+A demonstrarion is shown in \autoref{fig:altkanji-fontspec}.
 %</en>
 %<*ja>
 各部分リストには \texttt{Range} キーが必須である(含まれない部分リストは
-単純に無視される).指定例は図\ref{fig:altkanji-fontspec}に示した.
+単純に無視される).指定例は\autoref{fig:altkanji-fontspec}に示した.
 %</ja>
 \end{cslist}
 
@@ -6798,7 +6989,7 @@ one can specify \texttt{AltFont} inside \texttt{YokoFeatures},~\texttt{TateFeatu
 
 Note that features which are specified in \texttt{YokoFeatures}~and~\texttt{TateFeatures}
 are always interpreted \emph{after} other ``direction-independent'' features.
-This explains why \cs{addjfontfeatures} at~line~6 in~Figure~\ref{fig:yokotate-fontspec}
+This explains why \cs{addjfontfeatures} at~line~6 in~\autoref{fig:yokotate-fontspec}
 has no effect, because a color specification is already done in
 \texttt{YokoFeatures}~and~\texttt{TateFeatures} keys.
 %</en>
@@ -6830,7 +7021,7 @@ BoldFeatures = {
 指定することは可能であり.また\ \texttt{YokoFeatures},~\texttt{TateFeatures} キーの
 中身に \texttt{AltFont} を指定することができる.
 
-また,図\ref{fig:yokotate-fontspec}後半部では6行目の色の指定が効かず,
+また,\autoref{fig:yokotate-fontspec}後半部では6行目の色の指定が効かず,
 2行目で指定した\ \texttt{YokoFeatures},~\texttt{TateFeatures}\ による色の指定が有効になっ
 たままである.これは\emph{\ \texttt{YokoFeatures},~\texttt{TateFeatures}\ による
 OpenType機能指定は
@@ -6842,24 +7033,31 @@ OpenType機能指定は
 \subsection{\Pkg{luatexja-otf}}
 \label{ssec-ltjotf}
 %<*en>
-This optional package supports typesetting characters in
-Adobe-Japan1 character collection
-(or other CID character collection, if the font is supported).
+This optional package supports typesetting glyphs
+by specifying a CID number.
 The package \Pkg{luatexja-otf} offers the following 2~low-level
 commands:
 %</en>
 %<*ja>
-この追加パッケージはAdobe-Japan1(フォント自身が持っていれば,
-別のCID文字セットでも可)の文字の出力をサポートする.
+この追加パッケージはCID番号による文字の出力をサポートする.
 \Pkg{luatexja-otf}は以下の2つの低レベルコマンドを提供する:
 %</ja>
 \begin{cslist}
 \item[\cs{CID}\{<number>\}]
 %<*en>
-Typeset a character whose CID number is <number>.
+Typeset a glyph whose CID number is <number>.
+If the Japanese font is neither Adobe-Japan1,~Adobe-GB1, Adobe-CNS1,~nor~Adobe-Korea1 CID-keyed font,
+\LuaTeX-ja treats that <number> is a CID number of Adobe-Japan1 character collection,
+and tries to typeset a ``most suitable glyph''.
 %</en>
 %<*ja>
 CID番号が<number>の文字を出力する.
+もし現在の和文フォントがAdobe-Japan1,~Adobe-GB1, Adobe-CNS1,~Adobe-Korea1の
+  いずれのCID-keyed fontでもない場合,<number>はAdobe-Japan1のCID番号であると解釈し
+  「適切なグリフ」\footnote{%
+  例えばフォントにIVDコレクションAdobe-Japan1が含まれていれば,その情報を用いて
+  グリフを選択する.
+}を出力する.
 %</ja>
 
 \item[\cs{UTF}\{<hex\_number>\}]
@@ -6938,34 +7136,6 @@ JFMの\texttt{chars}テーブルのエントリとして \verb+'AJ1-xxx'+ の形
 正しく半角幅で組むために利用されている.
 %</ja>
 
-%<*en>
-\paragraph{IVS support}
-Recent fonts support Ideographic Variation Selector (IVS).
-\Pkg{luaotfload} and \Pkg{fontspec} packages used to be not supported IVS,
-so we implemented experimental IVS support in \Pkg{luatexja-otf},
-which is activated by
-\begin{lstlisting}
-\directlua{luatexja.otf.enable_ivs()}
-\end{lstlisting}
-However, recent \Pkg{luaotfload} and \Pkg{fontspec} packages seem to support IVS,
-so we don't execute above command anymore.
-%</en>
-%<*ja>
-\paragraph{IVSサポート}
-最近のOpenTypeフォントやTrueTypeフォントには,
-\texttt{U+E0100}--\texttt{U+E01EF}の範囲の「文字」
-(漢字用異体字セレクタ)を後置することによって
-字形を指定する仕組み(IVS)が含まれている.
-執筆時点の2013年12月では,\Pkg{luaotfload}や\Pkg{fontspec}パッケージ類は
-IVSに対応してはいないようであったため,
-\Pkg{luatexja-otf}パッケージ内に試験的なIVS対応を実装した.これは以下の命令の実行で有効になる:
-\begin{lstlisting}
-\directlua{luatexja.otf.enable_ivs()}
-\end{lstlisting}
-しかし,現在の\Pkg{luaotfload}や\Pkg{fontspec}パッケージは
-IVSに対応しているようであるので,もはや上の命令を実行する必要はない.
-%</ja>
-
 \subsection{\Pkg{luatexja-adjust}}
 \label{ssec-adj}
 \begin{figure}[t]
@@ -7003,8 +7173,8 @@ with priority&%
 Note: the value of
 \Param{kanjiskip} is 0\,pt${}^{+1/5\,\mathrm{em}}_{-1/5\,\mathrm{em}}$ in this figure,
 for making the difference obvious.
-%<ja>\caption{行長調整}\label{fig-adj}
-%<en>\caption{Line adjustment}\label{fig-adj}
+%<ja>\caption{行長調整}\label{fig:adj}
+%<en>\caption{Line adjustment}\label{fig:adj}
 \end{figure}
 
 
@@ -7037,11 +7207,11 @@ for making the difference obvious.
   
 \item[優先順位付きの行長調整]
 \pTeX では,行長調整において優先度の概念が存在しなかったため,図
-\ref{fig-adj}上段における半角分の半端は,図\ref{fig-adj}中段のように,鍵
+\ref{fig:adj}上段における半角分の半端は,\autoref{fig:adj}中段のように,鍵
 括弧周辺の空白と和文間空白(\Param{kanjiskip})の両方によって負担される.し
 かし,「日本語組版処理の要件」\cite{jlreq}やJIS~X~4051~\cite{x4051}におい
 ては,このような状況では半端は鍵括弧周辺の空白のみで負担し,その他の和文
-文字はベタ組で組まれる(図\ref{fig-adj}下段)ことになっている.
+文字はベタ組で組まれる(\autoref{fig:adj}下段)ことになっている.
 \Pkg{luatexja-adjust}パッケージの提供する第2の機能は,
 \cite{jlreq}や\cite{x4051}における規定のような,優先順位付き
 の行長調整である.
@@ -7949,7 +8119,7 @@ as in \Pkg{luatexja-adjust}.
 
 %<*en>
 \paragraph{Setting parameters}
-Figure~\ref{fig:setpar-def} shows the \emph{most outer} definition of
+\autoref{fig:setpar-def} shows the \emph{most outer} definition of
 two commands,
 \cs{ltjsetparameter} and \cs{ltjglobalsetparameter}.
 Most important part is the last \cs{setkeys},
@@ -7976,7 +8146,7 @@ but also by the value of \cs{globaldefs}.
 %</en>
 %<*ja>
 \paragraph{パラメータの設定}
-\cs{ltjsetparameter} と,\cs{ltjglobalsetparameter} の定義は図\ref{fig:setpar-def}の
+\cs{ltjsetparameter} と,\cs{ltjglobalsetparameter} の定義は\autoref{fig:setpar-def}の
 のようになっている.
 本質的なのは最後の \cs{setkeys} で,これは\Pkg{xkeyval}パッケージの提供する命令である.
 
@@ -8089,7 +8259,7 @@ internal states are as follows:
 The first three states---$N$,~$S$, and~$M$---are as same as \TeX's input
 processor.  State~$K$ is similar to state~$M$, and is entered after
 Japanese characters.  The diagram of state transitions are indicated in
-Figure~\ref{fig-ptexipro}.  Note that \pTeX\ doesn't leave state~$K$
+\autoref{fig:ptexipro}.  Note that \pTeX\ doesn't leave state~$K$
 after ``beginning/ending of a group'' characters.
 %</en>
 
@@ -8108,7 +8278,7 @@ after ``beginning/ending of a group'' characters.
 \item State~$M$: 行中.
 \item State~$K$: 行中(和文文字の後).
 \end{itemize}
-また,状態遷移は,図\ref{fig-ptexipro}のようになっており,図中の数字は
+また,状態遷移は,\autoref{fig:ptexipro}のようになっており,図中の数字は
 カテゴリーコードを表している.最初の3状態は\TeX の入力処理部と同じであり,
 図中から状態$K$と「$j$」と書かれた矢印を取り除けば,\TeX の入力処理部と同
 じものになる.
@@ -8190,7 +8360,7 @@ to State~$M$ (middle of line) sometimes.
 \end{itemize}
 %<en>\caption{State transitions of \pTeX's input processor}
 %<ja>\caption{\pTeX の入力処理部の状態遷移}
-\label{fig-ptexipro}
+\label{fig:ptexipro}
 \end{figure}
 
 
@@ -8826,7 +8996,7 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K]
 \end{table}
 
 \subsection{その他の場合}
-本節の内容は表\ref{tab-jfmglue}にまとめてある.
+本節の内容は\autoref{tab-jfmglue}にまとめてある.
 
 \paragraph{和文Aと欧文の間}
 \textit{Nq}が\textsf{和文A}で,\textit{Np}が\textsf{欧文}の場合,JFMグルー挿入処理は次のようにして行われる.
@@ -9016,7 +9186,7 @@ $d = \max(\texttt{depth} - \texttt{yoffset}, 0)$,
 $h = \max(\texttt{height} + \texttt{yoffset}, 0)$, $d=\texttt{depth}$.
 \end{description}
 という仕様になっている.つまり,\texttt{yoffset} が負(グリフを下ける)の場合に深さは増加しな
-い(表\ref{tab:yoffset_and_im}参照).
+い(\autoref{tab:yoffset_and_im}参照).
 
 \begin{table}[t]
 \caption{\texttt{yoffset} and imaginary body}
@@ -9722,7 +9892,7 @@ CMapが必要である.
 
 \pageref{para-cid}ページで述べたように,\texttt{cid}キーを使って
 非埋め込みの中国語・韓国語フォントを定義する場合,同様のキャッシュが生成される.
-キャッシュの名称,必要となるCMapについては表\ref{tab:cid-cache}を参照して欲しい.
+キャッシュの名称,必要となるCMapについては\autoref{tab:cid-cache}を参照して欲しい.
 
 \item[extra\_***.lua]
 フォント``\texttt{***}''における異体字セレクタの情報,縦組用字形への変換テーブル,そして
@@ -9740,7 +9910,7 @@ It is created from three CMaps, \texttt{UniJIS2004-UTF32-\{H,V\}} and
             \texttt{Adobe-Japan1-UCS2},
 and this is why these two CMaps are needed in the first run of \LuaTeX-ja.
 
-Similar caches are created as Table~\ref{tab:cid-cache},
+Similar caches are created as \autoref{tab:cid-cache},
 if you specified \texttt{cid} key in \cs{jfont}
 to use other CID-keyed non-embedded fonts for Chinese or Korean,
 as in Page~\pageref{para-cid}.