OSDN Git Service

manual (en): added description of \ltj@setpar@global etc.
[luatex-ja/luatexja.git] / doc / luatexja.dtx
index c7a8530..829e5b2 100644 (file)
@@ -482,7 +482,7 @@ Japanese characters in discretionary break (\cs{discretionary}) is not supported
 By default, \LuaTeX-ja uses Japanese fonts to typeset Greek and Cyrillic letters,
       To change this behavior,
       put \verb!\ltjsetparameter{jacharrange={-2,-3}}! in the preamble.
-      For the detailed description, see Subsection~\ref{ssec-setrange}.
+      For the detailed description, see Subsection~\ref{ssec:setrange}.
 
 From version~20150906.0, characters which belongs both ISO~8859-1 and JIS~X~0208,
 such as \P~and~\S, are now typeset in alphabetic fonts.
@@ -499,7 +499,7 @@ without the \cs{fontspec} (and~\Pkg{luatexja-fontspec}) package.
 \end{lstlisting}
       を入れると
       上記種類の文字は欧文フォントを用いて組まれるようになる.
-      詳しい説明は\ref{ssec-setrange}節を参照してほしい.
+      詳しい説明は\ref{ssec:setrange}節を参照してほしい.
 
 また,\P,~\S といったISO~8859-1の上位領域とJIS~X~0208の共通部分の文字は
       バージョン20150906.0から標準で欧文扱いとなった.\LaTeXe\ 2017/01/01以降では
@@ -524,11 +524,11 @@ In this document, the following terms and notations are used:
 %<*en>
 \item Characters are classified into following two types.
       Note that the classification can be customized by a user
-      (see Subsection~\ref{ssec-setrange}).
+      (see Subsection~\ref{ssec:setrange}).
 %</en>
 %<*ja>
 \item 文字は次の2種類に分けられる.この類別は固定されているものではなく,ユーザが後から変更可能である
-      (\ref{ssec-setrange}節を参照).
+      (\ref{ssec:setrange}節を参照).
 %</ja>
 \begin{itemize}
 %<*en>
@@ -815,8 +815,9 @@ For changes from \pTeX, see Subsection~\ref{ssec:chgptex}.
   Generally speaking, LuaJIT\TeX\ processes \LuaTeX-ja
   about 30\% faster than \LuaTeX, but not always%
   \footnote{%
-    LuaJIT has the 1\,GB~(or~2\,GB) memory limitation. So typesetting a large source by LuaJIT\TeX\ 
-    may cause an ``out of memory'' error.
+    LuaJIT has several limitations such as 1\,GB~(or~2\,GB) memory limitation.
+       So typesetting a large source by LuaJIT\TeX may cause an ``out of memory'' error,
+       or failure of loading/saving font cache of \Pkg{luaotfload}.
   }.
 %</en>
 %<*ja>
@@ -825,11 +826,13 @@ For changes from \pTeX, see Subsection~\ref{ssec:chgptex}.
 LuaJIT\TeX を用いると\LuaTeX のだいたい1.3倍の速度で動くようであるが,
 IPA mj明朝などの大きいフォントを用いた場合には\LuaTeX よりも遅くなることもある
   \footnote{%
-    LuaJITは1\,GB(あるいは2\,GB)のメモリ制限があることが知られている.そのため,
+    LuaJITã\81¯1\,GBï¼\88ã\81\82ã\82\8bã\81\84ã\81¯2\,GBï¼\89ã\81®ã\83¡ã\83¢ã\83ªå\88¶é\99\90ã\81ªã\81©ï¼\8cã\81\84ã\81\8fã\81¤ã\81\8bã\81®å\88¶é\99\90äº\8bé \85ã\81\8cã\81\82ã\82\8bã\81\93ã\81¨ã\81\8cç\9f¥ã\82\89ã\82\8cã\81¦ã\81\84ã\82\8bï¼\8eã\81\9dã\81®ã\81\9fã\82\81ï¼\8c
     大きいソースファイルをLuaJIT\TeX でタイプセットするとLuaの側で``out of memory''エラーが発生してしまう.
     本ドキュメントのように,「各ページごとにLuaで使っているメモリ容量をチェックし,
     必要なら\texttt{collectgarbage("collect")}でガベージコレクタを実行」すると
     状況が多少改善されるかもしれない.
+       また,LuaJIT\TeX でIPA mj明朝などの「大きい」フォントを利用した場合はフォントキャッシュの保存に失敗し,
+       毎回フォントを読み込まなければならず結果的に時間がかかることがある.
   }.
 %</ja>
 
@@ -874,7 +877,7 @@ and finally delete the temporary directory.
 
 %<en>\subsection{Using in plain \TeX}
 %<ja>\subsection{plain \TeX で使う}
-\label{ssec-plain}
+\label{ssec:plain}
 
 %<en>To use \LuaTeX-ja in plain \TeX, simply put the following at the beginning of the document:
 %<ja>\LuaTeX-jaを plain \TeX で使うためには,単に次の行をソースファイルの冒頭に追加すればよい:
@@ -923,11 +926,11 @@ and finally delete the temporary directory.
 \begin{itemize}
 %<*en>
 \item With \texttt{luatexja.cfg}, one can use other fonts
-as ``default'' Japanese fonts (Subsection~\ref{ssec-cfg}).
+as ``default'' Japanese fonts (Subsection~\ref{ssec:cfg}).
 %</en>
 %<*ja>
 \item \texttt{luatexja.cfg} を用いることによって,標準和文フォントを
-IPAexフォントから別のフォントに置き換えることができる.\ref{ssec-cfg}節を参照.
+IPAexフォントから別のフォントに置き換えることができる.\ref{ssec:cfg}節を参照.
 %</ja>
 
 %<*en>
@@ -960,7 +963,7 @@ IPAexフォントから別のフォントに置き換えることができる.
 
 %<en>\subsection{Using in \LaTeX}
 %<ja>\subsection{\LaTeX で使う}
-\label{ssec-ltx}
+\label{ssec:ltx}
 
 %<*en>
 Using in \LaTeXe\ is basically same. To set up the minimal environment
@@ -1086,6 +1089,15 @@ Note that the bold series in both family are same as the medium series of gothic
  \renewcommand{\kanjifamilydefault}{\gtdefault}
 \end{lstlisting}
 
+%<*ja>
+\item \pLaTeX と同様に,\texttt{mc},~\texttt{gt}両ファミリには「従属欧文」書体が定義されている.
+  これらは\cs{userelfont}を\cs{selectfont}(や,その他の「実際に」
+  フォントを変更する命令)の前で実行することにより使うことができる.
+
+  \pLaTeX では標準の欧文フォントはOT1エンコーディングのComputer Modern Roman (\texttt{cmr})%
+  であったが,2017年以降の\LuaLaTeX ではTUエンコーディングのlatin Modern Roman (\texttt{lmr})%
+  に変更されている.そのため,前段落で述べた「従属欧文」も,Latin Modern Romanに設定している.
+%</ja>
 
 \end{itemize}
 
@@ -1104,9 +1116,11 @@ Okumura), namely, \Pkg{ltjclasses}\footnote{%
 
 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,
-so \Pkg{ltjsclasses} use different method%
-\footnote{Similar to \texttt{magstyle=xreal} in the \Pkg{BXjscls} classes (by Takayuki Yato).}
-to set the main document font size.
+so \Pkg{ltjsclasses} uses the \texttt{nomag*} option\footnote{Same effect as 
+  the \Pkg{BXjscls} classes (by Takayuki Yato) and \Pkg{jsclasses}.
+  However, these classes uses only \TeX\ code, but \Pkg{ltjsclasses} uses Lua code.}
+ by default to set the main font size. If this causes some unexpected behavior, specify
+\texttt{nomag} option in \cs{documentclass}.
 %</en>
 %<*ja>
 しかしながら,上記の設定は日本語の文書にとって十分とは言えない.
@@ -1122,11 +1136,15 @@ to set the main document font size.
   \texttt{ltjsarticle.cls},~\texttt{ltjsbook.cls}, \texttt{ltjsreport.cls},~\texttt{ltjskiyou.cls}.}%
 がそれぞれ用意されている.
 
-元々の\Pkg{ltjsclasses}ではフォントサイズを指定するのに\cs{mag}プリミティブが使われていたが,
+元々の\Pkg{jsclasses}では本文のフォントサイズを設定するのに\cs{mag}プリミティブが使われていたが,
 \LuaTeX~beta-0.87.0以降ではPDF出力時の\cs{mag}のサポートが廃止された.
-そのため,\Pkg{ltjsclasses}では別の方法
-\footnote{八登崇之氏による\Pkg{BXjscls}クラスにおける\texttt{magstyle=xreal}指定時と類似している.}で
-フォントサイズを指定することにしている.
+そのため,\Pkg{ltjsclasses}では\texttt{nomag*}オプション
+\footnote{\Pkg{jsclasses}や,八登崇之氏による\Pkg{BXjscls}クラスにおける同名のオプションと
+  同じ.上記クラスは\TeX コードのみで実装しているが,\Pkg{ltjsclasses}ではLuaコードも用いている.}が標準で
+有効になっており,これを使って本文フォントサイズの設定を行っている.
+しかし,この\texttt{nomag*}オプションでは(20180121.0版より前の版において\Pkg{unicode-math}パッケージ使用時に
+起きたように)予想外の意図しない現象に遭遇する危険がある.そのような場合は
+\cs{documentclass}において\texttt{nomag}オプションを指定してほしい.
 %</ja>
 
 %<*ja>
@@ -1204,17 +1222,17 @@ This patch \Pkg{lltjp-geometry} also can be used in \pLaTeX; for the detail, ple
 %<ja>\section{フォントの変更}
 
 \subsection{plain \TeX~and~\LaTeXe}
-\label{ssec-chgfnt}
+\label{ssec:chgfnt}
 
 \paragraph{plain \TeX}
 %<*en>
 To change Japanese fonts in plain \TeX, you must use the command
-\cs{jfont}~and~\cs{tfont}. So please see Subsection~\ref{ssec-jfont}.
+\cs{jfont}~and~\cs{tfont}. So please see Subsection~\ref{ssec:jfont}.
 %</en>
 %<*ja>
 plain \TeX で和文フォントを変更するためには,
 \pTeX のように \cs{jfont} 命令や \cs{tfont} 命令を直接用いる.
-\ref{ssec-jfont}節を参照.
+\ref{ssec:jfont}節を参照.
 %</ja>
 
 \paragraph{\LaTeXe\ (NFSS2)}
@@ -1277,7 +1295,7 @@ auto select&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\
       alphabetic fonts to \texttt{T1}.
       \cs{fontfamily} also changes the current Japanese font family,
       the current alphabetic font family, \emph{or both}.
-      For the detail, see Subsection~\ref{ssec-nfsspat}.
+      For the detail, see Subsection~\ref{ssec:nfsspat}.
 %</en>
 %<*ja>
       ここで,\verb+\fontencoding{+<encoding>\verb+}+ は,引数により和文側か欧文
@@ -1286,7 +1304,7 @@ auto select&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\
       \texttt{JY3}に変更し,\verb+\fontencoding{T1}+ は欧文フォント側を
       \texttt{T1}へと変更する.\cs{fontfamily} も引数により和文側,欧文
       側,\emph{あるいは両方}のフォントファミリを変更する.詳細は
-      \ref{ssec-nfsspat}節を参照すること.
+      \ref{ssec:nfsspat}節を参照すること.
 %</ja>
 
 %<*en>
@@ -1310,8 +1328,8 @@ auto select&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\
 \end{lstlisting}
 %<*ja>
 仮名書体を使う場合など,複数の和文フォントを組み合わせて使いたい場合は
-\ref{ssec-altfont}節の \cs{ltjdeclarealtfont} と,その\LaTeX 版の\
-\cs{DeclareAlternateKanjiFont}(\ref{ssec-nfsspat}節)を参照せよ.
+\ref{ssec:altfont}節の \cs{ltjdeclarealtfont} と,その\LaTeX 版の\
+\cs{DeclareAlternateKanjiFont}(\ref{ssec:nfsspat}節)を参照せよ.
 %</ja>
 
 \end{itemize}
@@ -1367,17 +1385,17 @@ $5\in 素:=\{\,p\in\mathbb N:\text{$p$ is a prime}\,\}$.
 %<*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}.
+this chapter. For the method, please see Subsection~\ref{ssec:math}.
 %</en>
 %<*ja>
 また\LuaTeX-jaプロジェクトでは,和文文字が識別子として用いられることはほとんどない
 と考えており,したがってこの節では数式モード中の和文フォントを変更する方法については
-記述しない.この方法については\ref{ssec-math}節を参照のこと.
+記述しない.この方法については\ref{ssec:math}節を参照のこと.
 %</ja>
 
 %<en>\subsection{\Pkg{luatexja-fontspec} package}
 %<ja>\subsection{\Pkg{luatexja-fontspec}パッケージ}
-\label{ssec-fontspec}
+\label{ssec:fontspec}
 %<*en>
 To use the functionality of the \Pkg{fontspec} package to Japanese fonts,
 it is needed to load the \Pkg{luatexja-fontspec} package in the preamble, as follows:
@@ -1478,13 +1496,23 @@ if and only if this \texttt{\textup{match}} option is specified}.
 \item[scale=<float>]
 %<*en>
 Override the ratio of the font size of Japanese fonts to that of alphabetic fonts.
-The default value is calculated automatically (for~example, about~0.924865 when
-            the \Pkg{ltjsarticle} class is used).
+The default value is determined as follows:
+  \begin{itemize}
+    \item The value of \cs{Cjascale} is used, if this control sequence is already defined.
+    \item It is calculated automatically from the current Japanese font at the loading of the
+    package, if \cs{Cjascale} is not defined.
+  \end{itemize}
+\cs{Cjascale} is defined in \Pkg{ltjclasses} and \Pkg{ltjsclasses}.
 %</en>
 %<*ja>
-欧文に対する和文の比率は,標準では \Pkg{luatexja-fontspec}読み込み時の和欧文比率から
-自動計算される(例えば,\Pkg{ltjsarticle}クラス使用時には和文は欧文の約0.924865倍となる)が,
-それを手動で上書きするときに使用する.
+欧文に対する和文の比率を手動で上書きするときに使用する.
+標準では
+\begin{itemize}
+  \item \cs{Cjascale}が定義されている場合
+  \footnote{\LuaTeX-ja が用意しているクラスファイル(\Pkg{ltjclasses},~\Pkg{ltjsclasses})を
+  使う場合はこちらに当てはまる.}は,それを用いる.
+  \item \cs{Cjascale}が未定義の場合は,\Pkg{luatexja-fontspec}読み込み時の和文フォントから自動計算される.
+\end{itemize}
 %</ja>
 \end{cslist}
 
@@ -1562,56 +1590,6 @@ The following presets are defined:
 %<ja>として読み込み,小塚書体(Pr6N)を使うことを指定している.
 %<en> which means that Kozuka~Pr6N fonts will be used in this document.
 
-%<*ja>
-上記のプリセット以外の和文フォント設定を使いたい場合,本来は
-\Pkg{luatexja-fontspec}パッケージの提供する
-\cs{setmainjfont}, \cs{setsansjfont}を使って自分で指定するべきである.
-\texttt{custom}オプションを使うことで,\Pkg{luatexja-preset}パッケージの内部に直接アクセスして
-\begin{lstlisting}
-\usepackage[kozuka-pr6n,          % kozuka-pr6n プリセットを基礎にして,
-  custom={
-    mc=SourceHanSerif-Regular,    % 明朝体(全ウェイト)
-    mc-l=SourceHanSerif-Bold,     % 明朝体細字
-    mc-m=KozMinPr6N-Regular,      % 明朝体中字
-  % mc-bx=KozMinPr6N-Bold,        % 明朝体太字
-  % gt=HirakakuProN-W3,           % ゴシック体(全ウェイト)
-  % gt-m=SourceHanSans-Regular,   % ゴシック体中字(deluxe オプション指定時)
-  % gt-bx=HiraKakuProN-W6,ular,   % ゴシック体太字
-  % gt-eb=HiraKakuProN-W6,ular,   % ゴシック体極太
-    mg-m=HG Maru Gothic PRO,      % 丸ゴシック体
-  },
-  deluxe,expert,jis2004,match,nfssonly
-]{luatexja-preset}
-\end{lstlisting}
-のようにすることもできるが,\texttt{custom}オプションの書式は予告なく変更されることがある
-上,\texttt{90jis}や\texttt{JIS2004}オプションとの相性があまり良くないので推奨はしない.
-%</ja>
-%<*en>
-To use a Japanese font setting which does not match with any presets,
-the legitimate method is to use \cs{setmainjfont}~and~\cs{setsansjfont}
-which are provided by the \Pkg{luatexja-fontspec} package.
-
-One can use the \texttt{custom} option, such as
-\begin{lstlisting}
-\usepackage[kozuka-pr6n,          % based on the kozuka-pr6n preset (Kozuka Pr6N),
-  custom={
-    mc=SourceHanSerif-Regular,    % mincho family (all weights)
-    mc-l=SourceHanSerif-Bold,     % mincho light
-    mc-m=KozMinPr6N-Regular,      % mincho medium
-  % mc-bx=KozMinPr6N-Bold,        % mincho bold
-  % gt=HirakakuProN-W3,           % gothic family (all weights)
-  % gt-m=SourceHanSans-Regular,   % gothic medium (with deluxe option)
-  % gt-bx=HiraKakuProN-W6,ular,   % gothic bold
-  % gt-eb=HiraKakuProN-W6,ular,   % gothic extra bold
-    mg-m=HG Maru Gothic PRO,      % rounded gothic
-  },
-  deluxe,expert,jis2004,match,nfssonly
-]{luatexja-preset}
-\end{lstlisting}
-However, we do not recommend this \cs{custom} option;
-the format might change, and this \cs{custom} option is not well-compatible with
-\texttt{90jis}~nor~\cs{jis2004} options.
-%</en>
 
 %<*en>
 \subsection{\cs{CID}, \cs{UTF}, and macros in \Pkg{japanese-otf} package}
@@ -1654,13 +1632,13 @@ as an external package \Pkg{luatexja-otf}.
 
 これら3オプションについては,
 \Pkg{luatexja-preset} パッケージにプリセットを使う時に一緒に指定するか,
-あるいは対応する内容を\ref{ssec-chgfnt}節,\ref{ssec-nfsspat}節 (NFSS2) や
-\ref{ssec-fontspec}節 (\Pkg{fontspec}) の方法で手動で指定する必要がある.
+あるいは対応する内容を\ref{ssec:chgfnt}節,\ref{ssec:nfsspat}節 (NFSS2) や
+\ref{ssec:fontspec}節 (\Pkg{fontspec}) の方法で手動で指定する必要がある.
 %</ja>
 
 %<en>\subsection{Changing default Japanese fonts}
 %<ja>\subsection{標準和文フォントの変更}
-\label{ssec-cfg}
+\label{ssec:cfg}
 %<*en>
 If \texttt{luatexja.cfg} can be seen from \LuaTeX, \LuaTeX-ja automatically reads it.
 The main use of \texttt{luatexja.cfg} is for changing default Japanese fonts,
@@ -1731,7 +1709,7 @@ parameters, you have to use commands \cs{ltjsetparameter} and
 
 %<en>\subsection{Range of \textbf{JAchar}s}
 %<ja>\subsection{\textbf{JAchar}の範囲}
-\label{ssec-setrange}
+\label{ssec:setrange}
 
 %<*en>
 \LuaTeX-ja divides the Unicode codespace \texttt{U+0080}--\texttt{U+10FFFF}
@@ -2197,10 +2175,10 @@ as follows:
 \ltjsetparameter{alxspmode={`あ,preonly}, jaxspmode={`\!,postonly}}
 \end{lstlisting}
 %<*en>
-One can use also numbers to specify these two parameters (see Subsection~\ref{ssec-param}).
+One can use also numbers to specify these two parameters (see Subsection~\ref{ssec:param}).
 %</en>
 %<*ja>
-また,これら2パラメータには数値で値を指定することもできる(\ref{ssec-param}節を参照).
+また,これら2パラメータには数値で値を指定することもできる(\ref{ssec:param}節を参照).
 %</ja>
 
 %<*en>
@@ -2400,7 +2378,6 @@ 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}
@@ -2409,7 +2386,7 @@ However, the penalty inserted after it is 10 which is the \Param{postbreakpenalt
 \end{quote}
 は,文字コードごとに設定する量である.
 
-\Pkg{fontspec}パッケージを使う(\ref{ssec-fontspec}節)場合など,
+\Pkg{fontspec}パッケージを使う(\ref{ssec:fontspec}節)場合など,
 各種のOpenType featureを適用することもあると思うが,前段落に述べたパラメータ類は,
 \emph{OpenType featureの適用前の文字コードによって適用される.}
 例えば,以下の例において10行目の「ア」は,\verb+hwid+ featureの適用により半角カタカナの「ア」
@@ -2518,7 +2495,7 @@ and \LuaTeX-ja can control these four kinds separately:
 \begin{itemize}
  \item
 \emph{Distinction between \textbf{JAchar} or \textbf{ALchar}}
-is controlled by the character range, see Subsection~\ref{ssec-setrange}.
+is controlled by the character range, see Subsection~\ref{ssec:setrange}.
  \item
 \emph{Whether the character can be used in a control word}
 is controlled by setting \cs{catcode} to 11~(enabled) or 12~(disabled), as usual.
@@ -2535,7 +2512,7 @@ is controlled by the lowermost bit of the \Param{kcatcode} parameter.
 分割している:
 \begin{description}
  \item[欧文/和文の区別 (\upTeX)]
-\cs{ltjdefcharrange} と\textsf{jacharrange}パラメータ(\ref{ssec-setrange}節)
+\cs{ltjdefcharrange} と\textsf{jacharrange}パラメータ(\ref{ssec:setrange}節)
  \item[制御綴中に使用可か]
 \LuaTeX 自身の \cs{catcode} でよい
  \item[\Param{jcharwidowpenalty}が挿入可か]
@@ -2802,7 +2779,9 @@ We implemented this for debugging purpose.
 The fifth column (\emph{utod} direction) corresponds the ``\texttt{tate (math) direction}'' of \pTeX.
 
 Directions can be changed by \cs{yoko},~\cs{tate}, \cs{dtou},~\cs{utod},
-only when the current list is null. Also, the direction of a math formula is changed to
+only when the current list is null.
+These commands cannot be executed in unrestricted horizontal modes, nor math modes.
+The direction of a math formula is changed to
 \emph{utod}, when the direction outside the math formula is \emph{tate} (vertical writing).
 %</en>
 
@@ -2816,6 +2795,8 @@ Down-TO-Upの意味なのだろう.\cs{dtou} を使用する機会はないだ
 
 組方向は,\cs{yoko},~\cs{tate}, \cs{dtou},~\cs{utod} をそれぞれ使用することで,
 現在作成中のリストやボックスが空の時にのみ変更可能である.
+ただし,現在のモードが非制限水平モードや(文中,別行立て問わず)数式モードであるときには
+組方向を変更することは出来ない.
 また,縦組中の数式内のボックスは\pTeX と同じように組方向が \cs{utod} となる.
 %</ja>
 
@@ -3290,7 +3271,7 @@ overridden by \LuaTeX-ja, using~\verb+\protected\def+.
 %<ja>\section{フォントメトリックと和文フォント}
 %<en>\subsection{\cs{jfont}}
 %<ja>\subsection{\cs{jfont} 命令}
-\label{ssec-jfont}
+\label{ssec:jfont}
 
 %<*en>
 To load a font as a Japanese font (for horizontal direction), you must use the
@@ -3527,7 +3508,7 @@ because of the compatibility with previous versions of \LuaTeX-ja.
 \autoref{fig:kern-jfm}を参照.
 \begin{itemize}
  \item \emph{\cs{jfont} や,
-NFSS2用の命令(\ref{ssec-chgfnt}節,\ref{ssec-nfsspat}節)における指定では
+NFSS2用の命令(\ref{ssec:chgfnt}節,\ref{ssec:nfsspat}節)における指定では
 カーニング情報は標準で使用する}ことになっているようである.
 言い換えれば,カーニング情報を使用しない設定にするには,面倒でも
 \begin{lstlisting}
@@ -3660,14 +3641,27 @@ JFM中における \texttt{kanjiskip\_natural}, \texttt{kanjiskip\_stretch},\
 This command admits the same syntax used in \cs{font}~and~\cs{jfont}.
 A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont}:
 \begin{itemize}
- \item Both \texttt{vert}~and~\texttt{vrt2} Opentype features are activated,
-  unless they are explicitly activated or deactivated (as the third line in the example below).
+ \item OpenType Feature~\texttt{vrt2}%
+  \footnote{If the font does not define \texttt{vrt2} feature,
+       use \texttt{vert} instead.} is automatically activated,
+  unless \texttt{vert}~and//or~\texttt{vrt2} are explicitly activated
+  or deactivated (as the second line in the example below).
 \begin{lstlisting}
-\tfont\S=file:KozMinPr6N-Regular.otf:jfm=ujisv
-    % vert and vrt2 are automatically activated
+\tfont\S=file:KozMinPr6N-Regular.otf:jfm=ujisv % vrt2 is automatically activated
 \tfont\T=file:KozMinPr6N-Regular.otf:jfm=ujisv;-vert % vert and vrt2 are not activated
+\tfont\U=file:ipaexm.ttf:jfm=ujisv
+    % vert is automatically activated, since this font does not have vrt2
 \end{lstlisting}
- \item ...
+ \item Sometimes \texttt{vert} and/or \texttt{vrt2} are not activated
+ while one specified activation of these feature.
+ This is because the font does not define these features in current combination of
+ script~tag and language~system~identifier.
+
+ In this situation, \LuaTeX-ja performs all replacements which is defined in~\texttt{vert}
+ feature for \emph{some} scripts for \emph{some} languages.
+ \item Furthermore, a glyph is automatically rotated 90~degrees,
+  if it is not replaced by \texttt{vert} feature for \emph{any} script
+  for \emph{any} language, and if it is marked as `r''~or~``Tr'' in UAX~\#50.
  \item One have to specify the name of vertical JFM in  \texttt{jfm=<name>}.
 \LuaTeX-ja ships following vertical JFMs:
 \begin{description}
@@ -3685,15 +3679,33 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont
 \cs{tfont} で定義された縦組用和文フォントは,
 以下の点が \cs{jfont} による横組用和文フォントとは異なる:
 \begin{itemize}
- \item 自動的に \texttt{vert}, \texttt{vrt2} の両OpenType featureが有効化される.
-但し,以下の例の3行目に示すように,明示的に \texttt{vert}, \texttt{vrt2}(のいずれか)の
-有効・無効を指定した場合は別である.
+ \item 明示的に \texttt{vert}, \texttt{vrt2}(のいずれか)の
+  有効・無効を指定した場合を除き,自動的に OpenType feature~\texttt{vrt2} の有効化が
+  指定されたものとみなされる
+ \footnote{もしフォントが\texttt{vrt2}を定義していなかった場合,代わりに
+ \texttt{vert}を用いる.}.
 \begin{lstlisting}
-\tfont\S=file:KozMinPr6N-Regular.otf:jfm=ujisv
-    % vert and vrt2 are automatically activated
+\tfont\S=file:KozMinPr6N-Regular.otf:jfm=ujisv % vrt2 is automatically activated
 \tfont\T=file:KozMinPr6N-Regular.otf:jfm=ujisv;-vert % vert and vrt2 are not activated
+\tfont\U=file:ipaexm.ttf:jfm=ujisv
+    % vert is automatically activated, since this font does not have vrt2
 \end{lstlisting}
- \item \ref{ssec-math}節で述べる,数式中の和文フォントには縦組用和文フォントは指定できない.
+ \item \texttt{vert}, \texttt{vrt2} の少なくとも一つの有効を指定した場合にも関わらず,
+  script tagとlanguage system identifierの値の組み合わせによって
+  実際には有効にならなかった場合,\LuaTeX-jaは
+ \begin{quote}
+   どれかのscript,~languageで定義されている\texttt{vert}による
+   (単一グリフから単一グリフへの)置換を全部適用する
+ \end{quote}
+  という挙動を取る\footnote{%
+  例えば,Windows~7に付属しているSimHeiでは,\texttt{vert}はScriptが\texttt{hani},
+  Languageが\texttt{CHN}という状況でのみ定義されている.しかし,\Pkg{luaotfload}では
+  このscript,~languageの組み合わせを指定することはできないので,
+  \Pkg{luaotfload}そのままでは\texttt{vert}を適用させることはできない.
+ }.
+ \item さらに,「いかなるscript,~languageでも\texttt{vert}により置換されない」グリフ
+  のうち,UAX~\#50で``r''もしくは``Tr''と指定されているものは90度自動回転させる.
+ \item \ref{ssec:math}節で述べる,数式中の和文フォントには縦組用和文フォントは指定できない.
  \item \texttt{jfm=<name>}\ の部分には縦組用JFMを指定する.
 以下の縦組用JFMが\LuaTeX-jaには同梱されている.%おり,違いを\autoref{tab-difjfm-tate}に示した.
 \begin{description}
@@ -3712,7 +3724,7 @@ A font defined by~\cs{tfont} differs the following points from that by~\cs{jfont
 
 %<en>\subsection{Prefix \texttt{psft}}
 %<ja>\subsection{\texttt{psft}プリフィックス}
-\label{ssec-psft}
+\label{ssec:psft}
 %<*en>
 Besides ``\texttt{file:}''\ and ``\texttt{name:}''\ prefixes which
 are introduced in the \Pkg{luaotfload} package,
@@ -3815,7 +3827,7 @@ Please contact the LuaTeX-ja project team.
 
 %<en>\subsection{Structure of a JFM file}
 %<ja>\subsection{JFMファイルの構造}
-\label{ssec-jfm-str}
+\label{ssec:jfm-str}
 %<en>A JFM file is a Lua script which has only one function call:
 %<ja>JFMファイルはただ一つの関数呼び出しを含むLuaスクリプトである:
 \begin{lstlisting}
@@ -4273,7 +4285,7 @@ we specify <ratio> to $0.25/(0.5+0.25)=1/3$.
 \begin{cslist}[style=standard]
 \item[priority=<priority>]
              \Pkg{luatexja-adjust}による優先順位付き
-            行長調整(\ref{ssec-adj}節)において,このグルーの優先度を指定する.許される値は以下の通り:
+            行長調整(\ref{ssec:adj}節)において,このグルーの優先度を指定する.許される値は以下の通り:
   \begin{description}
     \item[バージョン1] $-4$から$+3$の間の整数
     \item[バージョン2以降] $-4$から$+3$の間の整数の2つ組\texttt{\{<stretch>, <shrink>\}}か,
@@ -4322,7 +4334,7 @@ An integer in $[-4,3]$ (treated as 0 if omitted), or
 a pair of these integers \texttt{\{<stretch>, <shrink>\}} (version 2~or~later).
 This is
 used only in line adjustment with priority by \Pkg{luatexja-adjust}
-(see Subsection~\ref{ssec-adj}). Higher value means the glue is easy to stretch,
+(see Subsection~\ref{ssec:adj}). Higher value means the glue is easy to stretch,
 and is also easy to shrink. 
 \item[kanjiskip\_natural=<num>\textrm{, }%
   kanjiskip\_stretch=<num>\textrm{, }kanjiskip\_shrink=<num>]\leavevmode
@@ -4374,7 +4386,7 @@ Hence we have the following result:
 
 優先順位付き行長調整が有効であり,かつ現在の文字クラスの文字が
   行末に来た時に,この文字と行末の間には指定された値のいずれかの大きさのカーンが
-  挿入される(\autoref{ssec-adj}参照).
+  挿入される(\autoref{ssec:adj}参照).
 
 バージョン1における
 \begin{lstlisting}[escapechar=\$]
@@ -4600,7 +4612,7 @@ JFM側で一部の対処ができることにより,\Pkg{jsclasses}のよう
 
 %<en>\subsection{Math font family}
 %<ja>\subsection{数式フォントファミリ}
-\label{ssec-math}
+\label{ssec:math}
 
 %<*en>
 \TeX\ handles fonts in math formulas by 16~font families\footnote{Omega,
@@ -4945,7 +4957,7 @@ Then, the position of glyphs is shifted up by
 %<en>\section{Parameters}
 %<ja>\section{パラメータ}
 \subsection{\cs{ltjsetparameter}}
-\label{ssec-param}
+\label{ssec:param}
 
 %<*en>
 As described before, \cs{ltjsetparameter} and \cs{ltjgetparameter} are
@@ -5175,7 +5187,7 @@ The default glue which inserted between two \textbf{JAchar}s.
 Changing current Japanese font does not alter this parameter, as \pTeX.
 
 If the natural width of this parameter is \cs{maxdimen}, \LuaTeX-ja uses
-the value which is specified in the JFM for current Japanese font (See Subsection~\ref{ssec-jfm-str}).
+the value which is specified in the JFM for current Japanese font (See Subsection~\ref{ssec:jfm-str}).
 %</en>
 
 \item[\DParam{xkanjiskip}\,=<skip>$^\ast$] [\cs{xkanjiskip}]\
@@ -5191,7 +5203,7 @@ The default glue which inserted between a \textbf{JAchar} and an
 Changing current font does not alter this parameter, as \pTeX.
 
 As \Param{kanjiskip}, if the natural width of this parameter is \cs{maxdimen}, \LuaTeX-ja uses
-the value which is specified in the JFM for current Japanese font (See Subsection~\ref{ssec-jfm-str}).
+the value which is specified in the JFM for current Japanese font (See Subsection~\ref{ssec:jfm-str}).
 %</en>
 
 
@@ -5220,7 +5232,7 @@ The default value is \texttt{paverage}. \dots
 %</en>
 %<*ja>
 デフォルト値は \texttt{paverage} である.
-各々の値による差異の詳細は\ref{ssec-cluster-wa}節の「『右空白』の算出」を参照してほしい.
+各々の値による差異の詳細は\ref{ssec:cluster-wa}節の「『右空白』の算出」を参照してほしい.
 %</ja>
 
 \item[\DParam{jacharrange}\,=<ranges>]
@@ -5246,7 +5258,7 @@ the behavior of this assignment is undefined.
 
 
 \subsection{\cs{ltjgetparameter}}
-\label{ssec-getpar}
+\label{ssec:getpar}
 %<*en>
 \cs{ltjgetparameter} is a control sequence for acquiring parameters. It
 always takes a parameter name as first argument.
@@ -5445,6 +5457,56 @@ The correct way is using a temporary register.
 
 \end{itemize}
 
+
+%<*en>
+\subsection{Alternative Commands to \cs{ltjsetparameter}}
+The basic method to set parameters of \LuaTeX-ja is to use
+\cs{ltjsetparameter}~or~\cs{ltjglobalsetparameter}.
+However, these commands are slow, because they parse a key-value list,
+so several alternative commands are used in \LuaTeX-ja.
+\emph{This subsection is not for general \LuaTeX-ja users.}
+
+\paragraph{Setting \Param{kanjiskip}~or~\Param{xkanjiskip}}
+In \Pkg{ltjsclasses}, every size-changing command such as \cs{Large}
+changes \cs{kanjiskip}~and~\cs{xkanjiskip}.
+But a simple implementation, as the code below, is slow since
+two key-value lists are parsed by \cs{ltjsetparameter}:
+\begin{lstlisting}
+  \ltjsetparameter{kanjiskip=0\zw plus .1\zw minus .01\zw}
+  \@tempskipa=\ltjgetparameter{xkanjiskip}
+  \ifdim\@tempskipa>\z@
+    \if@slide
+      \ltjsetparameter{xkanjiskip=0.1em}
+    \else
+      \ltjsetparameter{xkanjiskip=0.25em plus 0.15em minus 0.06em}
+    \fi
+  \fi
+\end{lstlisting}
+
+Hence, \LuaTeX-ja defines more primitive commands, namely \cs{ltj@setpar@global},
+\cs{ltjsetkanjiskip}, and~\cs{ltjsetxkanjiskip}. Here
+\begin{quote}
+  \lstinline+\ltj@setpar@global\ltjsetkanjiskip 10pt+
+\end{quote}
+and \lstinline+\ltjsetparameter{kanjiskip=10pt}+ has the same effect.
+The actual code of \Pkg{ltjsclasses} is shown below:
+\begin{lstlisting}
+  \ltj@setpar@global
+  \ltjsetkanjiskip{\z@ plus .1\zw minus .01\zw}
+  \@tempskipa=\ltjgetparameter{xkanjiskip}
+  \ifdim\@tempskipa>\z@
+    \if@slide
+      \ltjsetxkanjiskip.1em
+    \else
+      \ltjsetxkanjiskip.25em plus .15em minus .06em
+    \fi
+  \fi
+\end{lstlisting}
+
+Note that using \cs{ltjsetkanjiskip}~or~\cs{ltjsetxkanjiskip} alone,
+that is, without executing \cs{ltj@setpar@global} in advance, is \emph{not} supported.
+%</en>
+
 %<*ja>
 \subsection{\cs{ltjsetparameter} の代替}
 原則として各種内部パラメータの設定には \cs{ltjsetparameter} もしくは
@@ -5453,7 +5515,7 @@ The correct way is using a temporary register.
 \LuaTeX-ja の内部ではより高速に実行できる別の形式を用いている.
 \emph{本節は一般利用者むけの内容ではない.}
 
-\paragraph{\Param{kanjiskip}, \Param{xkanjiskip} の設定}
+\paragraph{\Param{kanjiskip}, \Param{xkanjiskip}の設定}
 \pLaTeXe 新ドキュメントクラスでは,
 \begin{lstlisting}
 \def\@setfontsize#1#2#3{%
@@ -5716,7 +5778,7 @@ As an example, the example above can be improved as follows:
 
 
 \subsection{\cs{ltjdeclarealtfont}}
-\label{ssec-altfont}
+\label{ssec:altfont}
 %<*en>
 Using \cs{ltjdeclarealtfont}, one can ``compose'' more than one Japanese fonts.
 This \cs{ltjdeclarealtfont} uses in the following form:
@@ -5785,7 +5847,7 @@ are typeset by \cs{piyo}.
 \subsection{\cs{ltjalchar} と \cs{ltjjachar}}
 文字コードが$\text{<chr\_code>}~(\geq 128=\mathtt{0x80})$の文字を
 \ \cs{char} プリミティブを使い \cs{char}<chr\_code> として出力させると,
-その文字の属する文字範囲(\ref{ssec-setrange}節参照)によって
+その文字の属する文字範囲(\ref{ssec:setrange}節参照)によって
 \textbf{ALchar}か\textbf{JAchar}か,つまり欧文フォントで出力されるか和文フォントで出力され
 るかが決まる.
 
@@ -5796,7 +5858,7 @@ are typeset by \cs{piyo}.
 <chr\_code>が127以下の場合は,\cs{ltjjachar} であっても\textbf{ALchar}として出力されること
 に注意.
 
-以下は\ref{ssec-setrange}節に載せた例に,\cs{char} の動作を追加したものである.
+以下は\ref{ssec:setrange}節に載せた例に,\cs{char} の動作を追加したものである.
 \begin{LTXexample}[width=0.25\textwidth]
 \gtfamily\large % default, ALchar, JAchar
 ¶, \char`¶, \ltjalchar`¶, \ltjjachar`¶\\    % default: ALchar
@@ -5809,19 +5871,19 @@ are typeset by \cs{piyo}.
 
 %<en>\subsection{Patch for NFSS2}
 %<ja>\subsection{NFSS2へのパッチ}
-\label{ssec-nfsspat}
+\label{ssec:nfsspat}
 
 %<*en>
 Japanese patch for NFSS2 in \LuaTeX-ja
 is based on \texttt{plfonts.dtx} which plays the same role in \pLaTeXe.
 We will describe
-commands which are not described in Subsection~\ref{ssec-chgfnt}.
+commands which are not described in Subsection~\ref{ssec:chgfnt}.
 %</en>
 %<*ja>
 \LuaTeX-jaのNFSS2への日本語パッチは
 \pLaTeXe で同様の役割を果たす \texttt{plfonts.dtx} をベースに,
 和文エンコーディングの管理等をLuaで書きなおしたものである.
-ここでは\ref{ssec-chgfnt}節で述べていなかった命令について
+ここでは\ref{ssec:chgfnt}節で述べていなかった命令について
 記述しておく.
 %</ja>
 
@@ -5948,17 +6010,16 @@ assignment, where \cs{DeclareRelationFont} does a global assignment.
 
 \item[\cs{userelfont}]
 %<*en>
-Change current alphabetic font encoding/family/\dots\ to the `accompanied' alphabetic
-            font family with respect to current Japanese font family,
-            which was set by
-            \cs{DeclareRelationFont} or \cs{SetRelationFont}.
-Like \cs{fontfamily}, \cs{selectfont} is required to take an effect.
+(Only)~at the next call of \cs{selectfont},
+  change current alphabetic font encoding/family/\dots\ to the `accompanied' alphabetic
+  font family with respect to current Japanese font family,
+  which was set by
+  \cs{DeclareRelationFont} or \cs{SetRelationFont}.
 %</en>
 %<*ja>
-現在の欧文フォントのエンコーディング/ファミリ/…… を,
+次回(のみ)の\cs{selectfont}の実行時に,現在の欧文フォントのエンコーディング/ファミリ/…… を,
 \cs{DeclareRelationFont} か \cs{SetRelationFont} で指定された
 現在の和文フォントに対応する「従属欧文」フォントに変更する.
-\cs{fontfamily} のように,有効にするためには \cs{selectfont} が必要である.
 %</ja>
 
 \item[\cs{adjustbaseline}]
@@ -5999,11 +6060,11 @@ character whose character class is zero,  instead of `あ'.
 \item[\cs{fontfamily}\{<family>\}]
 %<*en>
 As in \LaTeXe, this command changes current font family (alphabetic, Japanese,~\emph{or both})
-to <family>. See Subsection~\ref{ssec-fontfamilycmd} for detail.
+to <family>. See Subsection~\ref{ssec:fontfamilycmd} for detail.
 %</en>
 %<*ja>
 元々の\LaTeXe におけるものと同様に,このコマンドは現在のフォントファミリ(欧文,
-和文,\emph{もしくは両方})を<family>に変更する.詳細は\ref{ssec-fontfamilycmd}節を参照すること.
+和文,\emph{もしくは両方})を<family>に変更する.詳細は\ref{ssec:fontfamilycmd}節を参照すること.
 %</ja>
 
 
@@ -6026,7 +6087,7 @@ to <family>. See Subsection~\ref{ssec-fontfamilycmd} for detail.
 \item[\cs{DeclareAlternateKanjiFont}\{<base-encoding>\}\{<base-family>\}\{<base-series>\}\{<base-shape>\}\\
   \null\hfill\{<alt-encoding>\}\{<alt-family>\}\{<alt-series>\}\{<alt-shape>\}\{<range>\}]
 %<*ja>
-\ref{ssec-altfont}節の\
+\ref{ssec:altfont}節の\
 \cs{ltjdeclarealtfont} と同様に,前半の4引数の
 和文フォント(基底フォント)のうち<range>中の文字を
 第5から第8引数の和文フォントを使って組むように指示する.
@@ -6046,7 +6107,7 @@ to <family>. See Subsection~\ref{ssec-fontfamilycmd} for detail.
 \end{itemize}%
 %</ja>
 %<*en>
-As \cs{ltjdeclarealtfont}~(Subsection~\ref{ssec-altfont}),
+As \cs{ltjdeclarealtfont}~(Subsection~\ref{ssec:altfont}),
 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
@@ -6083,7 +6144,7 @@ Avant Garde (OT1/pag/m/n) に変わっていることがわかる.
 
 %<en>\subsection{Detail of \cs{fontfamily} command}
 %<ja>\subsection{\cs{fontfamily}コマンドの詳細}
-\label{ssec-fontfamilycmd}
+\label{ssec:fontfamilycmd}
 %<*en>
 In this subsection, we describe when \cs{fontfamily}<family> changes current
 Japanese/alphabetic font family. Basically, current Japanese fotn family is changed to
@@ -6320,9 +6381,9 @@ by \cs{input}.
 \cs{input} で読み込み可能である.
 %</ja>
 \subsection{\Pkg{luatexja-fontspec}}
-\label{ssec-fontspec2}
+\label{ssec:fontspec2}
 %<*en>
-As described in Subsection~\ref{ssec-fontspec}, this optional package
+As described in Subsection~\ref{ssec:fontspec}, this optional package
 provides the counterparts for several commands defined in the
 \Pkg{fontspec} package (requires \Pkg{fontspec}~v2.4).
 In addition to OpenType font features in the original \Pkg{fontspec},
@@ -6330,7 +6391,7 @@ the following ``font features'' specifications are allowed for
 the commands of Japanese version:
 %</en>
 %<*ja>
-\ref{ssec-fontspec}節で述べたように,この追加パッケージは\Pkg{fontspec}%
+\ref{ssec:fontspec}節で述べたように,この追加パッケージは\Pkg{fontspec}%
 パッケージで定義されているコマンドに対応する和文フォント用のコマンドを提供する.
 
 \Pkg{fontspec}パッケージで指定可能な各種OpenType機能に加えて,和文版のコマンドには
@@ -6344,7 +6405,7 @@ the commands of Japanese version:
 %<*en>
 These 3 keys correspond to \texttt{cid}, \texttt{jfm} and
 \texttt{jfmvar} keys for \cs{jfont}~and~\cs{tfont} respectively.
-See Subsections~\ref{ssec-jfont} and \ref{ssec-psft} for details
+See Subsections~\ref{ssec:jfont} and \ref{ssec:psft} for details
  of \texttt{cid}, \texttt{jfm} and
 \texttt{jfmvar} keys.
 
@@ -6356,8 +6417,8 @@ will be actually used in \texttt{YokoFeatures}~and~\texttt{TateFeatures} keys.
 %<*ja>
 これら3つのキーはそれぞれ \cs{jfont},~\cs{tfont}に対する
 \texttt{cid}, \texttt{jfm}, \texttt{jfmvar}キーとそれぞれ対応する.
-\texttt{cid}, \texttt{jfm}, \texttt{jfmvar}キーの詳細は\ref{ssec-jfont}節
-            と\ref{ssec-psft}節を参照.
+\texttt{cid}, \texttt{jfm}, \texttt{jfmvar}キーの詳細は\ref{ssec:jfont}節
+            と\ref{ssec:psft}節を参照.
 
 \texttt{CID} キーは下の \texttt{NoEmbed} と合わせて用いられたときのみ有効である.
 また,横組用JFMと縦組用JFMは共用できないため,実際に \texttt{JFM} キーを用いる際は
@@ -6368,11 +6429,11 @@ will be actually used in \texttt{YokoFeatures}~and~\texttt{TateFeatures} keys.
 \item[NoEmbed]
 %<*en>
 By specifying this key, one can use ``name-only'' Japanese font which
-will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}.
+will not be embedded in the output PDF file. See Subsection~\ref{ssec:psft}.
 %</en>
 %<*ja>
 これを指定することで,PDFに埋め込まれない「名前だけ」のフォントを指定することが
-できる.\ref{ssec-psft}節を参照.
+できる.\ref{ssec:psft}節を参照.
 %</ja>
 
 \begin{figure}[!tb]
@@ -6444,16 +6505,16 @@ A demonstrarion is shown in \autoref{fig:yokotate-fontspec}.
 \item[AltFont]
 
 %<*en>
-As \cs{ltjdeclarealtfont}~(Subsection~\ref{ssec-altfont}) and
-\cs{DeclareAlternateKanjiFont}~(Subsection~\ref{ssec-nfsspat}),
+As \cs{ltjdeclarealtfont}~(Subsection~\ref{ssec:altfont}) and
+\cs{DeclareAlternateKanjiFont}~(Subsection~\ref{ssec:nfsspat}),
 with this key, one can typeset some Japanese characters
 by a different font and/or using different features.
 The \texttt{AltFont} feature takes a comma-separated list of comma-separated lists,
 as the following:
 %</en>
 %<*ja>
-\ref{ssec-altfont}節の \cs{ltjdeclarealtfont} や,
-\ref{ssec-nfsspat}節の \cs{DeclareAlternateKanjiFont} と同様に,
+\ref{ssec:altfont}節の \cs{ltjdeclarealtfont} や,
+\ref{ssec:nfsspat}節の \cs{DeclareAlternateKanjiFont} と同様に,
 このキーを用いると一部の文字を異なったフォントや機能たちを使って組むことができる.
 \texttt{AltFont} キーに指定する値は,次のように二重のコンマ区切りリストである:
 %</ja>
@@ -6553,7 +6614,7 @@ OpenType機能指定は
 
 
 \subsection{\Pkg{luatexja-otf}}
-\label{ssec-ltjotf}
+\label{ssec:ltjotf}
 %<*en>
 This optional package supports typesetting glyphs
 by specifying a CID number.
@@ -6659,7 +6720,7 @@ JFMの\texttt{chars}テーブルのエントリとして \verb+'AJ1-xxx'+ の形
 %</ja>
 
 \subsection{\Pkg{luatexja-adjust}}
-\label{ssec-adj}
+\label{ssec:adj}
 \begin{figure}[t]
 \def\sq{%
   \hbox to 1\zw{\hss\fboxsep=-.5\fboxrule\fbox{%
@@ -7120,8 +7181,8 @@ package to use several ``presets'' of Japanese fonts.
 This package provides functions in a part of \Pkg{japanese-otf} package (changing fonts)
 and a part of \Pkg{PXchfon} package (presets) by Takayuki Yato.
 
-One can specified other options other than listed below.
-These are simply passed to the \Pkg{luatexja-fontspec}\footnote{if \texttt{nfssonly} option is
+Options which are given in \cs{usepackage} but not described in this~subsection
+are simply passed to the \Pkg{luatexja-fontspec}\footnote{if \texttt{nfssonly} option is
 \emph{not} specified; in this case these options are simply ignored.}.
 For example, the line~5 in below example is equivalent to lines 1--3.
 %</en>
@@ -7131,7 +7192,8 @@ For example, the line~5 in below example is equivalent to lines 1--3.
 \Pkg{otf}パッケージの一部(多書体化)と八登崇之氏による\Pkg{PXchfon}パッケージの一部(プリセット指定)
 とを合わせたような格好をしている.
 
-オプションとして,以下のリストにないものも指定することができるが,それらは
+パッケージ読み込み時に渡されたオプションのうち,
+本節にないものを指定した場合,それらはそのまま
 \Pkg{luatexja-fontspec}パッケージに渡される\footnote{\texttt{nfssonly} オプションが
 指定されていた場合は,\Pkg{luatexja-fontspec}パッケージは読み込まれないので単純に無視され
 る.}.例えば,下の1--3行目は5行目のように一行にまとめることができる.
@@ -7144,6 +7206,10 @@ For example, the line~5 in below example is equivalent to lines 1--3.
 \usepackage[no-math,match,kozuka-pr6n]{luatexja-preset}
 \end{lstlisting}
 
+%<en>\subsubsection{General Options}
+%<ja>\subsubsection{一般的なオプション}
+\label{sssec:ltjpreset-general}
+
 \begin{cslist}[before*=]
 \item[fontspec%
 %<en>\textrm{~(enabled by default)}
@@ -7338,8 +7404,10 @@ We didn't taken account of  when both \texttt{90jis} and \texttt{jis2004} are sp
 両オプションが同時に指定された場合の動作については全く考慮していない.
 %</ja>
 
-%<en>\paragraph{Presets for multi weight}
-%<ja>\paragraph{多ウェイト用プリセットの一覧}
+%<en>\subsubsection{Presets which support multi weights}
+%<ja>\subsubsection{多ウェイト用プリセットの一覧}
+\label{sssec:ltjpreset-multi}
+
 %<*en>
 Besides \texttt{morisawa-pro}~and~\texttt{morisawa-pr6n} presets,
 fonts are specified by font name, not by file name.
@@ -7444,7 +7512,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
  \item[morisawa-pro]  Morisawa Pro (Adobe-Japan1-4) fonts.
 %<en>    \\*[-\dimexpr\medskipamount+\baselineskip\relax]
  \item[morisawa-pr6n]  Morisawa Pr6N (Adobe-Japan1-6, JIS04-savvy) fonts.
-\begin{center}\small
+\begin{center}\footnotesize
 \begin{tabular}{ll>{\tt}l>{\tt}l}
 \toprule
 \bf family&\bf series&morisawa-pro&morisawa-pr6n\\
@@ -7622,11 +7690,11 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 \end{tabular}
 \end{center}
 
-
-
 \end{cslist}
-%<en>\paragraph{Presets for single weight}
-%<ja>\paragraph{単ウェイト用プリセット一覧}
+%<en>\subsubsection{Presets which do not support multi weights}
+%<ja>\subsubsection{単ウェイト用プリセット一覧}
+\label{sssec:ltjpreset-single}
+
 %<*en>
 Next, we describe settings for using only single weight.
 %</en>
@@ -7647,16 +7715,17 @@ Next, we describe settings for using only single weight.
 &IPA Gothic&IPAex Gothic&MS Gothic\\
 %</en>
 %<*ja>
-\gtfamily 明朝&Ryumin-Light(非埋込)
+\gtfamily 明朝&Ryumin-Light(非埋込)
 &IPA明朝&IPAex明朝&MS明朝\\
-\gtfamily ゴシック&GothicBBB-Medium(非埋込)
+\gtfamily ゴシック&GothicBBB-Medium(非埋込)
 &IPAゴシック&IPAexゴシック&MSゴシック\\
 %</ja>
 \bottomrule
 \end{tabular}\par\medskip}
 
-%<en>\paragraph{Using HG fonts}
-%<ja>\paragraph{HGフォントの利用}
+%<en>\subsubsection{Presets which use HG fonts}
+%<ja>\subsubsection{HGフォントを使うプリセット}
+\label{sssec:ltjpreset-hg}
 %<*en>
 We can use HG~fonts bundled with Microsoft~Office for realizing multiple weights.
 In the table below, starred fonts (e.g., IPA~Gothic*) are used
@@ -7683,19 +7752,19 @@ only if \texttt{jis2004} or \texttt{nodeluxe} option is spefified.
 \textit{gothic}&bold&HG Gothic E&HG Gothic E&HG Gothic E\\\cmidrule{2-5}
 &extra bold&HG Soei Kaku Gothic UB&HG Soei Kaku Gothic UB&HG Soei Kaku Gothic UB\\\midrule
 \textit{rounded gothic}&&
-HG Maru Gothic PRO&HG Maru Gothic PRO&HG Maru Gothic PRO\\
+HG MaruGothic M PRO&HG MaruGothic M PRO&HG MaruGothic M PRO\\
 %</en>
 %<*ja>
 &medium&IPA明朝&IPAex明朝&MS明朝\\
-\smash{\raisebox{1.5ex}{\textgt{明朝}}}%
+\smash{\raisebox{1.5ex}{\textgt{明朝}}}%
 &bold&HG明朝E&HG明朝E&HG明朝E\\\midrule
 &&IPAゴシック*&IPAexゴシック*&MSゴシック*\\
 &\smash{\raisebox{1.5ex}{medium}}%
 &HGゴシックM&HGゴシックM&HGゴシックM\\\cmidrule{2-5}
-\textgt{ゴシック}&bold&HGゴシックE&HGゴシックE&HGゴシックE\\\cmidrule{2-5}
+\textgt{ゴシック}&bold&HGゴシックE&HGゴシックE&HGゴシックE\\\cmidrule{2-5}
 &extra bold&HG創英角ゴシックUB&HG創英角ゴシックUB&HG創英角ゴシックUB\\\midrule
-\textgt{丸ゴシック}&&
-HG丸ゴシック体PRO&HG丸ゴシック体PRO&HG丸ゴシック体PRO\\
+\textgt{丸ゴシック}&&
+HG丸ゴシックM-PRO&HG丸ゴシックM-PRO&HG丸ゴシックM-PRO\\
 %</ja>
 \bottomrule
 \end{tabular}\par\medskip}
@@ -7721,6 +7790,138 @@ are internally specified by:
 として指定を行っているので注意すること.
 %</ja>
 
+%<en>\subsubsection{Define/Use Custom Presets}
+%<ja>\subsubsection{新たなプリセットの定義}
+
+%<*ja>
+バージョン********.0以降では,自分で新たなプリセットを定義することが出来るようになった.
+以下に説明する2命令はプリアンブルでしか実行できない.
+%</ja>
+%<*en>
+From version~********.0, one can define new presets using \cs{ltjnewpreset},
+and use them by \cs{ltjapplypreset}. These two commands can only be used in the preamble.
+%</en>
+\begin{cslist}
+ \item[\cs{ltjnewpreset}\{<name>\}\{<specification>\}]
+%<*ja>
+  新たに<name>という名称のプリセットを定義する.この名称は,
+  すでに定義されているプリセット名や,
+  \ref{sssec:ltjpreset-general}で定義されているオプション,さらに
+  次の9つと重複してはならない.
+  \begin{quote}
+       \ttfamily
+       mc mc-l mc-m mc-bx gt gt-m gt-bx gt-eb mg-m
+  \end{quote}
+
+  <specification>は,プリセット名や以下のキー達のコンマ区切りリストを指定する:
+  \begin{description}
+   \item[\ttfamily mc-l=<font>] 明朝体細字(\cs{mcfamily}\cs{ltseries})
+   \item[\ttfamily mc-m=<font>] 明朝体中字(\cs{mcfamily}\cs{mdseries})
+   \item[\ttfamily mc-bx=<font>] 明朝体太字(\cs{mcfamily}\cs{bfseries})
+   \item[\ttfamily gt-m=<font>] ゴシック体中字(\cs{gtfamily}\cs{mdseries})
+   \item[\ttfamily gt-bx=<font>] ゴシック体太字(\cs{gtfamily}\cs{bfseries})
+   \item[\ttfamily gt-eb=<font>] ゴシック体太字(\cs{gtfamily}\cs{ebseries})
+   \item[\ttfamily mg-m=<font>] 丸ゴシック体(\cs{mgfamily})
+   \item[\ttfamily mc=<font>] 明朝体の細字・中字・太字全部を設定.
+       以下を指定したことと同じである:
+       \begin{quote}
+         \ttfamily mc-l=<font>, mc-m=<font>, mc-bx=<font>
+       \end{quote}
+   \item[\ttfamily gt=<font>] ゴシック体の中字・太字・極太全部を設定.
+       以下を指定したことと同じである:
+       \begin{quote}
+         \ttfamily gt-m=<font>, gt-bx=<font>, gt-eb=<font>
+       \end{quote}
+  \end{description}
+  なお,パッケージ読み込み時に \texttt{deluxe} が有効でない場合は,
+  上記9キーのうち\texttt{mc}, \texttt{gt}しか実質的に意味を持たない.  
+%</ja>
+%<*en>
+  Define new preset~<name>. This <name> cannot be same as other presets,
+  options described in Subsubsection~\ref{sssec:ltjpreset-general}, nor
+  following nine strings:
+  \begin{quote}
+       \ttfamily
+       mc mc-l mc-m mc-bx gt gt-m gt-bx gt-eb mg-m
+  \end{quote}
+
+  <specification> is a comma-separated list which consists of
+  other presets and/or the following keys:
+  \begin{description}
+   \item[\ttfamily mc-l=<font>] mincho light
+   \item[\ttfamily mc-m=<font>] mincho medium
+   \item[\ttfamily mc-bx=<font>] mincho bold
+   \item[\ttfamily gt-m=<font>] gothic medium
+   \item[\ttfamily gt-bx=<font>] gothic bold
+   \item[\ttfamily gt-eb=<font>] gothic extra~bold
+   \item[\ttfamily mg-m=<font>] rounded gothic
+   \item[\ttfamily mc=<font>] Same as
+       \begin{quote}
+         \ttfamily mc-l=<font>, mc-m=<font>, mc-bx=<font>
+       \end{quote}
+   \item[\ttfamily gt=<font>] Same as
+       \begin{quote}
+         \ttfamily gt-m=<font>, gt-bx=<font>, gt-eb=<font>
+       \end{quote}
+  \end{description}
+  If \texttt{deluxe} is not specified at loading the package,
+  only \texttt{mc}~and~\texttt{gt} keys (among above 9~keys) have a meaning.
+%</en>
+ \item[\cs{ltjnewpreset}*\{<name>\}\{<specification>\}]
+%<*ja>
+  \cs{ltjnewpreset}とほぼ同じであるが,こちらはすでに定義されているプリセット名
+  を<name>に指定した場合にはエラーを出さずに定義を置き換える.
+%</ja>
+%<*en>
+  Almost same as \cs{ltjnewpreset}. However, if <name> matches a preset which already defined,
+  this command simply overwrite it.
+%</en>
+ \item[\cs{ltjapplypreset}\{<name>\}]
+%<ja> <name>で指定されたプリセットを使って和文フォントを設定する.
+%<en> Set Japanese font families using preset~<name>.
+\end{cslist}
+
+%<*ja>
+なお,\cs{ltjnewpreset}の第二引数<specification>に含まれる
+プリセット名は\cs{ltjnewpreset}の時点で定義されている必要はなく,
+\cs{ltjapplypreset}で実際に使うときに定義されていれば良い.
+そのため,次のような記述も可能である:
+\begin{lstlisting}
+  \ltjnewpreset{hoge}{piyo,mc-bx=HiraMinProN-W6}
+  \ltjnewpreset{piyo}{mg-m=HiraMaruProN-W4}
+  \ltjapplypreset{hoge}
+\end{lstlisting}
+
+\paragraph{注意}
+\cs{ltjnewpreset}で定義したプリセットには以下の制限がある.
+\begin{itemize}
+  \item 非埋め込みのフォントを指定することはできない.
+  \item \texttt{ipa-hg}などのいくつかのプリセットでは
+  「\texttt{90jis}, \texttt{jis2004}が指定されているか否かでフォントの指定を変える」処理が
+  行われていたが,\cs{ltjnewpreset}で定義したプリセットではこの処理は働かない.
+  HGフォントやモガ明朝などを使うプリセットを定義する場合には注意すること.
+\end{itemize}
+%</ja>
+%<*en>
+Note that \cs{ltjnewpreset} does not ``expand'' the definition to define a preset.
+This means that one can write as the following:
+\begin{lstlisting}
+  \ltjnewpreset{hoge}{piyo,mc-bx=HiraMinProN-W6}
+  \ltjnewpreset{piyo}{mg-m=HiraMaruProN-W4}
+  \ltjapplypreset{hoge}
+\end{lstlisting}
+
+\paragraph{Restrictions}
+Presets which are defined by \cs{ltjnewpreset} have following restrictions:
+\begin{itemize}
+  \item One cannot specify non-embedded fonts (such as Ryumin-Light).
+  \item Some presets, such as \texttt{ipa-hg}, have a feature that
+  fonts are changed according to whether \texttt{90jis}~or~\texttt{jis2004} is speified.
+  This feature is not usable in presets which are defined by \cs{ltjnewpreset}.
+\end{itemize}
+%</en>
+
+
 \clearpage
 %<en>\part{Implementations}
 %<ja>\part{実装}