OSDN Git Service

Update the manual.
[luatex-ja/luatexja.git] / doc / luatexja.dtx
index 556a63f..b1ca377 100644 (file)
@@ -1,17 +1,39 @@
-%#! lualatex -shell-escape manual.ins
+%<*!showexpl>
+%#! lualatex -shell-escape
 
-%<*en>
-\documentclass[a4paper,titlepage]{article}
-\usepackage[margin=25mm,footskip=5mm]{geometry}
+%<en> \documentclass[a4paper,titlepage]{article}
+%<ja> \documentclass[a4paper,titlepage]{ltjsarticle}
+%<zh> \documentclass[a4paper,titlepage]{ltjsarticle}
+
+%%%%%%%%
+\makeatletter
+%%%%%%%%
+
+%%%%%%%% record loaded packages
+\let\ltjpkglist\empty
+\newif\if@real@append@list
+\def\@append@newentry#1#2{{%
+  \@real@append@listtrue \def\@tempa{#2}%
+  \let\@pkglist\@append@newentry@pkglist#1%
+  \if@real@append@list
+    \let\@pkglist=\relax\xdef#1{#1\@pkglist{#2}}%
+  \fi}}
+\def\@append@newentry@pkglist#1{%
+  \def\@tempb{#1}%
+  \ifx\@tempa\@tempb\@real@append@listfalse\fi}
+\def\@addtofilelist#1{\@append@newentry\ltjpkglist{#1}}
+\let\@listfiles\empty
+
+%<*en>
+\usepackage[margin=25mm,footskip=6mm]{geometry}
+\parskip=\smallskipamount
 %</en>
 %<*ja>
-\documentclass[a4paper,titlepage]{ltjsarticle}
-\usepackage[margin=25mm, footskip=5mm]{geometry}
+\usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry}
 \advance\leftmargini-1\zw\advance\leftmarginii-1\zw
 %</ja>
 %<*zh>
-\documentclass[a4paper,titlepage]{ltjsarticle}
-\usepackage[margin=25mm, footskip=5mm]{geometry}
+\usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry}
 \advance\leftmargini-1\zw\advance\leftmarginii-1\zw
 \def\postpartname{编}
 \DeclareYokoKanjiEncoding{ZH}{}{}
 \SetSymbolFont{songti}{bold}{ZH}{hei}{m}{n}
 \DeclareSymbolFontAlphabet{\mathsong}{songti}
 \DeclareMathAlphabet{\mathhei}{ZH}{hei}{m}{n}
-\makeatletter
 \DeclareRobustCommand\songfamily{\not@math@alphabet\songfamily\mathsong\kanjifamily\songdefault\selectfont}
 \DeclareRobustCommand\heifamily{\not@math@alphabet\heifamily\mathhei\kanjifamily\heidefault\selectfont}
 \DeclareRobustCommand\minchofamily{\not@math@alphabet\minchofamily\mathhei\kanjifamily\minchodefault\selectfont}
 \DeclareRobustCommand\rmfamily{\not@math@alphabet\rmfamily\mathrm\romanfamily\rmdefault\kanjifamily\songdefault\selectfont}
 \DeclareRobustCommand\sffamily{\not@math@alphabet\sffamily\mathsf\romanfamily\sfdefault\kanjifamily\heidefault\selectfont}
-\makeatother
 %</zh>
 
-\usepackage{amsmath,amssymb,xcolor,pict2e,multienum,amsthm,float,makecell}
-\usepackage{mathptmx}
-\usepackage{booktabs,listings,showexpl,multicol}
-\usepackage{luatexja-otf}
-\usepackage{luatexja-fontspec}
+\usepackage{amsmath,tikz,pict2e,multienum,float}
+\usepackage{booktabs,multicol}
+
+%%%%%%%% listings
+\usepackage{listings,showexpl}
+\lstset{
+  basicstyle=\ttfamily\small, pos=r, breaklines=true,
+  numbers=none, rframe={}, basewidth=0.5em, numberstyle=\tiny, numbersep=0.5em,
+  explpreset={numberstyle=\tiny, numbers=left, numbersep=1em}
+}
+% Suppress output from showexpl to stdout.
+\let\SX@Info\relax
+
+%%%%%%%% hyperref
 \usepackage{hyperref}
+%<*en>
+\title{The \LuaTeX-ja package}
+\author{The \LuaTeX-ja project team}
+%</en>
+%<*ja>
+\title{\LuaTeX-jaパッケージ}
+\author{\LuaTeX-jaプロジェクトチーム}
+%</ja>
+%<*zh>
+\title{\LuaTeX-ja宏包}
+\author{\LuaTeX-ja项目团队}
+%</zh>
 \hypersetup{%
        unicode,
        colorlinks,
        pdftitle={LuaTeX-ja宏包}
 %</zh>
 }
-\usepackage[all]{xy}
-%<ja> \SelectTips{cm}{}
+
+%%%%%%%% definition env.
+\usepackage{amsthm}
+\theoremstyle{definition}
+%<en>\newtheorem{defn}{Definition}
+%<ja>\newtheorem{defn}{定義}
+%<zh>\newtheorem{defn}{定义}
+
+%%%%%%%% fonts
+\usepackage{luatexja-otf}
+\usepackage[jis2004]{luatexja-preset}
+%<!en>\usepackage{amssymb}
 %<*en>
-\usepackage{mathptmx}
+\usepackage{unicode-math}
 \setmainfont[Ligatures=TeX]{TeX Gyre Termes}
 \setsansfont[Ligatures=TeX]{TeX Gyre Heros}
+\setmathfont{xits-math.otf}
 \frenchspacing
 %</en>
-\def\labelenumii{(\arabic{enumii})}
 
+%%%%%%%% logo
+\usepackage{metalogo}
 \DeclareRobustCommand\eTeX{\ensuremath{\varepsilon}-\kern-.125em\TeX}
 \DeclareRobustCommand\LuaTeX{Lua\TeX}
 \DeclareRobustCommand\pdfTeX{pdf\TeX}
 \DeclareRobustCommand\pLaTeXe{p\kern-.05em\LaTeXe}
 \DeclareRobustCommand\epTeX{\ensuremath{\varepsilon}-\kern-.125em\pTeX}
 
-\theoremstyle{definition}
-%<en>\newtheorem{defn}{Definition}
-%<ja>\newtheorem{defn}{定義}
-%<zh>\newtheorem{defn}{定义}
-
+%%%%%%%% other macros
 \newenvironment{cslist}{%
   \leftskip2em\parindent=0pt\def\makelabel##1{{\tt\char92##1}}
   \def\{{\char`\{}\def\}{\char`\}}
   \def\item[##1]{\par\smallskip\par\hskip-\leftskip\makelabel{##1}\par}
 }{}
 
-\makeatletter
+\def\labelenumii{(\arabic{enumii})}
 \long\def\@makecaption#1#2{%
   \vskip\abovecaptionskip
   \sbox\@tempboxa{{\small #1. #2}}%
     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
   \fi
   \vskip\belowcaptionskip}
-% Suppress output from showexpl to stdout.
-\let\SX@Info\relax
+
+%%%%%%%%
 \makeatother
+%%%%%%%%
 
 \def\Node#1#2{\,\vcenter{\hbox{\fboxsep=1pt\fbox{\vbox{\small\halign{\hfil##\hfil\cr
   #1\mathstrut\cr\noalign{\hrule height.4pt}\strut#2\cr}}}}\,}}
 
-%<*en>
-\title{The \LuaTeX-ja package}
-\author{The \LuaTeX-ja project team}
-%</en>
-%<*ja>
-\title{\LuaTeX-jaパッケージ}
-\author{\LuaTeX-jaプロジェクトチーム}
-%</ja>
-%<*zh>
-\title{\LuaTeX-ja宏包}
-\author{\LuaTeX-ja项目团队}
-%</zh>
-\lstset{
-  basicstyle=\ttfamily\small, pos=r, breaklines=true,
-  numbers=none, rframe={}, basewidth=0.5em
-}
-
-\parskip=\smallskipamount
 \protected\def\Param#1{\textsf{#1}} % parameter name
 \protected\def\Pkg#1{\underline{\smash{\texttt{#1}}}} % packages/classes
 
+
 \begin{document}
 \catcode`\<=13
 \def<#1>{{\normalfont\rm\itshape$\langle$#1$\rangle$}}
@@ -305,8 +338,11 @@ The followings are major changes from \pTeX:
       `variation'.
 %</en>
 %<*ja>
-\item 和文フォントは(小塚明朝,IPA明朝などの)実際のフォント,和文フォントメトリック(JFMと呼ぶ),そ
-      して`variation'と呼ばれる文字列の組である.
+\item 和文フォントは(小塚明朝,IPA明朝などの)実際のフォント,和文フォン
+      トメトリック(JFMと呼ぶ\footnote{混乱を防ぐため,p\TeX の意味での
+      JFM (\texttt{min10.tfm}) などは本ドキュメントでは\textbf{和文用
+      TFM}とよぶことにする.}),そして`variation'と呼ばれる文字列の組で
+      ある.
 %</ja>
 %<*zh>
 \item 一个日文字体是由三部分构成的元组:实际的字体(如小塚明
@@ -417,6 +453,12 @@ The followings are major changes from \pTeX:
 %</zh>
 \end{itemize}
 
+%<*ja>
+\item \LuaTeX-jaでは,\pTeX と同様に漢字・仮名を制御綴内に用いることができ,
+\verb+\西暦+ などが正しく動作するようにしている.
+但し,制御綴中に使える和文文字が\pTeX・\upTeX と全く同じではないことに注意すること.
+%</ja>
+
 %<*en>
 \item At the present, vertical typesetting (\emph{tategaki}), is not
       supported in \LuaTeX-ja.
@@ -442,7 +484,7 @@ For detailed information, see Part~\ref{part-imp}.
 
 %<en>\subsection{Notations}
 %<ja>\subsection{用語と記法}
-%<zh>\subsection{一些约定} 
+%<zh>\subsection{一些约定}
 
 
 %<*en>
@@ -521,7 +563,7 @@ We say `alphabetic fonts' for fonts used in \textbf{ALchar}, and `Japanese fonts
       means a package or a class of \LaTeX.
 %</en>
 %<*ja>
-\item ä¸\8bç·\9aä»\98ã\81\8dã\81®ã\82¿ã\82¤ã\83\97ã\83©ã\82¤ã\82¿ä½\93ã\81§æ\9b¸ã\81\8bã\82\8cã\81\9f語(例:\Pkg{fontspec})は\LaTeX の
+\item ä¸\8bç·\9aä»\98ã\81\8dã\82¿ã\82¤ã\83\97ã\83©ã\82¤ã\82¿ä½\93ã\81®語(例:\Pkg{fontspec})は\LaTeX の
       パッケージやクラスを表す.
 %</ja>
 %<*zh>
@@ -816,7 +858,6 @@ But only the contents in \texttt{src/} are needed to work \LuaTeX-ja.
 %</zh>
 \end{enumerate}
 
-
 %<en>\subsection{Cautions}
 %<ja>\subsection{注意点}
 %<zh>\subsection{注意}
@@ -866,7 +907,7 @@ This does minimal settings (like \texttt{ptex.tex}) for typesetting Japanese doc
 \begin{itemize}
 %<*en>
 \item The following 6~Japanese fonts are preloaded:
-\begin{center}
+\begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 \textbf{classification}&\textbf{font name}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
@@ -878,7 +919,7 @@ This does minimal settings (like \texttt{ptex.tex}) for typesetting Japanese doc
 %</en>
 %<*ja>
 \item 以下の6つの和文フォントが定義される:
-\begin{center}
+\begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 \textbf{字体}&\textbf{フォント名}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
@@ -890,7 +931,7 @@ This does minimal settings (like \texttt{ptex.tex}) for typesetting Japanese doc
 %</ja>
 %<*zh>
 \item 提前加载了六种日文字体,如下:
-\begin{center}
+\begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 \textbf{字体}&\textbf{字体名}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
@@ -902,20 +943,6 @@ This does minimal settings (like \texttt{ptex.tex}) for typesetting Japanese doc
 %</zh>
 \begin{itemize}
 %<*en>
-\item The `Q(級)' is a unit used in Japanese phototypesetting, and
-      $1\,\textrm{Q}=0.25\,\textrm{mm}$. This length is stored in a
-      dimension \verb+\jQ+.
-%</en>
-%<*ja>
-\item `Q(級)'は日本の写植で用いられる単位で,$1\,\textrm{Q}=0.25\,\textrm{mm}$
-      である.この長さは \verb+\jQ+ に保持されている.
-%</ja>
-%<*zh>
-\item “Q(级)”是日本照排中使用的尺寸单位,$1 \mathrm{Q} = 0.25\mathrm{mm}$。
-该长度保存在长度\verb!\jQ!中。
-%</zh>
-
-%<*en>
 \item It is widely accepted that the font `Ryumin-Light' and
       `GothicBBB-Medium' aren't embedded into PDF files, and PDF reader
       substitute them by some external Japanese fonts (\textit{e.g.},
@@ -1020,7 +1047,7 @@ When vertical typesetting is supported by \LuaTeX-ja in the future, \texttt{JT3}
 
 %<*en>
 \item Two font families \texttt{mc} and \texttt{gt} are defined:
-\begin{center}
+\begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 \textbf{classification}&\textbf{family}&\verb+\mdseries+&\verb+\bfseries+&\textbf{scale}\\\midrule
@@ -1035,7 +1062,7 @@ and GothicBBB-Medium) in early years of DTP.
 %</en>
 %<*ja>
 \item 2つのフォントファミリ\texttt{mc}と\texttt{gt}が定義されている:
-\begin{center}
+\begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 \textbf{字体}&\textbf{ファミリ}&\verb+\mdseries+&\verb+\bfseries+&\textbf{スケール}\\\midrule
@@ -1051,7 +1078,7 @@ Ryumin-Light, GothicBBB-Mediumだった)しか利用できなかった時の
 %</ja>
 %<*zh>
 \item 定义了两个字体族:\texttt{mc}!和\texttt{gt}:\\
-\begin{center}
+\begin{center}\small
        \begin{tabular}{ccccc}
        \hline
        \textbf{字体}&\textbf{字体族}&\verb!\mdseries!&\verb!\bfseries!&缩放率\\
@@ -1099,161 +1126,35 @@ Okumura), namely, \Pkg{ltjclasses} and \Pkg{ltjsclasses}.
 (奥村晴彦)的文档类,即\Pkg{ltjclasses}和\Pkg{ltjsclasses}。
 %</zh>
 
-%<*en>
-\paragraph{\texttt{\char92 CID}, \texttt{\char92 UTF} and macros in OTF package}
-Under \pLaTeX, \Pkg{otf} package (developed by Shuzaburo Saito) is
-used for typesetting characters which is in Adobe-Japan1-6 CID but not
-in JIS~X~0208. Since this package is widely used, \LuaTeX-ja
-supports some of functions in \Pkg{otf} package.
-If you want to use these functions, load \Pkg{luatexja-otf} package.
-%</en>
-%<*ja>
-\paragraph{\texttt{\char92 CID}, \texttt{\char92 UTF}とOTFパッケージのマクロ}
-\pLaTeX では,JIS~X~0208にないAdobe-Japan1-6の文字を出力するために,
-齋藤修三郎氏による\Pkg{otf}パッケージが用いられていた.このパッケージは
-広く用いられているため,\LuaTeX-jaにおいても\Pkg{otf}パッケージの機能の
-一部をサポートしている.これらの機能を用いるためには\Pkg{luatexja-otf}パッケージ
-を読み込めばよい.
-%</ja>
-%<*zh>
-\paragraph{OTF包中的\texttt{\char92CID},\texttt{\char92UTF}及其他宏} 
-\pLaTeX 下,\underline{\texttt{otf}}宏包(斋藤修三郎开发)是用来排印存在
-于Adobe-Japan1-6但不存在于JIS X 0208中的字符。
-该包已经广泛使用,\LuaTeX-ja支持部分\Pkg{otf}包中的部分功能。
-如果你想使用这些功能,加载\Pkg{luatexja-otf}宏包。
-\bgroup
-\fontencoding{JY3}\selectfont
-%</zh>
-
-\begin{LTXexample}
-森\UTF{9DD7}外と内田百\UTF{9592}とが\UTF{9AD9}島屋に行く。
-
-\CID{7652}飾区の\CID{13706}野家,
-葛飾区の吉野家
-\end{LTXexample}
-%<*zh>
-\egroup
-%</zh>
+%<en>\section{Changing Fonts}
+%<ja>\section{フォントの変更}
+%<zh>\section{字体更改}
 
-%<en>\subsection{Changing Fonts}
-%<ja>\subsection{フォントの変更}
-%<zh>\subsection{字体更改}
+\subsection{plain \TeX~and~\LaTeXe}
 \label{ssub-chgfnt}
 
-%<*en>
-\paragraph{Remark: Japanese Characters in Math Mode}
-Since \pTeX\ supports Japanese characters in math mode, there are
-sources like the following:
-%</en>
-%<*ja>
-\paragraph{意見:数式モード中の和文文字}
-\pTeX では,特に何もしないでも数式中に和文文字を記述することができた.そのため,
-以下のようなソースが見られた:
-%</ja>
-%<*zh>
-\paragraph{注记:数学模式下的日文字符}
-\pTeX 支持在数学模式下的日文字符,如以下源码:
-%</zh>
-
-\begin{LTXexample}
-$f_{高温}$~($f_{\text{high temperature}}$).
-\[ y=(x-1)^2+2\quad よって\quad y>0 \]
-$5\in 素:=\{\,p\in\mathbb N:\text{$p$ is a prime}\,\}$.
-\end{LTXexample}
-%<*en>
-We (the project members of \LuaTeX-ja) think that using
-Japanese characters in math mode are allowed if and only if these are used as identifiers.
-In this point of view,
-%</en>
-%<*ja>
-\LuaTeX-jaプロジェクトでは,数式モード中での和文文字はそれらが識別子として用いられる
-ときのみ許されると考えている.
-この観点から,
-%</ja>
-%<*zh>
-我们(\LuaTeX-ja项目成员)认为在数学模式下使用日文字符,只有在这些字符充当标识符时才是正确的。在这点下:
-%</zh>
-\begin{itemize}
-%<*en>
-\item The lines 1~and~2 above are not correct, since `高温' in above is used as a textual label, and
-`よって' is used as a conjunction.
-%</en>
-%<*ja>
-\item 上記数式のうち1, 2行目は正しくない.なぜならば`高温'が意味のあるラベルと
-      して,`よって'が接続詞として用いられているからである.
-%</ja>
-%<*zh>
-\item 第1行和第2行是不正确的,因为“高温”的作用为文本标签,“よって”用作为连词。
-%</zh>
-%<*en>
-\item However, the line~3 is correct, since `素' is used as an identifier.
-%</en>
-%<*ja>
-\item しかしながら,3行目は`素'が識別子として用いられているので正しい.
-%</ja>
-%<*zh>
-\item 不过,第3行是正确的,因为“素”是作为标识符的。
-%</zh>
-\end{itemize}
-%<*en>
-Hence, in our opinion, the above input should be corrected as:
-%</en>
-%<*ja>
-したがって,\LuaTeX-jaプロジェクトの意見としては,上記の入力は次のように直されるべき
-である:
-%</ja>
-%<*zh>
-那么,根据我们的观点,上述输入应当校正为:
-%</zh>
-\begin{LTXexample}
-$f_{\text{高温}}$~%
-($f_{\text{high temperature}}$).
-\[ y=(x-1)^2+2\quad
-  \mathrel{\text{よって}}\quad y>0 \]
-$5\in 素:=\{\,p\in\mathbb N:\text{$p$ is a prime}\,\}$.
-\end{LTXexample}
-%BUG?: \{\}がなければ「素」がでない.上の段落の「よって」もでてない.
-%<*en>
-We also believe that using Japanese characters as identifiers is rare,
-hence we don't describe how to change Japanese fonts in math mode in
-this chapter. For the method, please see Subsection~\ref{ssec-math}.
-%</en>
-%<*ja>
-また\LuaTeX-jaプロジェクトでは,和文文字が識別子として用いられることはほとんどない
-と考えており,したがってこの節では数式モード中の和文フォントを変更する方法については
-記述しない.この方法については\ref{ssec-math}節を参照のこと.
-%</ja>
-%<*zh>
-我们也认为使用日文字符作为标识符的情况极为少见,所以我们不在此章节描述如何在数学模式下改变日文字体。
-关于此方法,请参见\ref{ssec-math}。
-%</zh>
-
-%<*en>
 \paragraph{plain \TeX}
+%<*en>
 To change Japanese fonts in plain \TeX, you must use the primitive
 \verb+\jfont+. So please see Subsection~\ref{ssec-jfont}.
 %</en>
 %<*ja>
-\paragraph{plain \TeX}
-plain \TeX で和文フォントを変更するためには,\verb+\jfont+ プリミティブを用いなけれ
-ばならない.\ref{ssec-jfont}節を参照.
+plain \TeX で和文フォントを変更するためには,\verb+\jfont+ プリミティブを直接用いる.
+\ref{ssec-jfont}節を参照.
 %</ja>
 %<*zh>
-\paragraph{plain \TeX} 
 在plain \TeX 下改变日文字体,你必须使用基本语句\verb!\jfont!。请参见\ref{ssec-jfont}。
 %</zh>
 
+\paragraph{\LaTeXe\ (NFSS2)}
 %<*en>
-\paragraph{NFSS2}
 For \LaTeXe, \LuaTeX-ja adopted most of the font selection system of \pLaTeXe\ (in \texttt{plfonts.dtx}).
 %</en>
 %<*ja>
-\paragraph{NFSS2}
 \LaTeXe については,\LuaTeX-jaではフォント選択システムを\pLaTeXe\ (\texttt{plfonts.dtx})
 の大部分をそのまま採用している.
 %</ja>
 %<*zh>
-\paragraph{NFSS2}
 对于\LaTeXe,\LuaTeX-ja采用了\pLaTeXe 中(即\texttt{plfonts.dtx})大部分字体选择系统。
 %</zh>
 \begin{itemize}
@@ -1286,7 +1187,7 @@ For \LaTeXe, \LuaTeX-ja adopted most of the font selection system of \pLaTeXe\ (
 %</zh>
 
 %<*en>
-\begin{center}
+\begin{center}\small
 \begin{tabular}{cccccc}
 \toprule
 &\textbf{encoding}&\textbf{family}&\textbf{series}&\textbf{shape}&\textbf{selection}\\\midrule
@@ -1303,14 +1204,14 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
 \end{center}
 %</en>
 %<*ja>
-\begin{center}
+\begin{center}\small
 \begin{tabular}{cccccc}
 \toprule
 &\textbf{エンコーディング}&\textbf{ファミリ}&\textbf{シリーズ}&\textbf{シェープ}&\textbf{選択}\\\midrule
-欧文フォント
+欧文
 &\verb+\romanencoding+&\verb+\romanfamily+&\verb+\romanseries+&\verb+\romanshape+
 &\verb+\useroman+\\
-和文フォント
+和文
 &\verb+\kanjiencoding+&\verb+\kanjifamily+&\verb+\kanjiseries+&\verb+\kanjishape+
 &\verb+\usekanji+\\
 両方&---&--&\verb+\fontseries+&\verb+\fontshape+&---\\
@@ -1320,7 +1221,7 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
 \end{center}
 %</ja>
 %<*zh>
-\begin{center}
+\begin{center}\small
 \begin{tabular}{cccccc}
 \toprule
 &\textbf{编码}&\textbf{族}&\textbf{系列}&\textbf{形状}&\textbf{选择}\\\midrule
@@ -1380,6 +1281,94 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
 %</zh>
 \end{itemize}
 
+%<*en>
+\paragraph{Remark: Japanese Characters in Math Mode}
+Since \pTeX\ supports Japanese characters in math mode, there are
+sources like the following:
+%</en>
+%<*ja>
+\paragraph{注意:数式モード中の和文文字}
+\pTeX では,特に何もしないでも数式中に和文文字を記述することができた.そのため,
+以下のようなソースが見られた:
+%</ja>
+%<*zh>
+\paragraph{注记:数学模式下的日文字符}
+\pTeX 支持在数学模式下的日文字符,如以下源码:
+%</zh>
+
+\begin{LTXexample}
+$f_{高温}$~($f_{\text{high temperature}}$).
+\[ y=(x-1)^2+2\quad よって\quad y>0 \]
+$5\in 素:=\{\,p\in\mathbb N:\text{$p$ is a prime}\,\}$.
+\end{LTXexample}
+%<*en>
+We (the project members of \LuaTeX-ja) think that using
+Japanese characters in math mode are allowed if and only if these are used as identifiers.
+In this point of view,
+%</en>
+%<*ja>
+\LuaTeX-jaプロジェクトでは,数式モード中での和文文字はそれらが識別子として用いられる
+ときのみ許されると考えている.
+この観点から,
+%</ja>
+%<*zh>
+我们(\LuaTeX-ja项目成员)认为在数学模式下使用日文字符,只有在这些字符充当标识符时才是正确的。在这点下:
+%</zh>
+\begin{itemize}
+%<*en>
+\item The lines 1~and~2 above are not correct, since `高温' in above is used as a textual label, and
+`よって' is used as a conjunction.
+%</en>
+%<*ja>
+\item 上記数式のうち1, 2行目は正しくない.なぜならば`高温'が意味のあるラベルと
+      して,`よって'が接続詞として用いられているからである.
+%</ja>
+%<*zh>
+\item 第1行和第2行是不正确的,因为“高温”的作用为文本标签,“よって”用作为连词。
+%</zh>
+%<*en>
+\item However, the line~3 is correct, since `素' is used as an identifier.
+%</en>
+%<*ja>
+\item しかしながら,3行目は`素'が識別子として用いられているので正しい.
+%</ja>
+%<*zh>
+\item 不过,第3行是正确的,因为“素”是作为标识符的。
+%</zh>
+\end{itemize}
+%<*en>
+Hence, in our opinion, the above input should be corrected as:
+%</en>
+%<*ja>
+したがって,\LuaTeX-jaプロジェクトの意見としては,上記の入力は次のように直されるべき
+である:
+%</ja>
+%<*zh>
+那么,根据我们的观点,上述输入应当校正为:
+%</zh>
+\begin{LTXexample}
+$f_{\text{高温}}$~%
+($f_{\text{high temperature}}$).
+\[ y=(x-1)^2+2\quad
+  \mathrel{\text{よって}}\quad y>0 \]
+$5\in 素:=\{\,p\in\mathbb N:\text{$p$ is a prime}\,\}$.
+\end{LTXexample}
+%BUG?: \{\}がなければ「素」がでない.上の段落の「よって」もでてない.
+%<*en>
+We also believe that using Japanese characters as identifiers is rare,
+hence we don't describe how to change Japanese fonts in math mode in
+this chapter. For the method, please see Subsection~\ref{ssec-math}.
+%</en>
+%<*ja>
+また\LuaTeX-jaプロジェクトでは,和文文字が識別子として用いられることはほとんどない
+と考えており,したがってこの節では数式モード中の和文フォントを変更する方法については
+記述しない.この方法については\ref{ssec-math}節を参照のこと.
+%</ja>
+%<*zh>
+我们也认为使用日文字符作为标识符的情况极为少见,所以我们不在此章节描述如何在数学模式下改变日文字体。
+关于此方法,请参见\ref{ssec-math}。
+%</zh>
+
 \subsection{fontspec}
 \label{ssec-fontspec}
 %<*en>
@@ -1410,7 +1399,7 @@ counterparts of original commands in the \Pkg{fontspec} package:
 在\Pkg{luatexja-fontspec}中,定义了如下七条命令,这些命令和\Pkg{fontspec}的相关命令对比如下:
 %</zh>
 %<*en>
-\begin{center}
+\begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 Japanese fonts
@@ -1427,24 +1416,29 @@ alphabetic fonts
 \end{center}
 %</en>
 %<*ja>
-\begin{center}
-\begin{tabular}{ccccc}
+\begin{center}\small
+\begin{tabular}{cccc}
 \toprule
-和文フォント
-&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\newjfontfamily+\\
-欧文フォント
-&\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+&\verb+\newfontfamily+\\
+和文
+&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+\\
+欧文
+&\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+\\
 \midrule
-和文フォント
-&\verb+\newjfontface+&\verb+\defaultjfontfeatures+&\verb+\addjfontfeatures+\\
-欧文フォント
-&\verb+\newfontface+&\verb+\defaultfontfeatures+&\verb+\addfontfeatures+\\
+和文
+&\verb+\newjfontfamily+&\verb+\newjfontface+&\verb+\defaultjfontfeatures+\\
+欧文
+&\verb+\newfontfamily+&\verb+\newfontface+&\verb+\defaultfontfeatures+\\
+\midrule
+和文
+&\verb+\addjfontfeatures+\\
+欧文
+&\verb+\addfontfeatures+\\
 \bottomrule
 \end{tabular}
 \end{center}
 %</ja>
 %<*zh>
-\begin{center}
+\begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 日文字体&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\newjfontfamily+\\
@@ -1458,7 +1452,7 @@ alphabetic fonts
 %</zh>
 
 \begin{LTXexample}
-\fontspec[Numbers=OldStyle]{TeX Gyre Termes}
+\fontspec[Numbers=OldStyle]{LMSans10-Regular}
 \jfontspec{IPAexMincho}
 JIS~X~0213:2004→辻
 
@@ -1484,6 +1478,395 @@ featureが\textbf{JAglue}と衝突するためである(\ref{para-kern}節を
 另注意,出格特性在这7个命令中默认关闭,因为此特性会与\textbf{JAglue}冲突(参见\ref{para-kern})。
 %</zh>
 
+%<en>\subsection{Preset}
+%<ja>\subsection{プリセット設定}
+\label{ssec-preset}
+
+%<*en>
+To use standard Japanese font settings easily, one can load \Pkg{luatexja-preset}
+package with several options. This package provides functions in a part of
+\Pkg{otf} package and a part of \Pkg{PXchfon} package by Takayuki Yato,
+and loads \Pkg{luatexja-fontspec} internally.
+%</en>
+%<*ja>
+よく使われている和文フォント設定を一行で指定できるようにしたのが
+\Pkg{luatexja-preset}パッケージである.このパッケージは,
+\Pkg{otf}パッケージの一部機能と八登崇之氏による\Pkg{PXchfon}パッケージの一部機能とを
+合わせたような格好をしており,内部で\Pkg{luatexja-fontspec}を読み込んでいる.
+%</ja>
+
+%<en>\paragraph{General options}
+%<ja>\paragraph{一般的なオプション}
+\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
+\item[deluxe]
+%<*en>
+Specifying this option enables us to use \textit{mincho} with two weights (medium~and~bold),
+\textit{gothic} with three weights (medium,~bold and~heavy), and \textit{rounded gothic}%
+\footnote{Provided by \texttt{\char92mgfamily}, 
+because \textit{rounded gothic} is called \textit{maru gothic} (丸ゴシック) in Japanese.}.
+The heavy weight of \textit{gothic} can be used by ``changing the family'' \verb+\gtebfamily+.
+This is because \Pkg{fontspec} package can handle only medium (\verb+\mdseries+) and
+bold (\verb+\bfseries+).
+%</en>
+%<*ja>
+明朝体2ウェイト・ゴシック体3ウェイトと,
+丸ゴシック体 (\verb+\mgfamily+) を使用可能とする.
+ゴシック体は細字・太字・極太の3ウェイトがあるが,極太ゴシック体はファミリの切り替え (\verb+\gtebfamily+) %
+で実現している.\Pkg{fontspec}では通常 (\verb+\mdseries+) と太字 (\verb+\bfseries+) しか扱えないために
+このような中途半端な実装になっている.
+%</ja>
+\item[expert]
+%<*en>
+Use horizontal kana alternates, and define a control sequence \verb+\rubyfamily+ to use kana
+characters designed for ruby.
+%</en>
+%<*ja>
+横組専用仮名を用いる.また,\verb+\rubyfamily+ でルビ用仮名が使用可能となる.
+%</ja>
+\item[bold]
+%<*en>
+Use bold gothic as bold mincho.
+%</en>
+%<*ja>
+明朝の太字をゴシック体の太字とする.
+%</ja>
+\item[90jis]
+%<*en>
+Use 90JIS glyphs if possible.
+%</en>
+%<*ja>
+出来る限り90JISの字形を使う.
+%</ja>
+\item[jis2004]
+%<*en>
+Use JIS2004 glyphs if possible.
+%</en>
+%<*ja>
+出来る限りJIS2004の字形を使う.
+%</ja>
+\item[jis]
+%<*en>
+Use the JFM \texttt{jfm-jis.lua}, instead of the default JFM of 
+\LuaTeX-ja, \texttt{jfm-ujis.lua}.
+%</en>
+%<*ja>
+用いるJFMを\texttt{jfm-jis.lua}とする.このオプションがない時は
+\LuaTeX-ja標準の\texttt{jfm-ujis.lua}が用いられる.
+%</ja>
+\end{list}
+
+%<en>\paragraph{Kozuka fonts}
+%<ja>\paragraph{小塚フォント}
+%<*en>
+When using single weight, we adopt Kozuka~Gothic~M as \textit{gothic},
+because we think that Kozuka~Gothic~R looks thin.
+There is not `Kozuka Maru Gothic', therefore Kozuka~Gothic~H is used
+as a substitute for \textit{rounded gothic}.
+%</en>
+%<*ja>
+まず,小塚フォントを用いる設定を述べる.
+単ウェイト時のゴシック体は小塚ゴシックRでは細いように感じるので,
+小塚ゴシックMに変更している.
+さらに,丸ゴシック体はないので便宜上小塚ゴシックHで代用している.
+%</ja>
+\begin{center}\small
+\begin{tabular}{llll}
+\toprule
+&\tt kozuka4&\tt kozuka6&\tt kozuka6n\\
+\midrule
+%<*en>
+\bf mincho medium&Kozuka Mincho Pro R&Kozuka Mincho ProVI R&Kozuka Mincho Pr6N R\\
+\bf mincho bold&Kozuka Mincho Pro B&Kozuka Mincho ProVI B&Kozuka Mincho Pr6N B\\
+\midrule
+\bf gothic medium\\
+  without \texttt{deluxe}
+&Kozuka Gothic Pro M&Kozuka Gothic ProVI M&Kozuka Gothic Pr6N M\\
+  multiple weights
+&Kozuka Gothic Pro R&Kozuka Gothic ProVI R&Kozuka Gothic Pr6N R\\
+\midrule
+\bf gothic bold
+&Kozuka Gothic Pro B&Kozuka Gothic ProVI B&Kozuka Gothic Pr6N B\\
+\bf gothic heavy
+&Kozuka Gothic Pro H&Kozuka Gothic ProVI H&Kozuka Gothic Pr6N H\\
+(rounded gothic)
+&Kozuka Gothic Pro H&Kozuka Gothic ProVI H&Kozuka Gothic Pr6N H\\
+%</en>
+%<*ja>
+\gt 明朝体細字&小塚明朝Pro~R&小塚明朝ProVI~R&小塚明朝Pr6N~R\\
+\gt 明朝体太字&小塚明朝Pro~B&小塚明朝ProVI~B&小塚明朝Pr6N~B\\
+\midrule
+\gt ゴシック体細字\\
+ 単ウェイト時
+&小塚ゴシックPro~M&小塚ゴシックProVI~M&小塚ゴシックPr6N~M\\
+ 多ウェイト時
+&小塚ゴシックPro~R&小塚ゴシックProVI~R&小塚ゴシックPr6N~R\\
+\midrule
+\gt ゴシック体太字
+&小塚ゴシックPro~B&小塚ゴシックProVI~B&小塚ゴシックPr6N~B\\
+\gt ゴシック体極太
+&小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\
+\inhibitglue(丸ゴシック体)\inhibitglue
+&小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\
+%</ja>
+\bottomrule
+\end{tabular}
+\end{center}
+
+%<en>\paragraph{Hiragino and Morisawa}
+%<ja>\paragraph{ヒラギノ・モリサワ}
+%<*en>
+Settings for Hiragino fonts:
+%</en>
+%<*ja>
+モリサワ・ヒラギノ用の設定はそのようなことは行っていない.
+まずヒラギノフォントから:
+%</ja>
+% これらは持っているわけではないので,フォント名が
+% 異なっているかもしれません.確認お願いします.
+\begin{center}\small
+\begin{tabular}{lll}
+\toprule
+&\tt hiragino&\tt hiraginon\\
+\midrule
+%<*en>
+\bf mincho medium&
+Hiragino Mincho Pro W3&Hiragino Mincho Pr6N W3\\
+\bf mincho bold&
+Hiragino Mincho Pro W6&Hiragino Mincho Pr6N W6\\
+\bf gothic medium&
+Hiragino Kaku Gothic Pro W3&Hiragino Kaku Gothic ProN W3\\
+\bf gothic bold&
+Hiragino Kaku Gothic Pro W6&Hiragino Kaku Gothic ProN W6\\
+\bf gothic heavy&
+Hiragino Kaku Gothic Std W8&Hiragino Kaku Gothic StdN W8\\
+\bf rounded gothic&
+Hiragino Maru Gothic Pro W4&Hiragino Maru Gothic ProN W4\\
+%</en>
+%<*ja>
+\gt 明朝体細字&
+ヒラギノ明朝体Pro~W3&ヒラギノ明朝体Pr6N~W3\\
+\gt 明朝体太字&
+ヒラギノ明朝体Pro~W6&ヒラギノ明朝体Pr6N~W6\\
+\gt ゴシック体細字&
+ヒラギノ角ゴPro~W3&ヒラギノ角ゴProN~W3\\
+\gt ゴシック体太字&
+ヒラギノ角ゴPro~W6&ヒラギノ角ゴProN~W6\\
+\gt ゴシック体極太&
+ヒラギノ角ゴStd~W8&ヒラギノ角ゴStdN~W8\\
+\gt 丸ゴシック体&
+ヒラギノ丸ゴPro~W4&ヒラギノ丸ゴProN~W4\\
+%</ja>
+\bottomrule
+\end{tabular}
+\end{center}
+%<*en>
+Settings for Morisawa fonts:
+%</en>
+%<*ja>
+次はモリサワフォントを用いる設定である:
+%</ja>
+\begin{center}\small
+\begin{tabular}{lll}
+\toprule
+&\tt morisawa4&\tt morisawa6n\\
+\midrule
+%<*en>
+\bf mincho medium&
+Ryumin Pro L-KL&Ryumin Pr6N L-KL\\
+\bf mincho bold&
+Futo Min A101 Pro Bold&Futo Min A101 Pr6N Bold\\
+\bf gothic medium&
+Chu Gothic BBB Pro Med&Chu Gothic BBB Pr6N Med\\
+\bf gothic bold&
+Futo Go B101 Pro Bold&Futo Go B101 Pr6N Bold\\
+\bf gothic heavy&
+Midashi Go Pro MB31&Midashi Go Pr6N MB31\\
+\bf rounded gothic&
+Jun Pro 101&Jun Pr6N 101\\
+%</en>
+%<*ja>
+\gt 明朝体細字&
+リュウミンPro~L-KL&リュウミンPr6N~L-KL\\
+\gt 明朝体太字&
+太ミンA101~Pro~Bold&太ミンA101~Pr6N~Bold\\
+\gt ゴシック体細字&
+中ゴシックBBB~Pro~Med&中ゴシックBBB~Pr6N~Med\\
+\gt ゴシック体太字&
+太ゴB101~Pro~Bold&太ゴB101~Pr6N~Bold\\
+\gt ゴシック体極太&
+見出ゴPro~MB31&見出ゴPr6N~MB31\\
+\gt 丸ゴシック体&
+じゅんPro 101&じゅんPr6N 101\\
+%</ja>
+\bottomrule
+\end{tabular}
+\end{center}
+
+%<en>\paragraph{Settings for single weight}
+%<ja>\paragraph{単ウェイト用設定}
+%<*en>
+Next, we describe settings for using only single weight.
+In four settings below, we use same fonts for medium and bold (and heavy) weights.
+(Hence \verb+\mcfamily\bfseries+ and \verb+\mcfamily\mdseries+ yields same Japanese fonts, 
+if \texttt{deluxe} option is also specified).
+%</en>
+%<*ja>
+次に,単ウェイト用の設定を述べる.この4設定では「細字」「太字」の区別はない.
+また,丸ゴシック体はゴシック体と同じフォントを用いる.
+%</ja>
+\begin{center}\small
+\begin{tabular}{lllll}
+\toprule
+&\tt noembed&\tt ipa&\tt ipaex&\tt ms\\
+\midrule
+%<*en>
+\bf mincho&Ryumin-Light (non-embedded)
+&IPAMincho&IPAexMincho&MS Mincho\\
+\bf gothic&GothicBBB-Medium (non-embedded)
+&IPAGothic&IPAexGothic&MS Gothic\\
+%</en>
+%<*ja>
+\gt 明朝体&Ryumin-Light(非埋込)
+&IPA明朝&IPAex明朝&MS明朝\\
+\gt ゴシック体&GothicBBB-Medium(非埋込)
+&IPAゴシック&IPAexゴシック&MSゴシック\\
+%</ja>
+\bottomrule
+\end{tabular}
+\end{center}
+
+%<en>\paragraph{Using HG fonts}
+%<ja>\paragraph{HGフォントの利用}
+%<*en>
+We can use HG~fonts bundled with Microsoft Office for realizing multiple weights in Japanese fonts.
+%</en>
+%<*ja>
+すぐ前に書いた単ウェイト用設定を,Microsoft Office等に付属するHGフォントを使って
+多ウェイト化した設定もある.
+%</ja>
+\begin{center}\small
+\begin{tabular}{llll}
+\toprule
+&\tt ipa-dx&\tt ipaex-dx&\tt ms-dx\\
+\midrule
+%<*en>
+\bf mincho medium
+&IPAMincho&IPAexMincho&MS Mincho\\\midrule
+\bf mincho bold&
+\multicolumn{3}{c}{HG Mincho E}\\\midrule
+\bf Gothic medium\\
+~~without \texttt{deluxe}
+&IPAGothic&IPAexGothic&MS Gothic\\
+~~with {\tt jis2004}
+&IPAGothic&IPAexGothic&MS Gothic\\
+\cmidrule(lr){1-4}
+~~otherwise&
+\multicolumn{3}{c}{HG Gothic M}\\\midrule
+\bf gothic bold&
+\multicolumn{3}{c}{HG Gothic E}\\\midrule
+\bf gothic heavy&
+\multicolumn{3}{c}{HG Soei Kaku Gothic UB}\\\midrule
+\bf rounded gothic&
+\multicolumn{3}{c}{HG Maru Gothic PRO}\\
+%</en>
+%<*ja>
+\gt 明朝体細字
+&IPA明朝&IPAex明朝&MS明朝\\\midrule
+\gt 明朝体太字&
+\multicolumn{3}{c}{HG明朝E}\\\midrule
+\gt ゴシック体細字\\
+ 単ウェイト時
+&IPAゴシック&IPAexゴシック&MSゴシック\\
+ {\tt jis2004}指定時
+&IPAゴシック&IPAexゴシック&MSゴシック\\
+\cmidrule(lr){1-4}
+ それ以外の時&
+\multicolumn{3}{c}{HGゴシックM}\\\midrule
+\gt ゴシック体太字&
+\multicolumn{3}{c}{HGゴシックE}\\\midrule
+\gt ゴシック体極太&
+\multicolumn{3}{c}{HG創英角ゴシックUB}\\\midrule
+\gt 丸ゴシック体&
+\multicolumn{3}{c}{HG丸ゴシック体PRO}\\
+%</ja>
+\bottomrule
+\end{tabular}
+\end{center}
+%<*en>
+Note that HG~Mincho~E, HG~Gothic~E, HG Soei Kaku Gothic UB and HG Maru Gothic PRO
+are internally specified by:
+\begin{description}
+\item[default] by font name (\texttt{HGMinchoE}, etc.).
+\item[{\tt 90jis}] by filename (\texttt{hgrme.ttc}, \texttt{hgrge.ttc}, \texttt{hgrsgu.ttc}, \texttt{hgrsmp.ttf}).
+\item[{\tt jis2004}] by filename (\texttt{hgrme04.ttc}, \texttt{hgrge04.ttc}, \texttt{hgrsgu04.ttc}, \texttt{hgrsmp04.ttf}).
+\end{description}
+%</en>
+%<*ja>
+なお,HG明朝E・HGゴシックE・HG創英角ゴシックUB・HG丸ゴシック体PROの4つについては,内部で
+\begin{description}
+\item[標準] フォント名(\texttt{HGMinchoE} など)
+\item[{\tt 90jis}指定時] ファイル名 (%
+\texttt{hgrme.ttc}, \texttt{hgrge.ttc}, \texttt{hgrsgu.ttc}, \texttt{hgrsmp.ttf})
+\item[{\tt jis2004}指定時] ファイル名 (%
+\texttt{hgrme04.ttc}, \texttt{hgrge04.ttc}, \texttt{hgrsgu04.ttc}, \texttt{hgrsmp04.ttf})
+\end{description}
+として指定を行っているので注意すること.
+%</ja>
+
+
+%<*en>
+\subsection{\texttt{\char92 CID}, \texttt{\char92 UTF} and macros in \Pkg{otf} package}
+Under \pLaTeX, \Pkg{otf} package (developed by Shuzaburo Saito) is
+used for typesetting characters which is in Adobe-Japan1-6 CID but not
+in JIS~X~0208. Since this package is widely used, \LuaTeX-ja
+supports some of functions in \Pkg{otf} package.
+If you want to use these functions, load \Pkg{luatexja-otf} package.
+%</en>
+%<*ja>
+\subsection{\texttt{\char92 CID}, \texttt{\char92 UTF}と\Pkg{otf}パッケージのマクロ}
+\pLaTeX では,JIS~X~0208にないAdobe-Japan1-6の文字を出力するために,
+齋藤修三郎氏による\Pkg{otf}パッケージが用いられていた.このパッケージは
+広く用いられているため,\LuaTeX-jaにおいても\Pkg{otf}パッケージの機能の
+一部をサポートしている.これらの機能を用いるためには\Pkg{luatexja-otf}パッケージ
+を読み込めばよい.
+%</ja>
+%<*zh>
+\subsection{\Pkg{otf}包中的\texttt{\char92CID},\texttt{\char92UTF}及其他宏}
+\pLaTeX 下,\underline{\texttt{otf}}宏包(斋藤修三郎开发)是用来排印存在
+于Adobe-Japan1-6但不存在于JIS X 0208中的字符。
+该包已经广泛使用,\LuaTeX-ja支持部分\Pkg{otf}包中的部分功能。
+如果你想使用这些功能,加载\Pkg{luatexja-otf}宏包。
+\bgroup
+\fontencoding{JY3}\selectfont
+%</zh>
+
+\begin{LTXexample}
+森\UTF{9DD7}外と内田百\UTF{9592}とが\UTF{9AD9}島屋に行く。
+
+\CID{7652}飾区の\CID{13706}野家,
+葛飾区の吉野家
+\end{LTXexample}
+%<*zh>
+\egroup
+%</zh>
+
+%<*ja>
+\Pkg{otf}パッケージでは,それぞれ次のようなオプションが存在した:
+\begin{description}
+\item[\texttt{deluxe}] 明朝体・ゴシック体各2ウェイトと,丸ゴシック体を扱えるようになる.
+\item[\texttt{expert}] 仮名が横組・縦組専用のものに切り替わり,ルビ用仮名も扱えるようになる.
+\item[\texttt{bold}] ゴシック体を標準で太いウェイトのものに設定する.
+\end{description}
+しかしこれらのオプションは\Pkg{luatexja-otf}パッケージには存在しない.
+\Pkg{otf}パッケージが文書中で使用する和文用TFMを自前の物に置き換えていたのに対し,
+\Pkg{luatexja-otf}パッケージでは,そのようなことは行わないからである.
+
+これら3オプションについては,
+\Pkg{luatexja-preset} パッケージにプリセットを使う時に一緒に指定するか,
+あるいは対応する内容を\ref{ssub-chgfnt}節 (NFSS2) や
+\ref{ssec-fontspec}節 (\Pkg{fontspec}) の方法で手動で指定する必要がある.
+%</ja>
+
 %<en>\section{Changing Parameters}
 %<ja>\section{パラメータの変更}
 %<zh>\section{变量更改}
@@ -1632,13 +2015,13 @@ determined from the following data:
 \item 在CID Adobe-Japan1-6和Unicode之间的映射\texttt{Adobe-Japan1-UCS2}。
 %</zh>
 %<*en>
-\item The \texttt{PXbase} bundle for \upTeX\ by Takayuki Yato.
+\item The \Pkg{PXbase} bundle for \upTeX\ by Takayuki Yato.
 %</en>
 %<*ja>
-\item 八登崇之氏による\upTeX 用の\texttt{PXbase}バンドル.
+\item 八登崇之氏による\upTeX 用の\Pkg{PXbase}バンドル.
 %</ja>
 %<*zh>
-\item 八登崇之的\texttt{PXbase}宏包(\upTeX 下使用)。
+\item 八登崇之的\Pkg{PXbase}宏包(\upTeX 下使用)。
 %</zh>
 \end{itemize}
 
@@ -1777,7 +2160,7 @@ This range consist of the following Unicode ranges, \emph{except characters in t
 %</ja>
 %<*zh>
 \item \texttt{U+0370}--\texttt{U+03FF}: 希腊字母
-\item \texttt{U+0400}--\texttt{U+04FF}: 西里尔字母        
+\item \texttt{U+0400}--\texttt{U+04FF}: 西里尔字母
 \item \texttt{U+1F00}--\texttt{U+1FFF}: 希腊文扩充
 %</zh>
 \\\
@@ -2456,7 +2839,7 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま
 %</en>
 %<*ja>
 \item[\tt jfm-ujis.lua] \LuaTeX-jaの標準JFMである.このJFMは\upTeX で
-  用いられるUTF/OTFパッケージ用のメトリックである \verb+upnmlminr-h.tfm+ を
+  用いられるUTF/OTFパッケージ用の和文用TFMである \verb+upnmlminr-h.tfm+ を
   元にしている.\Pkg{luatexja-otf}パッケージを使うときはこのJFMを指定するべきである.
 %</ja>
 %<*zh>
@@ -2490,7 +2873,7 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま
   shown in Table~\ref{tab-difjfm}.
 %</en>
 %<*ja>
-\item[\tt jfm-min.lua] \pTeX に同梱されているデフォルトの和文フォントメトリック
+\item[\tt jfm-min.lua] \pTeX に同梱されているデフォルトの和文用TFM
   である \verb+min10.tfm+ に相当するJFMである.このJFMと他の2つのJFMの間には
   表\ref{tab-difjfm}に示すような特筆すべき違いがある.
 %</ja>
@@ -2509,7 +2892,7 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま
 %<zh>\caption{\LuaTeX-ja下不同JFM表现}
 \label{tab-difjfm}
 \ltjsetparameter{jacharrange={+3}}
-\begin{center}
+\begin{center}\small
 \def\r#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g
 \setbox0=\vtop{\hsize=7\zw\noindent ◆◆◆◆◆◆◆
 ある日モモちゃんがお使いで迷子になって泣きました.}\copy0
@@ -3029,7 +3412,9 @@ Furthermore, the glyph is shifted according to values of fields
 %</zh>
 \end{itemize}
 \end{minipage}
-\caption{
+\medskip
+
+\caption{%
 %<en>The position of the `real' glyph.
 %<ja>「実際の」グリフの位置.
 %<zh>“真实”字形位置
@@ -3037,7 +3422,6 @@ Furthermore, the glyph is shifted according to values of fields
 \label{fig-pos}
 \end{figure}
 
-
 \item[kern={\{[$j$]=<kern>, ...\}}]
 
 \item[glue={\{[$j$]=\{<width>, <stretch>, <shrink>\}, ...\}}]
@@ -3094,8 +3478,8 @@ The following is the list of `imaginary characters':
 \end{list}
 
 %<en>\paragraph{Porting JFM from \pTeX}
-%<ja>\paragraph{\pTeX 用和文フォントメトリックの移植}
-%<zh>\paragraph{\pTeX 下使用的JFM移植}
+%<ja>\paragraph{\pTeX 用和文用TFMの移植}
+%<zh>\paragraph{\pTeX 下使用的TFM移植}
 
 % ToDo: English version.
 
@@ -3104,7 +3488,7 @@ The following is the list of `imaginary characters':
 %</en>
 
 %<*ja>
-以下に,\pTeX 用和文フォントメトリックを\LuaTeX-ja用に移植する場合の注意点を挙げておく.
+以下に,\pTeX 用に作られた和文用TFMを\LuaTeX-ja用に移植する場合の注意点を挙げておく.
 \begin{itemize}
 \item 実際に出力される和文フォントのサイズがdesign sizeとなる.
 このため,例えば$1\,\textrm{zw}$がdesign sizeの0.962216倍であるJISフォン
@@ -3194,17 +3578,18 @@ you can set both \verb+\fam+ and \verb+\jfam+ to the same value.
 %<ja>\caption{和文数式フォントに対するプリミティブ.}
 %<zh>\caption{日语数学字体基本语句}
 \label{tab-math}
-\begin{center}\def\{{\char`\{}\def\}{\char`\}}
-\begin{tabular}{lll}
+\begin{center}
+\def\{{\char`\{}\def\}{\char`\}}\small
+\begin{tabular}{ll}
 \toprule
-%<en>&Japanese fonts&alphabetic fonts\\
-%<ja>&和文フォント&欧文フォント\\
-%<zh>&日文字体&西文字体\\
+%<en>\bf Japanese fonts&\bf alphabetic fonts\\
+%<ja>\bf 和文フォント&\bf 欧文フォント\\
+%<zh>\bf 日文字体&\bf 西文字体\\
 \midrule
-font family&\verb+\jfam+${}\in [0,256)$&\verb+\fam+\\
-text size&\tt\Param{jatextfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\textfont+<fam>=<font\_cs>\\
-script size&\tt\Param{jascriptfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\scriptfont+<fam>=<font\_cs>\\
-scriptscript size&\tt\Param{jascriptscriptfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\scriptscriptfont+<fam>=<font\_cs>\\
+\verb+\jfam+${}\in [0,256)$&\verb+\fam+\\
+\tt\Param{jatextfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\textfont+<fam>=<font\_cs>\\
+\tt\Param{jascriptfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\scriptfont+<fam>=<font\_cs>\\
+\tt\Param{jascriptscriptfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\scriptscriptfont+<fam>=<font\_cs>\\
 \bottomrule
 \end{tabular}
 \end{center}
@@ -4190,12 +4575,12 @@ Here the following is the list of dimensions and attributes which are used in \L
 
 \dim{jQ}
 %<*en>
-As explained in Subsection~\ref{ssec-plain}, \verb+\jQ+ is equal to
+\verb+\jQ+ is equal to
                        $1\,\textrm{Q}=0.25\,\textrm{mm}$, where `Q'~(also called `級') is
                        a unit used in Japanese phototypesetting. So one should not change the value of this dimension.
 %</en>
 %<*ja>
-\ref{ssec-plain}節で述べたように,\verb+\jQ+ は$1\,\textrm{Q}=0.25\,\textrm{mm}$
+\verb+\jQ+ は$1\,\textrm{Q}=0.25\,\textrm{mm}$
 と等しい.ここで,`Q'(もしくは「級」)は日本の写植で用いられる単位である.したがって,
 この寸法レジスタの値を変更してはならない.
 %</ja>
@@ -4207,7 +4592,7 @@ There is also a unit called `歯' which equals to $0.25\,\textrm{mm}$ and
                        \verb+\jH+ is a synonym of \verb+\jQ+.
 %</en>
 %<*ja>
\90\8cã\81\98ã\81\8få\86\99æ¤\8dã\81§ç\94¨ã\81\84ã\82\89ã\82\8cã\81¦ã\81\84ã\81\9få\8d\98ä½\8dã\81¨ã\81\97ã\81¦ã\80\8cæ­¯ã\80\8dã\81\8cã\81\82ã\82\8aï¼\8cã\81\93ã\82\8cã\81¯$0.25\,\textrm{mm}$と
\90\8cã\81\98ã\81\8få\86\99æ¤\8dã\81§ç\94¨ã\81\84ã\82\89ã\82\8cã\81¦ã\81\84ã\81\9få\8d\98ä½\8dã\81¨ã\81\97ã\81¦ã\80\8cæ­¯ã\80\8dã\81\8cã\81\82ã\82\8aï¼\8cã\81\93ã\82\8cã\82\82$0.25\,\textrm{mm}$と
 等しい.\verb+\jH+ は \verb+\jQ+ の別名である.
 %</ja>
 
@@ -4631,8 +5016,8 @@ This problem is resolved by using
 %<zh>\section{日文字符后断行}
 \label{sec-lbreak}
 %<en>\subsection{Reference: Behavior in \pTeX}
-%<ja>\subsection{参考:\pTeX の動作}
-%<zh>\subsection{参考:\pTeX 行为}
+%<ja>\subsection{参考\pTeX の動作}
+%<zh>\subsection{参考: \pTeX 行为}
 %<*en>
 In~\pTeX, a line break after a Japanese character doesn't emit a space,
 since words are not separated by spaces in Japanese writings. However,
@@ -4685,39 +5070,72 @@ after `beginning/ending of a group' characters.
 %</ja>
 
 \begin{figure}[!tb]
-\begin{gather*}
- \def\sp{\texttt{\char32}}
- \xymatrix{&&
-   {\text{scan a cs}}\ar@(r,ul)[dr]&\\
-\ar[r]&
-   *++[o][F-]{N}\ar[ur]^0\ar[dd]_{d,\ g}\ar[u]^{5\ (\texttt{\char92par})}
-     \ar@{->}@(d,l)[ddrr]_(0.45){j}&&
-   *++[o][F-]{S}\ar@(l,dr)[ul]^0\ar@(l,ur)[ddll]_{d,\ g}\ar[u]_{5}
-     \ar@{->}@(r,r)[dd]^{j}\\&\\&
-   *++[o][F-]{M}\ar[uuur]^0\ar@(r,dl)[uurr]_(0.55){10\ (\sp)}
-     \ar[d]_{5\ ({\sp})}\ar@{->}@(dr,dl)[rr]_{j}&&
-   *++[o][F-]{K}\ar@{->}@(ul,d)[uuul]^0\ar@{->}[ll]^{d}
-     \ar@{->}@(ur,dr)[uu]^{10\ (\sp)}\ar@{->}[d]_5\\
-   &&&
- }\\
- d:=\{3,4,6,7,8,11,12,13\},\quad g:=\{1,2\},\quad j:=(\text{Japanese characters})
-\end{gather*}
+\let\sp\textvisiblespace\small
+\begin{minipage}{.6\textwidth}%
+\begin{center}
+\unitlength=6.5mm\sf\mathversion{bold}
+\begin{tikzpicture}[
+  ->, auto, shorten >=1pt
+]
+\node [shape=rectangle, font=\scriptsize] (init) at (2,7) {start};
+\node [shape=circle,draw, fill=blue!20] (newline) at (4,7) {$N$};
+\node [shape=circle,draw, fill=blue!20] (midline) at (4,4) {$M$};
+\node [shape=circle,draw, fill=blue!20] (skipspc) at (8,7) {$S$};
+\node [shape=circle,draw, fill=red!20]  (kanji) at (8,4) {$K$};
+\node [shape=rectangle,draw, fill=green!20] (scanacs) at (6,8) {scan a c.s.};
+\node (endk) at (8,2.5) {} ;
+\node (endm) at (4,2.5) {} ;
+\node (ends) at (8,8.5) {} ;
+\node (endn) at (4,8.5) {} ;
+\begin{scope}[font=\scriptsize]
+\path (newline) edge [bend right]    node [left]{G, O} (midline)
+      (init)    edge                 node {} (newline)
+      (midline) edge [bend right=10] node {10} (skipspc)
+      (skipspc) edge [bend right]    node [left,right=10,above=7]{G, O} (midline)
+      (skipspc) edge [loop right]    node {10} (skipspc)
+      (newline) edge [loop right]    node {10} (newline)
+      (scanacs) edge [bend left]     node [left=3,below]{$(*)$} (skipspc)
+      (scanacs) edge [bend right]    node [right=30,above=20]{$(*)$} (midline)
+      (midline) edge                 node {5\ [\sp]} (endm)
+      (midline) edge [loop left]     node {G, O} (midline)
+      (skipspc) edge                 node [right] {5} (ends)
+      (newline) edge                 node {5 [{\tt\char92par}]} (endn);
+\begin{scope}[red]
+\path (newline) edge [bend right]    node [right=25,below=3]{J} (kanji)
+      (midline) edge                 node [below]{J} (kanji)
+      (kanji)   edge [bend left]     node {O} (midline)
+      (kanji)   edge                 node {10} (skipspc)
+      (kanji)   edge [loop right]    node {G, J} (kanji)
+      (skipspc) edge [bend left]     node {J} (kanji)
+      (kanji)   edge                 node {5} (endk)
+;
+\end{scope}
+\end{scope}
+\end{tikzpicture}
+\end{center}
+\end{minipage}%
+\begin{minipage}{.4\textwidth}
+\begin{description}
+\item[\textsf{G}] Beginning of group (usually \verb+{+)\\
+ and ending of group (usually \verb+}+).
+\item[\textsf{J}] Japanese characters.
+\item[\textsf{5}] \textit{end-of-line} (usually \verb+^^J+).
+\item[\textsf{10}] space (usually \sp).
+\item[\textsf{O}] other characters, whose category code is in $\{3,4,6,7,8,11,12,13\}$.
+\item[\textsf{[\sp]}, \textsf{[{\tt\char92par}]}] 
+emits a space, or~\verb+\par+.
+\end{description}
+\end{minipage}
 \begin{itemize}
-%<*en>
-\item Numbers represent category codes.
-%</en>
-%<*ja>
-\item 数字はカテゴリーコードを表わしている.
-%</ja>
-%<*en>
-\item Category codes 9~(ignored), 14~(comment)~and~15~(invalid) are omitted in the above diagram.
-%</en>
-%<*ja>
-\item カテゴリーコード9(無視する文字),14(コメント文字),15(無効文字)は上の図では省かれている.
-%</ja>
-%<*zh>
-\item
-%</zh>
+\item We omitted about category codes 
+9~(\textit{ignored}), 14~(\textit{comment})~and~15~(\textit{invalid})
+from the above diagram. We also ignored the input like `\verb+^^A+' or `\verb+^+\verb+^df+'.
+\item When a character whose category code is 0 (\textit{escape character}) is seen by \TeX, 
+the input processor scans a control sequence (\textsf{scan a c.s.}). 
+These paths are not shown in the above diagram.
+
+After that, the state is changed to State~$S$ (skipping blanks) in most cases, but 
+to State~$M$ (middle of line) sometimes.
 \end{itemize}
 %<en>\caption{State transitions of \pTeX's input processor.}
 %<ja>\caption{\pTeX の入力処理部の状態遷移.}
@@ -5228,26 +5646,26 @@ $a$は禁則処理用に\textit{Nq}と\textit{Np}の間に加えられるべき
 \label{tab-jfmglue}
 \begin{center}
 \small
-\begin{tabular}{>{\sf}c|cccccc}
+\begin{tabular}{c|cccccc}
 \toprule
 {\bf\textit{Np}}↓&\sf 和文A&\sf 和文B&\sf 欧文&\sf 箱&\sf glue&\sf kern\\\midrule
-和文A&
+\sf 和文A&
 \gkf{E}{M→K}{PN}&
 \gkf{---}{\OA →K}{PN}&
 \gkf{---}{\OA →X}{PN}&
 \gkf{---}{\OA}{PA}&
 \gkf{---}{\OA}{PN}&
 \gkf{---}{\OA}{PS}\\
-和文B&
+\sf 和文B&
 \gkf{E}{\OB→K}{PA}&
 \gkf{---}{K}{PS}&
 \gkf{---}{X}{PS}\\
-欧文&
+\sf 欧文&
 \gkf{E}{\OB →X}{PA}&
 \gkf{---}{X}{PS}\cr
-箱&\gkf{E}{\OB}{PA}\\
-glue&\gkf{E}{\OB}{PN}\\
-kern&\gkf{E}{\OB}{PS}\\
+\sf 箱&\gkf{E}{\OB}{PA}\\
+\sf glue&\gkf{E}{\OB}{PN}\\
+\sf kern&\gkf{E}{\OB}{PS}\\
 \bottomrule
 \end{tabular}
 \end{center}
@@ -5485,4 +5903,40 @@ $\mathit{Nq}.\mathit{tail}$は無意味なので,
 \bibitem{texbytopic}
 Victor Eijkhout,  \emph{\TeX\ by Topic, A \TeX nician's Reference}, Addison-Wesley, 1992.
 \end{thebibliography}
+
+\newpage
+\appendix
+\section{Package versions used in this document}
+This document was typeset using the following packages:
+
+\medskip
+
+{\makeatletter\tt\footnotesize
+  \def\@pkglist#1{%
+    \filename@parse{#1}\def\@temp{sty}
+    \ifx\@temp\filename@ext
+      \edef\reserved@a{%
+        \filename@base.%
+        \ifx\filename@ext\relax tex\else\filename@ext\fi}%
+      \leavevmode\hskip-13em\hbox to 13em{\filename@area\reserved@a\hss}%
+      \csname ver@\reserved@a\endcsname\par
+    \fi
+  }%
+\parindent0pt\leftskip13em
+\ltjpkglist
+
+\makeatother}
 \end{document}
+%</!showexpl>
+%<*showexpl>
+%%
+%% config file for showexpl.sty
+%%
+%% Copyright The LuaTeX-ja project team, 2005
+%%
+\ProvidesFile{showexpl.cfg}
+  [2012/05/20 v0.01 Definitions for the showexpl package (luatexja)]
+\lstset{}
+\def\SX@Info{}
+\endinput
+%</*showexpl>