OSDN Git Service

Fix ticket #33832
[luatex-ja/luatexja.git] / doc / luatexja.dtx
index 03a507d..271315a 100644 (file)
@@ -47,7 +47,8 @@
 %</ja>
 
 \usepackage{amsmath,array,tikz,pict2e,multienum,float}
-\usepackage{booktabs,multicol}
+\usepackage{booktabs,multicol,luatexja-ruby}
+\usepackage{xy}
 
 %%%%%%%% listings
 
 \usepackage{luatexja-otf}
 %<ja>\usepackage{lmodern}
 \directlua{luatexja.otf.enable_ivs()}
+\usepackage[match]{luatexja-fontspec}
 \usepackage[kozuka-pr6n]{luatexja-preset}
+\setmonojfont{KozGoPr6N-Regular.otf}
 %<*ja>
 \def\emph#1{\textbf{\textgt{#1}}}
 \def\headfont{\normalfont\bfseries\gtfamily}
 \setmathfont{xits-math.otf}
 \frenchspacing
 %</en>
-\DeclareRobustCommand\ttfamily
-        {\not@math@alphabet\ttfamily\mathtt
-         \romanfamily\ttdefault\ttjfam\selectfont}
-\newjfontfamily\ttjfam{KozGoPr6N-Regular.otf}
-
 
 %%%%%%%% logo
 \usepackage{metalogo}
 
 \catcode`\<=13
 \def<#1>{{\normalfont\rm\itshape$\langle$#1\/$\rangle$}}
+\let\LARG=<
 \maketitle
 
 \tableofcontents
@@ -366,10 +365,10 @@ The followings are major changes from \pTeX:
 ちょ{}っと    ちょ\/っと
 \end{verbatim}
 %<*en>
-      If you want to do so, please put an empty hbox between it instead:
+      If you want to do so, please put an empty horizontal box (hbox) between it instead:
 %</en>
 %<*ja>
-      もし同じことをやりたければ,空の水平ボックスを間に挟めばよい:
+      もし同じことをやりたければ,空の水平ボックス(hbox)を間に挟めばよい:
 %</ja>
 \begin{verbatim}
 ちょ\hbox{}っと
@@ -392,12 +391,10 @@ The followings are major changes from \pTeX:
 但し,制御綴中に使える和文文字が\pTeX・\upTeX と全く同じではないことに注意すること.
 %</ja>
 
-%<*en>
-\item At the present, vertical typesetting (\emph{tategaki}), is not
-      supported in \LuaTeX-ja.
-%</en>
 %<*ja>
-\item 現時点では,縦書きは\LuaTeX-jaではサポートされていない.
+\item ****版からは,不安定ながらも\LuaTeX-ja における縦組みをサポートしている.
+\LuaTeX のコールバックの制限などにより,特に異なった組方向のボックスを扱う場合には
+仕様が異なるので注意すること.
 %</ja>
 \end{itemize}
 
@@ -468,10 +465,11 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}.
       パッケージやクラスを表す.
 %</ja>
 %<*en>
-\item In this document, natural numbers start from~0.
+\item In this document, natural numbers start from~zero.
+  $\omega$ denotes the set of all natural numbers.
 %</en>
 %<*ja>
-\item 本ドキュメントでは,自然数は0から始まる.
+\item 本ドキュメントでは,自然数は0から始まる.自然数全体の集合は$\omega$と表記する.
 %</ja>
 \end{itemize}
 
@@ -534,6 +532,7 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}.
 \item \Pkg{luatexbase} v0.6
 \item \Pkg{xunicode} v0.981~(2011/09/09)
 \item \Pkg{adobemapping} (Adobe cmap and pdfmapping files)
+\item \Pkg{everysel}
 \end{itemize}
 
 %<*en>
@@ -546,7 +545,7 @@ since \LuaTeX\ binary and \Pkg{luaotfload} is updated in
 Now \LuaTeX-ja is available from the following archive and distributions:
   \begin{itemize}
   \item CTAN (in the \texttt{macros/luatex/generic/luatexja} directory)
-  \item MiK\TeX\ (in \texttt{luatexja.tar.lzma})
+  \item MiK\TeX\ (in \texttt{luatexja.tar.lzma}); see the next subsection
   \item \TeX\ Live (in \texttt{texmf-dist/tex/luatex/luatexja})
   \item W32\TeX\ (in \texttt{luatexja.tar.xz})
   \end{itemize}
@@ -571,7 +570,7 @@ $ tlmgr install luatexja
   \item W32\TeX\ (\texttt{luatexja.tar.xz})
   \end{itemize}
 
-例えば\TeX~Live~2013を利用しているなら,\LuaTeX-jaは\TeX~Live manager (\texttt{tlmgr})を
+例えば\TeX~Live~2013以降を利用しているなら,\LuaTeX-jaは\TeX~Live manager (\texttt{tlmgr})を
 使ってインストールすることができる.
 \begin{verbatim}
 $ tlmgr install luatexja
@@ -677,20 +676,43 @@ Note that \texttt{*.\{dtx,ins\}} and \texttt{ltj-kinsoku\_make.tex} are not need
 %</ja>
 \end{enumerate}
 
+%<en>\subsection{Cautions}
+%<ja>\subsection{注意点}
+
+\begin{itemize}
+%<*en>
+\item The encoding of your source file must be UTF-8. No other
+      encodings, such as EUC-JP or Shift-JIS, are not supported.
+%</en>
+%<*ja>
+\item 原稿のソースファイルの文字コードはUTF-8固定である.
+      従来日本語の文字コードとして用いられてきたEUC-JPやShift-JISは使用できない.
+%</ja>
+%<*en>
+\item \LuaTeX-ja is very slower than \pTeX. 
+Generally speaking, LuaJIT\TeX\ processes \LuaTeX-ja 
+about 30\% faster than \LuaTeX, but not always.
+%</en>
+%<*ja>
+\item \LuaTeX-jaは動作が\pTeX に比べて非常に遅い.
+コードを調整して徐々に速くしているが,まだ満足できる速度ではない.
+LuaJIT\TeX を用いると\LuaTeX のだいたい1.3倍の速度で動くようであるが,
+IPA mj明朝などの大きいフォントを用いた場合には\LuaTeX よりも遅くなることもある.
+%</ja>
+\item%
 %<*en>
-\paragraph{Note for MiK\TeX\ users}
+\textbf{Note for MiK\TeX\ users}\quad
 \LuaTeX-ja requires that several CMap files%
-\footnote{\texttt{UniJIS2004-UTF32-H} and \texttt{Adobe-Japan1-UCS2}.}
+\footnote{\texttt{UniJIS2004-UTF32-\{H,V\}} and \texttt{Adobe-Japan1-UCS2}.}
 must be found from \LuaTeX.
 Strictly speaking, those CMaps are needed 
 only in the first run of \LuaTeX-ja after installing or updating.
-
 But it seems that MiK\TeX\ does not satisfy this condition, 
 so you will encounter an error like the following:
 %</en>
 %<*ja>
 \LuaTeX-jaが動作するためには,\emph{導入・更新後の初回起動時に}
-\texttt{UniJIS2004-UTF32-H}, \texttt{Adobe-Japan1-UCS2}という2つのCMapが
+\texttt{UniJIS2004-UTF32-\{H,V\}}, \texttt{Adobe-Japan1-UCS2}という3つのCMapが
 \LuaTeX によって見つけられることが必要である.
 しかしMiK\TeX ではそのようになっていないので,次のエラーが発生するだろう:
 %</ja>
@@ -713,29 +735,6 @@ run \LuaTeX-ja in this directory, and finally delete the temporaly directory.
 コピーし,その中で\LuaTeX-ja の初回起動を行い,作業用ディレクトリを消す作業をしている.
 %</ja>
 
-%<en>\subsection{Cautions}
-%<ja>\subsection{注意点}
-
-\begin{itemize}
-%<*en>
-\item The encoding of your source file must be UTF-8. No other
-      encodings, such as EUC-JP or Shift-JIS, are not supported.
-%</en>
-%<*ja>
-\item 原稿のソースファイルの文字コードはUTF-8固定である.
-      従来日本語の文字コードとして用いられてきたEUC-JPやShift-JISは使用できない.
-%</ja>
-%<*en>
-\item \LuaTeX-ja is very slower than \pTeX. 
-Generally speaking, LuaJIT\TeX\ processes \LuaTeX-ja 
-about 30\% faster than \LuaTeX, but not always.
-%</en>
-%<*ja>
-\item \LuaTeX-jaは動作が\pTeX に比べて非常に遅い.
-コードを調整して徐々に速くしているが,まだ満足できる速度ではない.
-LuaJIT\TeX を用いると\LuaTeX のだいたい1.3倍の速度で動くようであるが,
-IPA mj明朝などの大きいフォントを用いた場合には\LuaTeX よりも遅くなることもある.
-%</ja>
 \end{itemize}
 
 %<en>\subsection{Using in plain \TeX}
@@ -752,25 +751,36 @@ IPA mj明朝などの大きいフォントを用いた場合には\LuaTeX より
 
 \begin{itemize}
 %<*en>
-\item The following 6~Japanese fonts are preloaded:
+\item The following 12~Japanese fonts are preloaded:
 \begin{center}\small
-\begin{tabular}{ccccc}
+\begin{tabular}{cccccc}
 \toprule
+\textbf{direction}&
 \textbf{classification}&\textbf{font name}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
+\smash{\raisebox{-1ex}{\emph{yoko} (horizontal)}}&
 \emph{mincho}&Ryumin-Light    &\verb+\tenmin+&\verb+\sevenmin+&\verb+\fivemin+\\
 \emph{gothic}&GothicBBB-Medium&\verb+\tengt+ &\verb+\sevengt+ &\verb+\fivegt+\\
+\midrule
+\smash{\raisebox{-1ex}{\emph{tate} (vertical)}}&
+\emph{mincho}&Ryumin-Light    &\verb+\tentmin+&\verb+\seventmin+&\verb+\fivetmin+\\
+\emph{gothic}&GothicBBB-Medium&\verb+\tentgt+ &\verb+\seventgt+ &\verb+\fivetgt+\\
 \bottomrule
 \end{tabular}
 \end{center}
 %</en>
 %<*ja>
-\item 以下の6つの和文フォントが定義される:
+\item 以下の12個の和文フォントが定義される:
 \begin{center}\small
-\begin{tabular}{ccccc}
+\begin{tabular}{cccccc}
 \toprule
-\emph{字体}&\emph{フォント名}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
+\emph{組方向}&\emph{字体}&\emph{フォント名}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
+\smash{\raisebox{-1ex}{横組}}&
 明朝体&Ryumin-Light    &\verb+\tenmin+&\verb+\sevenmin+&\verb+\fivemin+\\
 ゴシック体&GothicBBB-Medium&\verb+\tengt+ &\verb+\sevengt+ &\verb+\fivegt+\\
+\midrule
+\smash{\raisebox{-1ex}{縦組}}&
+明朝体&Ryumin-Light    &\verb+\tentmin+&\verb+\seventmin+&\verb+\fivetmin+\\
+ゴシック体&GothicBBB-Medium&\verb+\tentgt+ &\verb+\seventgt+ &\verb+\fivetgt+\\
 \bottomrule
 \end{tabular}
 \end{center}
@@ -847,13 +857,12 @@ plfonts.dtx} and \texttt{pldefs.ltx}):
 
 \begin{itemize}
 %<*en>
-\item \texttt{JY3} is the font encoding for Japanese fonts (in horizontal direction).\\
-When vertical typesetting is supported by \LuaTeX-ja in the future, \texttt{JT3} will be used for vertical fonts.
+\item The font encoding for Japanese fonts (fot horizontal direction) is \texttt{JY3}.\\
+\texttt{JT3} is used for Japanese fonts for vertical diraction.
 %</en>
 %<*ja>
-\item \texttt{JY3}は和文フォント用のフォントエンコーディングである(横書き用).\\
-将来的に,\LuaTeX-jaで縦書きがサポートされる際には,\texttt{JT3}を縦書き用として
-用いる予定である.
+\item 和文フォントのエンコーディングとしては,横組用には \texttt{JY3},縦組用には\ 
+\texttt{JT3}が用いられる.
 %</ja>
 
 %<*en>
@@ -931,7 +940,7 @@ Okumura), namely, \Pkg{ltjclasses} and \Pkg{ltjsclasses}.
 日本語文書を組版するためには,\texttt{article.cls}, \texttt{book.cls}といった
 欧文用のクラスファイルではなく,和文用のクラスファイルを用いた方がよい.
 現時点では,\Pkg{jclasses}(\pLaTeX の標準クラス)と\Pkg{jsclasses}
-ï¼\88奥æ\9d\91æ\99´å½¦æ°\8fã\81«ã\82\88ã\82\8bã\82¯ã\83©ã\82¹ã\83\95ã\82¡ã\82¤ã\83«)に対応するものとして,\Pkg{ltjclasses},
+ï¼\88奥æ\9d\91æ\99´å½¦æ°\8fã\81«ã\82\88ã\82\8bã\80\8c\pLaTeXe æ\96°ã\83\89ã\82­ã\83¥ã\83¡ã\83³ã\83\88ã\82¯ã\83©ã\82¹ã\80\8d)に対応するものとして,\Pkg{ltjclasses},
 \Pkg{ltjsclasses}がそれぞれ用意されている.
 %</ja>
 
@@ -939,15 +948,16 @@ Okumura), namely, \Pkg{ltjclasses} and \Pkg{ltjsclasses}.
 %<ja>\section{フォントの変更}
 
 \subsection{plain \TeX~and~\LaTeXe}
-\label{ssub-chgfnt}
+\label{ssec-chgfnt}
 
 \paragraph{plain \TeX}
 %<*en>
 To change Japanese fonts in plain \TeX, you must use the command
-\verb+\jfont+. So please see Subsection~\ref{ssec-jfont}.
+\verb+\jfont+~and~\verb+\tfont+. So please see Subsection~\ref{ssec-jfont}.
 %</en>
 %<*ja>
-plain \TeX で和文フォントを変更するためには,\pTeX のように \verb+\jfont+ 命令を直接用いる.
+plain \TeX で和文フォントを変更するためには,
+\pTeX のように \verb+\jfont+ 命令や \verb+\tfont+ 命令を直接用いる.
 \ref{ssec-jfont}節を参照.
 %</ja>
 
@@ -1013,7 +1023,7 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
       alphabetic fonts to \texttt{T1}.
       \verb+\fontfamily+ also changes the current Japanese font family, 
       the current alphabetic font family, \emph{or both}. 
-      For the detail, see Subsection~\ref{ssub-nfsspat}.
+      For the detail, see Subsection~\ref{ssec-nfsspat}.
 %</en>
 %<*ja>
       ここで,\verb+\fontencoding{+<encoding>\verb+}+ は,引数により和文側か欧文
@@ -1022,7 +1032,7 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
       \texttt{JY3}に変更し,\verb+\fontencoding{T1}+ は欧文フォント側を
       \texttt{T1}へと変更する.\verb+\fontfamily+ も引数により和文側,欧文
       側,\emph{あるいは両方}のフォントファミリを変更する.詳細は
-      \ref{ssub-nfsspat}節を参照すること.
+      \ref{ssec-nfsspat}節を参照すること.
 %</ja>
 
 %<*en>
@@ -1039,13 +1049,13 @@ auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
 \item 和文フォントのシェイプを定義するには,通常の \verb+\DeclareFontShape+ を使えば良い:
 %</ja>
 \begin{verbatim}
-\DeclareFontShape{JY3}{mc}{bx}{n}{<-> s*KozMinPr6N-Bold:jfm=ujis}{}
+\DeclareFontShape{JY3}{mc}{bx}{n}{<-> s*KozMinPr6N-Bold:jfm=ujis;-kern}{}
     % Kozuka Mincho Pr6N Bold
 \end{verbatim}
 %<*ja>
 仮名書体を使う場合など,複数の和文フォントを組み合わせて使いたい場合は
 \ref{ssec-altfont}節の \verb+\ltjdeclarealtfont+ と,その\LaTeX 版の\ 
-\verb+\DeclareAlternateKanjiFont+(\ref{ssub-nfsspat}節)を参照せよ.
+\verb+\DeclareAlternateKanjiFont+(\ref{ssec-nfsspat}節)を参照せよ.
 %</ja>
 \end{itemize}
 
@@ -1113,13 +1123,21 @@ this chapter. For the method, please see Subsection~\ref{ssec-math}.
 \label{ssec-fontspec}
 %<*en>
 To coexist with the \Pkg{fontspec} package, it is needed to load
-\Pkg{luatexja-fontspec} package in the preamble. This additional
-package automatically loads \Pkg{luatexja} and \Pkg{fontspec}
+\Pkg{luatexja-fontspec} package in the preamble, as follows:
+\begin{quote}
+\ttfamily \textbackslash usepackage[<options>]\{luatexja-fontspec\}
+\end{quote}
+This \Pkg{luatexja-fontspec} package 
+automatically loads \Pkg{luatexja} and \Pkg{fontspec}
 package, if needed.
 %</en>
 %<*ja>
-\Pkg{fontspec}パッケージと同様の機能を和文フォントに対しても用いるためには,
-\Pkg{luatexja-fontspec}パッケージをプリアンブルで読み込む必要がある.このパッケージ
+\Pkg{fontspec}パッケージと同様の機能を和文フォントに対しても用いる場合,
+\Pkg{luatexja-fontspec}パッケージを読み込む:
+\begin{quote}
+\ttfamily \textbackslash usepackage[<options>]\{luatexja-fontspec\}
+\end{quote}
+このパッケージ
 は必要ならば自動で\Pkg{luatexja}パッケージと\Pkg{fontspec}パッケージを読み込む.
 %</ja>
 
@@ -1131,20 +1149,21 @@ counterparts of original commands in the \Pkg{fontspec} package:
 \Pkg{luatexja-fontspec}パッケージでは,以下の7つのコマンドを\Pkg{fontspec}
 パッケージの元のコマンドに対応するものとして定義している:
 %</ja>
-
 %<*en>
 \begin{center}\small
 \begin{tabular}{ccccc}
 \toprule
 Japanese fonts
-&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\newjfontfamily+\\
+&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\setmonojfont+$^*$\\
 alphabetic fonts
-&\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+&\verb+\newfontfamily+\\
+&\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+&\verb+\setmonofont+\\
 \midrule
 Japanese fonts
-&\verb+\newjfontface+&\verb+\defaultjfontfeatures+&\verb+\addjfontfeatures+\\
+&\verb+\newjfontfamily+&\verb+\newjfontface+
+&\verb+\defaultjfontfeatures+&\verb+\addjfontfeatures+\\
 alphabetic fonts
-&\verb+\newfontface+&\verb+\defaultfontfeatures+&\verb+\addfontfeatures+\\
+&\verb+\newfontfamily+&\verb+\newfontface+
+&\verb+\defaultfontfeatures+&\verb+\addfontfeatures+\\
 \bottomrule
 \end{tabular}
 \end{center}
@@ -1171,6 +1190,45 @@ alphabetic fonts
 \end{tabular}
 \end{center}
 %</ja>
+%<*en>
+The package option of \Pkg{luatexja-fontspec} are the followings:
+\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
+ \item[match] If this option is specified, usual family-changing commands such as
+\verb+\rmfamily+,~\verb+\textrm+, \verb+\sffamily+,~\dots\ also change Japanese font family.
+
+Note that \emph{\texttt{\textup{\textbackslash setmonojfont}} is defined 
+if and only if this \texttt{\textup{match}} option is specified}.
+
+ \item[pass=<opts>] 
+Specify options <opts> which will be passed to the \Pkg{fontspec} package.
+\end{list} 
+The reason that \verb+\setmonojfont+ is not defined by default is that
+it is popular for Japanese fonts that nearly all Japanese glyphs have same
+widths.  Also note that kerning information in a font is not used
+(that is, \texttt{kern} feature is set off) by default in these seven (or~eight) commands.
+This is because of the compatibility with previous versions of \LuaTeX-ja
+(see \ref{para-kern}).
+%</en>
+%<*ja>
+\Pkg{luatexja-fontspec} パッケージのオプションは以下の通りである:
+\begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
+ \item[match] このオプションが指定されると,「\pLaTeXe 新ドキュメントクラス」のように\
+\verb+\rmfamily+, \verb+\textrm{...}+, \verb+\sffamily+ 等が
+欧文フォントだけでなく和文フォントも変更するようになる.
+
+\emph{なお,{\tt \textbackslash setmonojfont} はこの \texttt{match} オプションが
+指定された時のみ定義される.}この命令は標準の「タイプライタ体に対応する和文フォント」を指定する.
+
+ \item[pass=<opts>] 
+\Pkg{fontspec} パッケージに渡すオプション <opts> を指定する.
+\end{list}
+標準で \verb+\setmonojfont+ コマンドが定義されないのは,
+和文フォントではほぼ全ての和文文字のグリフが等幅であるのが伝統的であったことによる.
+また,これらの和文用のコマンドではフォント内のペアカーニング情報は標準では使用されない,
+言い換えれば \texttt{kern} featureは標準では無効化となっている.
+これは以前のバージョンの\LuaTeX-jaとの互換性のためである(\ref{para-kern}節を参照).
+%</ja>
+
 \begin{LTXexample}[width=0.4\textwidth]
 \fontspec[Numbers=OldStyle]{LMSans10-Regular}
 \jfontspec[CJKShape=NLC]{KozMinPr6N-Regular}
@@ -1180,20 +1238,6 @@ JIS~X~0213:2004→辻
 JIS~X~0208:1990→辻
 \end{LTXexample}
 
-%<*en>
-Note that there is no command named \verb+\setmonojfont+, since it is
-popular for Japanese fonts that nearly all Japanese glyphs have same
-widths.  Also note that the kerning feature is set off by default in
-these seven commands, since this feature and \textbf{JAglue} will clash (see
-\ref{para-kern}).
-%</en>
-%<*ja>
-和文フォントについては全ての和文文字のグリフがほぼ等幅であるのが普通であるため,
-\verb+\setmonojfont+ コマンドは存在しないことに注意.また,これらの和文用の7つのコマ
-ンドではKerning featureはデフォルトではoffとなっている.これはこの
-featureが\textbf{JAglue}と衝突するためである(\ref{para-kern}節を参照).
-%</ja>
-
 %<en>\subsection{Presets}
 %<ja>\subsection{プリセット設定}
 \label{ssec-preset}
@@ -1201,7 +1245,7 @@ featureが\textbf{JAglue}と衝突するためである(\ref{para-kern}節を
 %<*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,
+\Pkg{japanese-otf} package and a part of \Pkg{PXchfon} package by Takayuki Yato,
 and loads \Pkg{luatexja-fontspec}, hence \Pkg{fontspec} internally.
 
 If you need to pass some options to \Pkg{fontspec}, load \Pkg{fontspec} manually
@@ -1422,7 +1466,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である.
 \midrule
 %<en>\textit{rounded gothic}
 %<ja>\gt 丸ゴシック
-&&A-OTF-Jun101Pro-Light.otf&A-OTF-Jun101Pr6N-Light.otf\\
+&&A-OTF-Jun101Pro-Light.otf&A-OTF-ShinMGoPr6N-Light.otf\\
 \bottomrule
 \end{tabular}
 \end{center}
@@ -1572,11 +1616,11 @@ are internally specified by:
 
 
 %<*en>
-\subsection{\texttt{\textbackslash CID}, \texttt{\textbackslash UTF}, and macros in \Pkg{otf} package}
-Under \pLaTeX, \Pkg{otf} package (developed by Shuzaburo Saito) is
+\subsection{\texttt{\textbackslash CID}, \texttt{\textbackslash UTF}, and macros in \Pkg{japanese-otf} package}
+Under \pLaTeX, \Pkg{japanese-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.
+supports some of functions in \Pkg{japanese-otf} package.
 If you want to use these functions, load \Pkg{luatexja-otf} package.
 %</en>
 %<*ja>
@@ -1612,7 +1656,7 @@ If you want to use these functions, load \Pkg{luatexja-otf} package.
 
 これら3オプションについては,
 \Pkg{luatexja-preset} パッケージにプリセットを使う時に一緒に指定するか,
-あるいは対応する内容を\ref{ssub-chgfnt}節 (NFSS2) や
+あるいは対応する内容を\ref{ssec-chgfnt}節,\ref{ssec-nfsspat}節 (NFSS2) や
 \ref{ssec-fontspec}節 (\Pkg{fontspec}) の方法で手動で指定する必要がある.
 %</ja>
 
@@ -1690,8 +1734,9 @@ it sets
 \end{verbatim}
 %<*en>
 The argument to \textsf{jacharrange} parameter is a list of non-zero integer.
-Negative integer $-n$ in the list means that ``each character in the range~$n$ is a \textbf{ALchar}'', and positive integer $+n$ means
-that ``\dots\ is a \textbf{JAchar}''.
+Negative integer $-n$ in the list means that ``each character in the range~$n$ is an
+\textbf{ALchar}'', 
+and positive integer $+n$ meansthat ``\dots\ is a \textbf{JAchar}''.
 %</en>
 %<*ja>
 \textsf{jacharrange}パラメータの引数は非零の整数のリストである.
@@ -1944,8 +1989,8 @@ The block list is indicated in Table~\ref{table-rng7}.
 %<*en>
 The value (a skip) of \Param{\hyperlink{fld:kanjiskip}{kanjiskip}} or 
 \Param{\hyperlink{fld:xks}{xkanjiskip}} can be changed as the following.
-Note that only their values \emph{at the end of a paragraph or a horizontal box are
-adopted in the whole paragraph or the whole horizontal box.
+Note that only their values \emph{at the end of a paragraph or a hbox are
+adopted in the whole paragraph or the whole hbox.
 }
 %</en>
 %<*ja>
@@ -1956,8 +2001,11 @@ adopted in the whole paragraph or the whole horizontal box.
 \ltjsetparameter{kanjiskip={0pt plus 0.4pt minus 0.4pt},
                  xkanjiskip={0.25\zw plus 1pt minus 1pt}}
 \end{lstlisting}
-
 %<*en>
+Here \verb+\zw+ is a internal dimension 
+which stores fullwidth of the current Japanese font.
+This \verb+\zw+ can be used as the unit \texttt{zw} in \pTeX.
+
 It may occur that JFM contains the data of ``ideal width of 
 \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}''
 and/or ``ideal width of \Param{\hyperlink{fld:xks}{xkanjiskip}}''.
@@ -1965,6 +2013,9 @@ To use these data from JFM, set the value of \Param{\hyperlink{fld:kanjiskip}{ka
 \Param{\hyperlink{fld:xks}{xkanjiskip}} to \verb+\maxdimen+.
 %</en>
 %<*ja>
+ここで,\verb+\zw+ は現在の和文フォントの全角幅を表す長さであり,
+\pTeX における長さ単位 \texttt{zw} と同じように使用できる.
+
 JFMは「望ましい\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}の値」や
 「望ましい\Param{\hyperlink{fld:xks}{xkanjiskip}}の値」を持っていることがある.
 これらのデータを使うためには,\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}や%
@@ -2166,7 +2217,7 @@ For the detail, see Table~\ref{table-kcat}.
 \small
 \caption{\texttt{\textbackslash kcatcode} in \upTeX}
 \label{table-kcat}
-\medskip
+%<en>\medskip
 
 \noindent\hfill
 \begin{tabular}{ccccc}
@@ -2228,7 +2279,7 @@ divided into the following four kinds,
 and \LuaTeX-ja can control these four kinds separately:
 \begin{itemize}
  \item
-\emph{Distinction between\textbf{JAchar} or \textbf{ALchar}}
+\emph{Distinction between \textbf{JAchar} or \textbf{ALchar}}
 is controlled by using the character range, see Subsection~\ref{ssec-setrange}.
  \item
 \emph{Whether the character can be used in a control word}
@@ -2313,13 +2364,14 @@ for \LuaTeX, \emph{to match the \texttt{\textbackslash catcode} setting with tha
  \centering\small
 %<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}
 \def\D#1#2#3#4{%
   {\fboxsep0pt\fcolorbox{cyan}{white}%
   {\large\char"#1#2#3#4}}\ (\texttt{U+#1#2#3#4})} %"
 \leavevmode\hbox to 0pt{\hss\begin{tabular}{cccccc}
 \toprule
-%<en>&\bf row&\bf column&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
+%<en>&\bf row&\bf col.&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
 %<ja>&\bf 区&\bf 点&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
 \midrule
 \D 3000&1&1&N&N&Y\\
@@ -2344,7 +2396,7 @@ for \LuaTeX, \emph{to match the \texttt{\textbackslash catcode} setting with tha
 \end{tabular}\qquad
 \begin{tabular}{cccccc}
 \toprule
-%<en>&\bf row&\bf column&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
+%<en>&\bf row&\bf col.&\bf \pTeX&\bf \upTeX&\bf\LuaTeX-ja\\
 %<ja>&\bf 区&\bf 点&\bf \pTeX&\bf \upTeX&\fontseries{b}\selectfont\LuaTeX-ja\\
 \midrule
 \D FF0F&1&31&N&N&Y\\
@@ -2402,6 +2454,380 @@ JIS~X~0213の範囲に広げると,差異はさらに大きくなる.
 %</ja>
 
 
+
+
+%<*ja>
+\section{縦組}
+\label{sec-direction}
+\LuaTeX 本体でも,$\Omega$・$\aleph$由来の機能として,複数の組方向をサポートしている.
+しかし,\LuaTeX がサポートするのは \texttt{TLT},~\texttt{TRT}, \texttt{RTT},~\texttt{LTL}\ 
+のみであり,日本語の縦書きに使うのは望ましくない\footnote{%
+和文文字だけならば \texttt{RTT} を使えばなんとかなると思うが,
+欧文文字が入ってきた場合はうまくいかず,\texttt{RTR} という組方向が必要になる.
+}.そのため,\LuaTeX-jaでは横組(\texttt{TLT})で組んだボックスを回転させる方式で
+縦組を実装した.
+
+\subsection{サポートする組方向}
+\begin{table}[t]
+\caption{\LuaTeX-ja のサポートする組方向}
+%<en>\medskip
+\label{tab-dir}
+\centering\small
+\def\obox#1{%
+  \setbox0=\hbox{\yoko\hbox{#1%
+  \large\ltjsetparameter{talbaselineshift=0pt}%
+  \vrule height 25pt width 0.4pt depth 15pt\kern-.2pt%
+  \raise25pt\hbox to 0pt{\hss\composite{*r^@{>>}}\hss}%
+  \raise-15pt\hbox to 0pt{\hss\composite{*l^@{>|}}\hss}\kern.2pt%
+  \vrule height.2pt depth.2pt width 60pt\hbox to 0pt{\hss\composite{*d^@{>}}\hss}\kern-60pt
+  \hbox to 60pt{\,銀は、Ag\hss}}}%
+  \raise\dimexpr 0.5\ltjgetdp0-0.5\ltjgetht0\box0%
+}
+\begin{tabular}{>{\bfseries}lccc}
+\toprule
+&\texttt{\textbackslash yoko}(横組)&\texttt{\textbackslash tate}(縦組)
+ &\texttt{\textbackslash dtou}\\
+\midrule
+字送り方向&水平右向き(→)&垂直下向き(↓)&垂直上向き(↑)\\
+行送り方向&垂直下向き(↓)&水平左向き(←)&水平右向き(→)\\
+使用する和文フォント&横組用(\verb+\jfont+)&縦組用(\verb+\tfont+)&横組用(\verb+\jfont+)の
+            $90^\circ$回転\\[\smallskipamount]
+組版例\null $^*$ &\obox{\yoko}&\obox{\tate}&\obox{\dtou}\\
+\noalign{\medskip}
+\bottomrule
+\end{tabular}
+
+\medskip\raggedright
+\def\R#1{%
+  \raise0.38\zw\hbox{%
+    \vrule height.2pt  depth.2pt width2\zw%
+    \hbox to 0pt{\hss\composite{*d^@{#1}}\hss}%
+  }%
+}
+$^*$\ 幅(width),高さ(height),深さ(depth)の増加方向を,
+それぞれ「\R{>}」,「\R{>>}」,「\R{>|}」で表している.
+\raggedright
+
+\end{table}
+
+\LuaTeX-jaがサポートする組方向は表\ref{tab-dir}に示す3つである.
+4列目の \verb+\dtou+ は聞き慣れない命令だと思うが,
+実は\pTeX に同名の命令が(ドキュメントには書かれていないが)存在する.
+Down-TO-Upの意味なのだろう.\verb+\dtou+ を使用する機会はないだろうが,
+\LuaTeX-jaではデバッグ用に実装している.
+
+
+組方向は,\verb+\yoko+,~\verb+\tate+,~\verb+\dtou+ をそれぞれ使用することで,
+現在作成中のリストやボックスが空の時にのみ変更可能である.
+
+
+\subsection{異方向のボックス}
+
+縦組の中に「42」などの2桁以上の算用数字を横組で組むなど,
+異なる組方向を混在させることがしばしば行われる.
+組方向の混在も\pTeX と同じようにできる:
+\begin{LTXexample}
+ここは横組%     yoko
+\hbox{\tate %   tate
+  \hbox{縦組}%  tate
+  の中に
+  \hbox{\yoko 横組の内容}% yoko
+  を挿入する
+}
+また横組に戻る% yoko
+\end{LTXexample}
+
+異なる組方向のボックスを配置した場合にどう組まれるかの仕様も,\pTeX を
+踏襲している.表\ref{tab-diffdir}に示す.
+
+\begin{table}[t]
+\caption{異方向のボックスの配置}
+%<en>\medskip
+\label{tab-diffdir}
+ \centering\small\unitlength3mm
+ \def\TATEeg{%
+   \hbox{\smash{\begin{picture}(0,0)(-2,0)
+     \thicklines
+     \polyline(-2,0)(-2,-7)(5,-7)(5,0)
+     \put(0,0){\circle*{0.3}}
+     \put(0,0){\vector(1,0){5}} \put(2.5,-0.2){\makebox(0,0)[t]{$h_{\mathrm{T}}$}}
+     \put(0,0){\vector(-1,0){2}}\put(-1,-0.2){\makebox(0,0)[t]{$d_{\mathrm{T}}$}}
+     \put(0,0){\vector(0,-1){7}}\put(0.2,-3.5){\makebox(0,0)[l]{$w_{\mathrm{T}}$}}
+   \end{picture}}}
+ }
+ \def\DTOUeg{%
+   \hbox{\smash{\begin{picture}(0,0)(-5,0)
+     \thicklines
+     \polyline(-5,0)(-5,7)(2,7)(2,0)
+     \put(0,0){\circle*{0.3}}
+     \put(0,0){\vector(-1,0){5}} \put(-2.5,0.3){\makebox(0,0)[b]{$h_{\mathrm{D}}$}}
+     \put(0,0){\vector(1,0){2}}\put(1,0.3){\makebox(0,0)[b]{$d_{\mathrm{D}}$}}
+     \put(0,0){\vector(0,1){7}}\put(-0.2,3.5){\makebox(0,0)[r]{$w_{\mathrm{D}}$}}
+   \end{picture}}}
+ }
+ \def\YOKOeg{%
+   \hbox{\smash{\begin{picture}(0,0)
+     \thicklines
+     \polyline(0,5)(7,5)(7,-2)(0,-2)
+     \put(0,0){\circle*{0.3}}
+     \put(0,0){\vector(0,1){5}} \put(0.3,2.5){\makebox(0,0)[l]{$h_{\mathrm{Y}}$}}
+     \put(0,0){\vector(0,-1){2}}\put(0.3,-1){\makebox(0,0)[l]{$d_{\mathrm{Y}}$}}
+     \put(0,0){\vector(1,0){7}}\put(3.5,0.2){\makebox(0,0)[b]{$w_{\mathrm{Y}}$}}
+   \end{picture}}}
+ }
+\begin{tabular}{ccc}
+\toprule
+\emph{横組中に配置}&\emph{縦組中に配置}&%
+\emph{組方向\hskip\ltjgetparameter{xkanjiskip}\texttt{\textbackslash dtou}中に配置}\\
+\midrule
+ \parbox[c]{15\unitlength}{\begin{picture}(15,15)(0,-4)
+   \put(0,0){\line(1,0){3.8}}
+   \put(4,7){\TATEeg}
+   \put(11.2,0){\line(1,0){3.8}}
+%
+   \put(2,7){\line(1,0){1.8}}
+   \put(3,3.5){\vector(0,1){3.5}\vector(0,-1){3.5}}
+   \put(2.8,3.5){\makebox(0,0)[r]{$H_{\mathrm{Y}}$}}
+   \put(3,-2){\vector(0,1){2}}
+   \put(2.8,-1){\makebox(0,0)[r]{$D_{\mathrm{Y}}$}}
+%
+   \put(4,7.2){\line(0,1){1.8}}
+   \put(11,7.2){\line(0,1){1.8}}
+   \put(6,8){\vector(-1,0){2}}
+   \put(9,8){\vector(1,0){2}}
+   \put(7.5,8){\makebox(0,0){$W_{\mathrm{Y}}$}}
+%
+ \end{picture}\vspace{-\baselineskip}
+   \begin{align*}
+   W_{\mathrm{Y}} &= h_{\mathrm{T}}+d_{\mathrm{T}},\\
+   H_{\mathrm{Y}} &= w_{\mathrm{T}},\\
+   D_{\mathrm{Y}} &=0\,\mathrm{pt}
+   \end{align*}%
+ }&
+ \parbox[c]{15\unitlength}{\begin{picture}(15,15)(0,-4)
+   \put(7.5,-0.2){\line(0,-1){2.8}}
+   \put(4,2){\YOKOeg}
+   \put(7.5, 7.2){\line(0,1){3.8}}
+%
+   \put(2,7){\line(1,0){1.8}}
+   \put(2,0){\line(1,0){1.8}}
+   \put(3,5){\vector(0,1){2}}
+   \put(3,2){\vector(0,-1){2}}
+   \put(3,3.5){\makebox(0,0){$W_{\mathrm{T}}$}}
+%
+   \put(4,7.2){\line(0,1){1.8}}
+   \put(11,7.2){\line(0,1){1.8}}
+   \put(8,8){\vector(-1,0){0.5}\vector(1,0){3}}
+   \put(7,8){\vector(-1,0){3}\vector(1,0){0.5}}
+   \put(9.25,8.2){\makebox(0,0)[b]{$H_{\mathrm{T}}$}}
+   \put(5.75,8.2){\makebox(0,0)[b]{$D_{\mathrm{T}}$}}
+%
+ \end{picture}\vspace{-\baselineskip}
+   \begin{align*}
+   W_{\mathrm{T}} &= h_{\mathrm{Y}}+d_{\mathrm{Y}},\\
+   H_{\mathrm{T}} &= w_{\mathrm{Y}}/2,\\
+   D_{\mathrm{T}} &= w_{\mathrm{Y}}/2
+   \end{align*}%
+ }&
+ \parbox[c]{15\unitlength}{\begin{picture}(15,15)(0,-4)
+   \put(11,-0.2){\line(0,-1){2.8}}
+   \put(4,2){\YOKOeg}
+   \put(11, 7.2){\line(0,1){3.8}}
+%
+   \put(2,7){\line(1,0){1.8}}
+   \put(2,0){\line(1,0){1.8}}
+   \put(3,5){\vector(0,1){2}}
+   \put(3,2){\vector(0,-1){2}}
+   \put(3,3.5){\makebox(0,0){$W_{\mathrm{D}}$}}
+%
+   \put(4,7.2){\line(0,1){1.8}}
+   \put(11,7.2){\line(0,1){1.8}}
+   \put(7.5,8){\vector(-1,0){3.5}\vector(1,0){3.5}}
+   \put(13,8){\vector(-1,0){2}}
+   \put(7.5,8.2){\makebox(0,0)[b]{$H_{\mathrm{D}}$}}
+   \put(12,8.2){\makebox(0,0)[b]{$D_{\mathrm{D}}$}}
+%
+ \end{picture}\vspace{-\baselineskip}
+   \begin{align*}
+   W_{\mathrm{D}} &= h_{\mathrm{Y}}+d_{\mathrm{Y}},\\
+   H_{\mathrm{D}} &= w_{\mathrm{Y}},\\
+   D_{\mathrm{D}} &= 0\,\mathrm{pt}
+   \end{align*}%
+ }%
+\\\midrule
+ \parbox[c]{15\unitlength}{\begin{picture}(15,15)(0,-4)
+   \put(0,0){\line(1,0){3.8}}
+   \put(4,0){\DTOUeg}
+   \put(11.2,0){\line(1,0){3.8}}
+%
+   \put(2,7){\line(1,0){1.8}}
+   \put(3,3.5){\vector(0,1){3.5}\vector(0,-1){3.5}}
+   \put(2.8,3.5){\makebox(0,0)[r]{$H_{\mathrm{Y}}$}}
+   \put(3,-2){\vector(0,1){2}}
+   \put(2.8,-1){\makebox(0,0)[r]{$D_{\mathrm{Y}}$}}
+%
+   \put(4,7.2){\line(0,1){1.8}}
+   \put(11,7.2){\line(0,1){1.8}}
+   \put(6,8){\vector(-1,0){2}}
+   \put(9,8){\vector(1,0){2}}
+   \put(7.5,8){\makebox(0,0){$W_{\mathrm{Y}}$}}
+%
+ \end{picture}\vspace{-\baselineskip}
+   \begin{align*}
+   W_{\mathrm{Y}} &= h_{\mathrm{D}}+d_{\mathrm{D}},\\
+   H_{\mathrm{Y}} &= w_{\mathrm{D}},\\
+   D_{\mathrm{Y}} &= 0\,pt
+   \end{align*}%
+ }&
+ \parbox[c]{15\unitlength}{\begin{picture}(15,15)(0,-4)
+   \put(9,-0.2){\line(0,-1){2.8}}
+   \put(4,0){\DTOUeg}
+   \put(9, 7.2){\line(0,1){3.8}}
+%
+   \put(2,7){\line(1,0){1.8}}
+   \put(2,0){\line(1,0){1.8}}
+   \put(3,5){\vector(0,1){2}}
+   \put(3,2){\vector(0,-1){2}}
+   \put(3,3.5){\makebox(0,0){$W_{\mathrm{T}}$}}
+%
+   \put(4,7.2){\line(0,1){1.8}}
+   \put(11,7.2){\line(0,1){1.8}}
+   \put(6.5,8){\vector(-1,0){2.5}\vector(1,0){2.5}}
+   \put(10,8){\vector(-1,0){1}\vector(1,0){1}}
+   \put(10,8.2){\makebox(0,0)[b]{$H_{\mathrm{T}}$}}
+   \put(6.5,8.2){\makebox(0,0)[b]{$D_{\mathrm{T}}$}}
+%
+ \end{picture}\vspace{-\baselineskip}
+   \begin{align*}
+   W_{\mathrm{T}} &= h_{\mathrm{D}}+d_{\mathrm{D}},\\
+   H_{\mathrm{T}} &= d_{\mathrm{D}},\\
+   D_{\mathrm{T}} &= h_{\mathrm{D}}
+   \end{align*}%
+ }&
+ \parbox[c]{15\unitlength}{\begin{picture}(15,15)(0,-4)
+   \put(6,-0.2){\line(0,-1){2.8}}
+   \put(4,7){\TATEeg}
+   \put(6, 7.2){\line(0,1){3.8}}
+%
+   \put(2,7){\line(1,0){1.8}}
+   \put(2,0){\line(1,0){1.8}}
+   \put(3,5){\vector(0,1){2}}
+   \put(3,2){\vector(0,-1){2}}
+   \put(3,3.5){\makebox(0,0){$W_{\mathrm{D}}$}}
+%
+   \put(4,7.2){\line(0,1){1.8}}
+   \put(11,7.2){\line(0,1){1.8}}
+   \put(5,8){\vector(-1,0){1}\vector(1,0){1}}
+   \put(8.5,8){\vector(-1,0){2.5}\vector(1,0){2.5}}
+   \put(5,8.2){\makebox(0,0)[b]{$H_{\mathrm{D}}$}}
+   \put(8.5,8.2){\makebox(0,0)[b]{$D_{\mathrm{D}}$}}
+%
+ \end{picture}\vspace{-\baselineskip}
+   \begin{align*}
+   W_{\mathrm{D}} &= w_{\mathrm{T}},\\
+   H_{\mathrm{D}} &= d_{\mathrm{T}},\\
+   D_{\mathrm{D}} &= h_{\mathrm{T}}
+   \end{align*}%
+ }\\
+\bottomrule
+\end{tabular}
+\end{table}
+
+
+\paragraph{\texttt{\textbackslash wd} は組方向には対応しない}
+ボックスレジスタ \verb+\box+<num> にセットされているボックスの幅・高さ・深さの取得や
+変更にはそれぞれ \verb+\wd+,~\verb+\ht+,~\verb+\dp+ プリミティブを用いるのであった.
+\pTeX ではこれらのプリミティブは,「現在の組方向におけるボックスの寸法」を指すものであった.
+
+\LuaTeX-jaにおいては状況が異なり,\verb+\wd+,~\verb+\ht+,~\verb+\dp+ は\emph{組方向が
+混在する状況においては正しく機能しない}.まず,現在の組方向に依存しないことが挙げられる.
+\begin{LTXexample}
+% yoko direction
+\setbox0=\hbox to 20pt{foo}
+\the\wd0,~\hbox{\tate\vrule\the\wd0}
+\wd0=100pt
+\the\wd0,~\hbox{\tate \the\wd0}
+\end{LTXexample}
+また,異方向のボックスの配置処理の関係で,
+\verb+\lastbox+ を駆使してボックスのコピーを
+作成した場合でも,\verb+\wd+ 等の値が異なる場合もある.
+例えば,下の実行例における \verb+\wd1+ の値は,「縦組で組んだ時の \verb+\box0+ の
+専有する幅」となる.
+\begin{LTXexample}
+% yoko direction
+\setbox0=\hbox to 20pt{Xy}
+\the\wd0,
+\setbox0=\hbox{\tate\copy0}
+\setbox0=\hbox{\tate\unhbox0
+  \global\setbox1\lastbox}
+\the\wd1
+\end{LTXexample}
+
+\paragraph{\texttt{\textbackslash wd} 等の代替命令}
+
+\pTeX のように現在の組方向に応じたボックスの寸法の取得・設定を行うため,
+次の命令を新設した.
+
+\begin{cslist}
+
+ \item[ltjgetwd\{<num>\}\textrm{, }\textbackslash ltjgetht\{<num>\}\textrm{, }%
+  \textbackslash ltjgetdp\{<num>\}] 
+現在の組方向に応じたボックスの寸法の取得を行う.結果は内部長さであるため,
+{\let\item=\origitem
+\begin{verbatim}
+\dimexpr 2\ltjgetwd{42}-3pt\relax, \the\ltjgetwd{1701}
+\end{verbatim}
+のように \verb+\wd+<num> の代わりとして扱うことができる.引数が1桁の場合は,
+\verb+\ltjgetwd3+ のように引数をグループで括らなくても良いが,そうでない場合は
+(通常の命令への引数のように)\verb+\ltjgetwd{42}+ とグループに括る必要がある.
+使用例は以下の通りである.
+\begin{LTXexample}[width=0.3\textwidth]
+\parindent0pt
+\setbox32767=\hbox{\yoko よこぐみ}
+\fboxsep=0mm\fbox{\copy32767}
+\vbox{\hsize=20mm 
+\yoko YOKO \the\ltjgetwd{32767}, \\
+  \the\ltjgetht{32767}, \\ \the\ltjgetdp{32767}.}
+\vbox{\hsize=20mm\raggedleft
+\tate TATE \the\ltjgetwd{32767}, \\
+  \the\ltjgetht{32767}, \\ \the\ltjgetdp{32767}.}
+\vbox{\hsize=20mm\raggedleft
+\dtou DTOU \the\ltjgetwd{32767}, \\
+  \the\ltjgetht{32767}, \\ \the\ltjgetdp{32767}.}
+\end{LTXexample}}
+
+ \item[ltjsetwd<num>=<dimen>\textrm{, }\textbackslash ltjsetht<num>=<dimen>\textrm{, }%
+  \textbackslash ltjsetdp<num>=<dimen>]
+現在の組方向に応じたボックスの寸法の設定を行う.\verb+\afterassignment+ を2回利用して
+実装しているので,次の4通りは全て同じ意味である.
+{\let\item=\origitem
+\begin{verbatim}
+\ltjsetwd42 20pt,  \ltjsetwd42=20pt,  \ltjsetwd=42 20pt,  \ltjsetwd=42=20pt
+\end{verbatim}
+}%
+
+設定値は組方向ごとに独立して記録される.
+
+\end{cslist} 
+
+\subsection{組方向の取得・条件判断}
+「現在の組方向」や「<num>番のボックスの組方向」は,以下の命令によって
+知ることができる.
+
+\begin{cslist}
+ \item[ifydir\textrm{, }\textbackslash iftdir\textrm{, }\textbackslash ifddir]
+現在の組方向が横組(\verb+\yoko+),縦組(\verb+\tate+),\verb+\dtou+ 方向であるかを
+それぞれ判定する.
+
+ \item[ifybox\{<num>\}\textrm{, }\textbackslash iftbox\{<num>\}\textrm{, }%
+  \textbackslash ifdbox\{<num>\}]
+<num>番のレジスタの中身が横組ボックス,縦組ボックス,\verb+\dtou+ 方向の
+ボックスか否かをそれぞれ判定する.
+
+\end{cslist}
+
+%</ja>
+
 %<en>\section{Font Metric and Japanese Font}
 %<ja>\section{フォントメトリックと和文フォント}
 %<en>\subsection{\texttt{\textbackslash jfont}}
@@ -2409,14 +2835,14 @@ JIS~X~0213の範囲に広げると,差異はさらに大きくなる.
 \label{ssec-jfont}
 
 %<*en>
-To load a font as a Japanese font, you must use the
+To load a font as a Japanese font (for horizontal direction), you must use the
 \verb+\jfont+ instead of~\verb+\font+, while
 \verb+\jfont+ admits the same syntax used in~\verb+\font+.
 \LuaTeX-ja automatically loads \Pkg{luaotfload} package,
 so TrueType/OpenType fonts with features can be used for Japanese fonts:
 %</en>
 %<*ja>
-フォントを和文フォントとして読み込むためには,\verb+\jfont+ を
+フォントを(横組用)和文フォントとして読み込むためには,\verb+\jfont+ を
 \verb+\font+ プリミティブの代わりに用いる.
 \verb+\jfont+ の文法は \verb+\font+ と同じである.
 \LuaTeX-jaは\Pkg{luaotfload}パッケージを自動的に読み込むので,
@@ -2459,17 +2885,56 @@ which JFM will be used for this font by the following keys:
 指定する必要がある:
 %</ja>
 
+
+\begin{table}[t]
+%<en>\caption{Differences between JFMs shipped with \LuaTeX-ja}
+%<ja>\caption{\LuaTeX-ja に同梱されている JFM の違い}
+%<en>\medskip
+\label{tab-difjfm}
+\ltjsetparameter{jacharrange={+3}}
+\centering\small
+\def\r#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
+\setbox0=\vtop{\hsize=7\zw\noindent ◆◆◆◆◆◆◆
+ある日モモちゃんがお使いで迷子になって泣きました.}\copy0
+\vrule height 0pt depth \dp0}}
+\def\s#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
+\setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}}
+\def\t#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 19.24432pt \g
+\setbox0=\hbox{漢}%
+\vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0
+\kern-\wd0\vrule width\wd0height .2pt depth .2pt
+\kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}%
+\kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}%
+\kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}}
+\begin{tabular}{rccc}
+\toprule
+&\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\
+\midrule
+%<en>Example~1~\cite{min10}
+%<ja>例1~\cite{min10}
+&\r{ujis}&\r{jis}&\r{min}\\
+%<en>Example~2
+%<ja>例2
+&\s{ujis}&\s{jis}&\s{min}\\
+Bounding Box&\t{ujis}&\t{jis}&\t{min}\\
+\bottomrule
+\end{tabular}
+\ltjsetparameter{jacharrange={-3}}
+\end{table}
+
+
 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
 \item[jfm=<name>]
 %<*en>
-Specify the name of JFM. If specified JFM has not been loaded, \LuaTeX-ja search and load
+Specify the name of (horizontal) JFM. 
+If specified JFM has not been loaded, \LuaTeX-ja search and load
 a file named \texttt{jfm-<name>.lua}.
 
 The following JFMs are shipped with \LuaTeX-ja:
 %</en>
 %<*ja>
-JFMの名前を指定する.もし以前に指定されたJFMが読み込まれていなければ,
-\texttt{jfm-<name>.lua}を読み込む.以下のJFMが\LuaTeX-jaには同梱されている:
+用いる(横組用)JFMの名前を指定する.もし以前に指定されたJFMが読み込まれていなければ,
+\texttt{jfm-<name>.lua}を読み込む.以下の横組用JFMが\LuaTeX-jaには同梱されている:
 %</ja>
 \begin{description}
 %<*en>
@@ -2492,122 +2957,116 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま
 %</en>
 %<*ja>
 \item[\tt jfm-jis.lua] \pTeX で広く用いられている「JISフォントメトリック」
-  \verb+jis.tfm+ に相当するJFMである.\texttt{jfm-ujis.lua}とこの
-  \texttt{jfm-jis.lua}の主な違いは,\texttt{jfm-ujis.lua}ではほとんどの文字が
-  正方形状であるのに対し,\texttt{jfm-jis.lua}では横長の長方形状である.
+  \verb+jis.tfm+ に相当するJFMである.\texttt{jfm-ujis.lua} とこの
+  \texttt{jfm-jis.lua} の主な違いは,\texttt{jfm-ujis.lua} ではほとんどの文字が
+  正方形状であるのに対し,\texttt{jfm-jis.lua} では横長の長方形状であることと,
+  \texttt{jfm-ujis.lua} では「?」「!」の直後に半角空白が挿入されることである.
 %</ja>
 %<*en>
 \item[\tt jfm-min.lua] A counterpart for \verb+min10.tfm+, which is one
-  of the default Japanese font metric shipped with \pTeX. There
-  are notable difference between this JFM and other 2~JFMs, as
-  shown in Table~\ref{tab-difjfm}.
+  of the default Japanese font metric shipped with \pTeX. 
 %</en>
-%<*ja>
+%<*ja> 
 \item[\tt jfm-min.lua] \pTeX に同梱されているデフォルトの和文用TFM
-  である \verb+min10.tfm+ に相当するJFMである.このJFMと他の2つのJFMの間には
-  表\ref{tab-difjfm}に示すような特筆すべき違いがある.
+  である \verb+min10.tfm+ に相当する.
 %</ja>
 \end{description}
-
 %<*en>
-\item[jfmvar=<string>] Sometimes there is a need that \ldots.
+The difference among these three~JFMs is  shown in Table~\ref{tab-difjfm}.
 %</en>
 %<*ja>
-\item[jfmvar=<string>] 標準では,JFMとサイズが同じで,
-  実フォントだけが異なる2つの和文フォントは「区別されない」.例えば
-下の例において,最初の「)」と「【」の実フォントは異なるが,
-JFMもサイズも同じなので,普通に「)【」と入力した時と同じように半角空きとなる.
-
-しかし,時には……
-
+これら3つのJFMの違いは表\ref{tab-difjfm}に示した.
 %</ja>
+
+\begin{figure}
 \begin{LTXexample}[width=0.3\textwidth]
 \ltjsetparameter{differentjfm=both}
 \jfont\F=file:KozMinPr6N-Regular.otf:jfm=ujis
 \jfont\G=file:KozGoPr6N-Medium.otf:jfm=ujis
 \jfont\H=file:KozGoPr6N-Medium.otf:jfm=ujis;jfmvar=hoge
-
 \F ){\G 【】}( % halfwidth space
    ){\H 『』}( % fullwidth space
 
+ほげ,{\G 「ほげ」}(ほげ)\par
+ほげ,{\H 「ほげ」}(ほげ)% pTeX-like
+
 \ltjsetparameter{differentjfm=paverage}
 \end{LTXexample}
-\end{list}
-
-\begin{table}[t]
-%<en>\caption{Differences between JFMs shipped with \LuaTeX-ja}
-%<ja>\caption{\LuaTeX-ja に同梱されている JFM の違い}
-\label{tab-difjfm}
-\ltjsetparameter{jacharrange={+3}}
-\centering\small
-\def\r#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
-\setbox0=\vtop{\hsize=7\zw\noindent ◆◆◆◆◆◆◆
-ある日モモちゃんがお使いで迷子になって泣きました.}\copy0
-\vrule height 0pt depth \dp0}}
-\def\s#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g
-\setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}}
-\def\t#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 19.24432pt \g
-\setbox0=\hbox{漢}%
-\vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0
-\kern-\wd0\vrule width\wd0height .2pt depth .2pt
-\kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}%
-\kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}%
-\kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}}
-\begin{tabular}{rccc}
-\toprule
-&\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\
-\midrule
-%<en>Example~1\cite{min10}
-%<ja>例1\cite{min10}
-&\r{ujis}&\r{jis}&\r{min}\\
-%<en>Example~2
-%<ja>例2
-&\s{ujis}&\s{jis}&\s{min}\\
-Bounding Box&\t{ujis}&\t{jis}&\t{min}\\
-\bottomrule
-\end{tabular}
-\ltjsetparameter{jacharrange={-3}}
-\end{table}
+\caption{Example of \texttt{jfmvar} key}
+\label{fig:jfmvar}
+\end{figure}
 
-%<en>\paragraph{Note: \texttt{kern} feature}
-%<ja>\paragraph{注意:\texttt{kern} feature}
-\label{para-kern}
-%<*en>
-Some fonts have information for inter-glyph spacing. However, this
-information is not well-compatible with \LuaTeX-ja.  More concretely,
-this kerning space from this information are inserted \emph{before} the
-insertion process of \textbf{JAglue}, and this causes incorrect spacing
-between two characters when both a glue/kern from the data in the font
-and it from JFM are present.
-%</en>
-%<*ja>
-いくつかのフォントはグリフ間のスペースについての情報を持っている.しかし,
-この情報は\LuaTeX-ja とはあまり相性がよくない.具体的には,この情報に基づいて挿入
-されるカーニングスペースは\textbf{JAglue}の挿入過程の\textbf{前に}挿入され,
-JFMに基づくグルー/カーンも挿入される場合には2文字間の意図しないスペースの原因と
-なる.
-%</ja>
-\begin{itemize}
 %<*en>
-\item You should specify \texttt{-kern} in
-  \verb+jfont+ when you want to use other font features,
-  such as \texttt{script=...}\,.
+\item[jfmvar=<string>] Sometimes there is a need that \ldots.
 %</en>
 %<*ja>
-\item  \texttt{script=...}といったfeatureを使いたい場合には,\verb+\jfont+
-  に\texttt{-kern}を指定するべきである.
+\item[jfmvar=<string>] 標準では,JFMとサイズが同じで,
+  実フォントだけが異なる2つの和文フォントは「区別されない」.例えば
+図\ref{fig:jfmvar}において,最初の「)」と「【」の実フォントは異なるが,
+JFMもサイズも同じなので,普通に「)【」と入力した時と同じように半角空きとなる.
+
+しかし,JFMとサイズが同じであっても,\texttt{jfmvar} キーの異なる
+2つの和文フォント,例えば図\ref{fig:jfmvar}で言う \verb+\F+ と \verb+\H+,
+は「区別される」.異なる和文フォントに異なる \texttt{jfmvar} キーを割り当て,
+かつ\Param{differentjfm}パラメータを \texttt{both} に設定すれば,
+\pTeX と似た状況で組版されることになる.
 %</ja>
+\end{list}
+
+\begin{figure}
+\begin{LTXexample}[pos=t]
+\newcommand\test{\vrule ダイナミックダイクマ\vrule\\}
+\jfont\KMFW = KozMinPr6N-Regular:jfm=prop;-kern at 17pt
+\jfont\KMFK = KozMinPr6N-Regular:jfm=prop at 17pt % kern is activated
+\jfont\KMPW = KozMinPr6N-Regular:jfm=prop;script=dflt;+pwid;-kern at 17pt
+\jfont\KMPK = KozMinPr6N-Regular:jfm=prop;script=dflt;+pwid;+kern at 17pt
+\begin{multicols}{2}
+\ltjsetparameter{kanjiskip=0pt}
+{\KMFW\test \KMFK\test \KMPW\test \KMPK\test}
+
+\ltjsetparameter{kanjiskip=3pt}
+{\KMFW\test \KMFK\test \KMPW\test \KMPK\test}
+\end{multicols}
+\end{LTXexample}
+\caption{Kerning information and \Param{kanjiskip}}
+\label{fig:kern-jfm}
+\end{figure}
+
+%<en>\paragraph{Using kerning information in a font}
+%<ja>\paragraph{ペアカーニング情報の使用}
+\label{para-kern}
 %<*en>
-\item If you want to use Japanese fonts in proportional width, and use
-      information from this font, use \texttt{jfm-prop.lua} for its JFM, and\,\ldots.
+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.
+
+Note that in \verb+\setmainjfont+ etc.\ which are provided by \Pkg{luatexja-fontspec}
+package, kerning option is set \emph{off} (\texttt{Kerning=Off}) by default,
+because of the compatibility with previous versions of \LuaTeX-ja.
 %</en>
 %<*ja>
-\item もしプロポーショナル幅の和文フォントをそのフォントの情報に基づいて使いたい
-  ならば,\texttt{jfm-prop.lua}をJFMとして指定し,……
-%</ja>
-TODO: kanjiskip?
+いくつかのフォントはグリフ間のスペースについての情報を持っている.
+このカーニング情報は以前の\LuaTeX-ja とはあまり相性が良くなかったが,
+本バージョンではカーニングによる空白はイタリック補正と同様に扱うことになっている.
+つまり,カーニング由来の空白とJFM由来のグルー・カーンは同時に入りうる.
+図\ref{fig:kern-jfm}を参照.
+\begin{itemize}
+ \item \emph{\texttt{\textbackslash jfont} や,
+NFSS2用の命令(\ref{ssec-chgfnt}節,\ref{ssec-nfsspat}節)における指定では
+カーニング情報は標準で使用する}ことになっているようである.
+言い換えれば,カーニング情報を使用しない設定にするには,面倒でも
+\begin{verbatim}
+\jfont\hoge=KozMinPr6N-Regular:jfm=ujis;-kern at 3.5mm
+\DeclareFontShape{JY3}{fuga}{m}{n} {<-> s*KozMinPr6N-Regular:jfm=ujis;-kern}{}
+\end{verbatim}
+のように,\texttt{-kern} という指定を自分で追架しなければいけない.
+ \item 
+一方,\emph{\Pkg{luatexja-fontspec} の提供する \texttt{\textbackslash setmainjfont}\ 
+などの命令の標準設定ではカーニング情報は使用しない}(\texttt{Kerning=Off})
+ことになっている.これは以前のバージョンの\LuaTeX-jaとの互換性のためである.
 \end{itemize}
-
+%</ja>
 
 %<*ja>
 \paragraph{\texttt{extend}と\texttt{slant}}
@@ -2635,13 +3094,36 @@ For example, the following example uses the standard JFM \texttt{jfm-ujis.lua},
 letter-spacing and the width of italic correction are not correct:
 %</en>
 \begin{LTXexample}[width=0.3\textwidth]
-\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis
+\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis;-kern
 \E あいうえお
 
-\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis
+\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis;-kern
 \S あいう\/ABC
 \end{LTXexample}
 
+%<en>\subsection{\texttt{\textbackslash tfont}}
+%<ja>\subsection{\texttt{\textbackslash tfont} 命令}
+
+%<*en>
+...
+%</en>
+%<*ja>
+\verb+\tfont+ はフォントを縦組用の和文フォントとして読み込む命令であり,
+\verb+\jfont+ の文法は \verb+\jfont+ と同じである.
+\verb+\tfont+ で定義された縦組用和文フォントは,
+以下の点が \verb+\jfont+ による横組用和文フォントとは異なる:
+\begin{itemize}
+ \item 出力時に,自動的に「\verb+vert+ feature相当」のグリフ置換が行われる.
+       これは,\Pkg{luaotfload}による各種featureのサポートとは全く別個に行われるもので,
+       いちいち \verb+vert+ featureを指定する必要はない.
+\begin{verbatim}
+\tfont\S=file:KozMinPr6N-Regular.otf:jfm=ujis % OK
+\end{verbatim}
+ \item \ref{ssec-math}節で述べる,数式中の和文フォントには縦組用和文フォントは指定できない.
+ \item \texttt{jfm=<name>}\ の部分には縦組用JFMを指定する.現在同梱されているのは,
+OTFパッケージの \verb+upnmlminr-v.tfm+ を元にした\texttt{jfm-ujisv.lua}\ のみである.
+\end{itemize}
+%</ja>
 
 %<en>\subsection{Prefix \texttt{psft}}
 %<ja>\subsection{\texttt{psft}プリフィックス}
@@ -2656,8 +3138,8 @@ standard, non-embedded Japanese fonts, namely, ``Ryumin-Light'' and
 ``GothicBBB-Medium''.
 
 \emph{OpenType font features, such as ``{\tt +jp90}'', 
-have no meaning in name-only fonts using this ``{\tt psft:}''\ prefix.
-This is because we can't expect what fonts are actually used by the PDF reader.}
+have no meaning in name-only fonts using ``{\tt psft:}''\ prefix,
+because we can't expect what fonts are actually used by the PDF reader.}
 Note that \texttt{extend}~and~\texttt{slant} settings (see~above) are supported
 with \texttt{psft} prefix, because they are only simple linear transformations.
 %</en>
@@ -2771,8 +3253,13 @@ floating-point numbers in design-size unit.
 %<en>(required)
 %<ja>(必須)
 
-%<en>The direction of JFM. At the present, only \texttt{'yoko'} is supported.
-%<ja>JFMの書字方向.現時点では横書き(\texttt{'yoko'})のみがサポートされる.
+%<*en>
+The direction of JFM. \texttt{'yoko'}~(horizontal)
+or \texttt{'tate'}~(vertical) are supported.
+%</en>
+%<*ja>
+JFMの書字方向.\texttt{'yoko'}(横組)と \texttt{'tate'}(縦組)がサポートされる.
+%</ja>
 
 \item[zw=<length>]
 %<en>(required)
@@ -2878,14 +3365,18 @@ This field is a list of characters which are in this character
 Specifythe 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.
-But there is one exception: if \texttt{'prop'} is specified in \texttt{width} field, width of a character becomes that of its ``real'' glyph.
+
+But there is one exception: \texttt{width} field can be \texttt{'prop'}. 
+This means that width of a character becomes that of its ``real'' glyph.
 %</en>
 %<*ja>
 文字クラス$i$に属する文字の幅,高さ,深さ,イタリック補正の量を指定する.
 文字クラス$i$に属する全ての文字は,その幅,高さ,深さがこのフィールドで指定した
 値であるものとして扱われる.
-しかし,例外が一つある:もし \texttt{'prop'} が \texttt{width} フィールドに
-指定された場合,文字の幅はその「実際の」グリフの幅となる.
+
+例外として,\emph{\texttt{width} フィールドには数値以外に \texttt{'prop'} が指定可能である}.
+この場合,文字の幅はその「実際の」グリフの幅となる.OpenTypeの \texttt{prop} featureと併用
+            すれば,これによってプロポーショナル組を行うことができる.
 %</ja>
 
 \item[left=<length>, down=<length>, align=<align>]\
@@ -3018,8 +3509,8 @@ Furthermore, the glyph is shifted according to values of fields
 \medskip
 
 \caption{%
-%<en>The position of the real glyph.
-%<ja>「実際の」グリフの位置
+%<en>The position of the real glyph
+%<ja>「実際の」グリフの位置
 }
 \label{fig-pos}
 \end{figure}
@@ -3033,7 +3524,8 @@ Furthermore, the glyph is shifted according to values of fields
              <priority>は \Pkg{luatexja-adjust} による優先順位付き
             行長調整(\ref{ssec-adj}節)が有効なときのみ意味を持つ.
 このフィールドは省略可能であり,行調整処理におけるこのglueの優先
-             度を$-2$から$+2$の間の整数で指定する.<priority>の省略時の値
+             度を$-2$から$+2$の間の整数で指定する.大きい値ほど「伸びやすく,縮みやすい」
+             ことを意味する.省略時の値
              は0であり,範囲外の値が指定されたときの動作は未定義である.
 
 <ratio>も省略可能フィールドであり,$-1$から$+1$の実数値をとる.省略時の値は0である.
@@ -3057,14 +3549,25 @@ Furthermore, the glyph is shifted according to values of fields
 \end{itemize}
 %</ja>
 %<*en>
+\ 
+
 Specifies the width of kern or glue which will be inserted 
 between characters in character class~$i$ and those in character class~$j$.
 
 <priority> is an integer in $[-2,2]$ (treated as 0 if omitted), and this is
 used only in line adjustment with priority by \Pkg{luatexja-adjust}
-(see Subsection~\ref{ssec-adj}). 
-
-<ratio> is \dots
+(see Subsection~\ref{ssec-adj}). Higher value means the glue is easy to shretch,
+and is also easy to shrink.
+
+<ratio> is also an optional value between $-1$ and 1. For example,
+Thw width of a glue between an ideographic full stop ``。''
+and a fullwidth middle dot ``・'' is three-fourth of fullwidth,
+namely halfwidth from the ideographic full stop, and
+quarter-width from the fullwidth middle dot.  In this case,
+we specify <ratio> to
+\[
+  -1\cdot \frac{0.5}{0.5+0.25} + 1 \cdot \frac{0.25}{0.5+0.25} = -\frac13.
+\]
 %</en>
 
 
@@ -3201,8 +3704,8 @@ The following is the list of imaginary characters:
 %%<ja>JFMやサイズが異なる2つの\textbf{JAchar}の間の境界として用いられる.
 
 \item['boxbdd']
-%<en>The beginning/ending of a horizontal box, and the beginning of a noindented paragraph.
-%<ja>水平ボックスの先頭と末尾,及びインデントされていない(\verb+\noindent+ で開始された)段落の先頭を表す.
+%<en>The beginning/ending of a hbox, and the beginning of a noindented (i.e., began by \verb+\noindent+) paragraph.
+%<ja>hboxの先頭と末尾,及びインデントされていない(\verb+\noindent+ で開始された)段落の先頭を表す.
 
 \item['parbdd']
 %<en>The beginning of an (indented) paragraph.
@@ -3223,7 +3726,7 @@ The following is the list of imaginary characters:
 % ToDo: English version.
 
 %<*en>
-\ldots
+See Japanese version of this manual.
 %</en>
 
 %<*ja>
@@ -3246,7 +3749,7 @@ The following is the list of imaginary characters:
       文字クラスに関してはグルー/カーンの設定はしない.
 
 これは,\pTeX では,
-      水平ボックスの先頭・末尾とインデントされていない(\verb+\noindent+ で開始さ
+      hboxの先頭・末尾とインデントされていない(\verb+\noindent+ で開始さ
       れた)段落の先頭にはJFMグルーは入らないという仕様を実現させるためである.
 \item \pTeX の組版を再現させようというのが目的であれば以上の注意を守れば十分である.
 
@@ -3260,7 +3763,7 @@ The following is the list of imaginary characters:
 \texttt{'parbdd'}を入れれば全角下がりとなる.
 
 \begin{LTXexample}[width=0.4\textwidth]
-\jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g
+\jfont\g=KozMinPr6N-Regular:jfm=test \g
 \parindent1\zw\noindent{}◆◆◆◆◆
 \par 「◆◆←二分下がり
 \par 【◆◆←全角下がり
@@ -3313,6 +3816,7 @@ you can set both \verb+\fam+ and \verb+\jfam+ to the same value.
 %<en>\caption{Commands for Japanese math fonts}
 %<ja>\caption{和文数式フォントに対する命令}
 \label{tab-math}
+%<en>\medskip
 \centering
 \def\{{\char`\{}\def\}{\char`\}}\small
 \begin{tabular}{ll}
@@ -3332,7 +3836,7 @@ you can set both \verb+\fam+ and \verb+\jfam+ to the same value.
 %<ja>\subsection{コールバック}
 
 %<*en>
-Like \LuaTeX\ itself, \LuaTeX-ja also has callbacks. These callbacks can
+\LuaTeX-ja also has several callbacks. These callbacks can
 be accessed via \verb+luatexbase.add_to_callback+ function and so on, as other callbacks.
 %</en>
 %<*ja>
@@ -3379,11 +3883,11 @@ An example of this callback is the \texttt{ltjarticle} class, with
 \texttt{jfm-min.lua}中の\texttt{'parbdd'}を強制的にクラス0に割り当てている.
 %</ja>
 
-%<en>\item[\texttt{luatexja.define\_font} callback]
-%<ja>\item[\texttt{luatexja.define\_font}コールバック]
+%<en>\item[\texttt{luatexja.define\_jfont} callback]
+%<ja>\item[\texttt{luatexja.define\_jfont}コールバック]
 %<*en>
-This callback and the next callback form a pair, and you can assign letters which don't have
           fixed code points in Unicode to non-zero character classes.
+This callback and the next callback form a pair, and you can assign characters 
which do not have fixed code points in Unicode to non-zero character classes.
 This \texttt{luatexja.define\_font} callback is called just when new Japanese font is loaded.
 %</en>
 %<*ja>
@@ -3397,54 +3901,101 @@ function (<table> jfont_info, <number> font_number)
   return <table> new_jfont_info
 end
 \end{lstlisting}
-
 %<*en>
-You may assume that \verb+jfont_info+ has the following fields:
-%</en>
-%<*ja>
-\verb+jfont_info+ は以下の2フィールドを持つ:
-%</ja>
+\verb+jfont_info+ has the following fields,
+\emph{which may not overwritten by a user}:
 \begin{description}
-\item[\tt size\_cache]
-%<*ja>
-使用されているJFMの情報が格納されているテーブルで,
-\emph{このテーブルを書き換えてはならない}.
-中身はほぼJFMファイルに書かれている唯一のテーブルであるが,次のように若干変わっている:
+\item[\texttt{size}]
+The font size specified at \verb+\jfont+ in scaled points ($1\,\mathrm{sp}=2^{-16}\,\mathrm{pt}$).
+\item[\texttt{zw}, \texttt{zh}, \texttt{kanjiskip}, \texttt{xkanjiskip}]
+These are scaled value of those specified by the JFM, by the font size.
+\item[\texttt{jfm}]
+The internal number of the JFM.
+\item[\texttt{var}]
+The value of \texttt{jfmvar}~key, which is specified at \verb+\jfont+.
+The default value is the empty string.
+\item[\texttt{chars}]
+The mapping table from character codes to its character classes.\\
+The specification \texttt{[i].chars=\{<character>, ...\}} in the JFM will be  stored in this
+          field as \texttt{chars=\{[<character>]=\,$i$, ...\}}.
+\item[\texttt{char\_type}]
+For $i\in\omega$, \texttt{char\_type[$i$]} is information of characters whose class is
+          $i$, and has the following fields:
 \begin{itemize}
-\item 各文字クラス$i$に属する文字達のテーブル\
-\texttt{[$i$].chars=\{<character>, ...\}} は,トップレベルにまとめられ,
-\texttt{chars=\{[<character>]=\,$i$, ...\}} という形になっている.
-\item \texttt{zw},~\texttt{zh}, \texttt{kanjiskip},~\texttt{xkanjiskip} の各フィールドの値は,
-実際に使われるフォントサイズに合わせたsp ($1\,\mathrm{sp}=2^{-16}\,\mathrm{pt}$)単位の長さに変わっている.
-\item 各文字クラス$i$の情報を格納したテーブルも,\texttt{char\_type} フィールドの下にまとめられている.
-例えば,文字クラス1に属する文字の高さは \texttt{char\_type[1].height} で参照できる.
-\item \texttt{dir} フィールドはこのテーブルにはない.
+ \item \texttt{width},~\texttt{height}, \texttt{depth}, 
+  \texttt{italic}, \texttt{down},~\texttt{left}\ are just 
+       scaled value of those specified by the JFM, by the font size.
+ \item \texttt{align} is a number which is determined from \texttt{align}~field in the JFM:
+\[
+ \begin{cases}
+  0&\text{\texttt{'left'} and the default value}\\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}
-%</ja>
-%<*en>
-A table which contains the information of a JFM, and \emph{this table must not be changed}.
-The contents of this table are similar to that which is written is the JFM file, but
-the following differ:
+\end{description}
+%</en>
+%<*ja>
+\verb+jfont_info+ は最低限以下のフィールドを持つが,これらを書き換えてはならない:
+\begin{description}
+\item[\texttt{size}]
+実際に使われるフォントサイズ(sp単位).$1\,\mathrm{sp}=2^{-16}\,\mathrm{pt}$.
+\item[\texttt{zw}, \texttt{zh}, \texttt{kanjiskip}, \texttt{xkanjiskip}]
+JFMファイルで指定されているそれぞれの値をフォントサイズに合わせてスケーリングしたものを
+sp単位で格納している.
+\item[\texttt{jfm}]
+利用されているJFMを識別するための番号.
+\item[\texttt{var}]
+\verb+\jfont+で指定された \texttt{jfmvar} キーの値(未指定のときは空文字列).
+\item[\texttt{chars}]
+文字コードから文字クラスへの対応が記述されたテーブル.\\
+JFM内の \texttt{[i].chars=\{<character>, ...\}} という指定は\ 
+\texttt{chars=\{[<character>]=\,$i$, ...\}} という形式に変換されている.
+\item[\texttt{char\_type}]
+$i\in\omega$に対して,\texttt{char\_type[$i$]} は文字クラス$i$の文字の寸法を格納しており,
+以下のフィールドを持つ.
 \begin{itemize}
-\item There is a \texttt{chars} table, \dots
-\item The value in \texttt{zw},~\texttt{zh}, \texttt{kanjiskip},~\texttt{xkanjiskip} fields are
-now scaled by real font size, and in scaled-pont unit.
-\item ...
-\item There is no \texttt{dir} field in this table.
+ \item \texttt{width},~\texttt{height}, \texttt{depth}, 
+  \texttt{italic}, \texttt{down},~\texttt{left}\ は
+JFMで指定されているそれぞれの値をスケーリングしたものである.
+ \item \texttt{align} はJFMで指定されている値によって,
+\[
+ \begin{cases}
+  0&\text{\texttt{'left'}や省略時}\\0.5&\text{\tt 'middle'}\\1&\text{\tt 'right'}
+ \end{cases}
+\]
+のいずれかの値をとる.
+\item $j\in \omega$に対して,\texttt{[$j$]} は文字クラス$i$の文字と$j$の文字の間に挿入されるkern
+      やglueを格納している.
+間に入るものがkernであれば,このフィールドの値は\ 
+\texttt{[$j$]=\{false, <kern\_node>, <ratio>\}} である.
+<kern\_node>はkernを表すノードそのものである\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>}$である.
 \end{itemize}
-%</en>
-
-\item[\tt var]
-%<en>The value specified in \texttt{jfmvar=...} at a call of \verb+\jfont+.
-%<ja>\verb+\jfont+ の呼び出しの際に\texttt{jfmvar=...}で指定された値.
 \end{description}
+%</ja>
 
 %<*en>
-The returned table \verb+new_jfont_info+ also should include these two fields.
+The returned table \verb+new_jfont_info+ also should include these fields, but
+you are free to add more fields (to use them in the \texttt{luatexja.find\_char\_class} callback).
 The \verb+font_number+ is a font number.
 %</en>
 %<*ja>
-戻り値の \verb+new_jfont_info+ テーブルもこれら2つのフィールドを含まなければならないが,
+戻り値の \verb+new_jfont_info+ テーブルも上に述べたフィールドをそのまま含まなければならないが,
 それ以外にユーザが勝手にフィールドを付け加えることは自由である.
 \verb+font_number+ はフォント番号である.
 %</ja>
@@ -3519,12 +4070,12 @@ end
 %<*en>
 The argument \verb+shift_info+ and the returned \verb+new_shift_info+ have
 \texttt{down} and \texttt{left} fields, which are the amount of shifting
-            down/left the character in a scaled-point.
+            down/left the character in a scaled point.
 %</en>
 %<*ja>
 引数 \verb+shift_info+ と戻り値の \verb+new_shift_info+ は
 \texttt{down}と\texttt{left}のフィールドを持ち,これらの値は
-文字の下/左へのシフト量(スケールド・ポイント単位)である.
+文字の下/左へのシフト量(sp単位)である.
 %</ja>
 
 %<*en>
@@ -3616,11 +4167,11 @@ in \pTeX, and symbols beside each parameter has the following meaning:
 %</ja>
 \begin{itemize}
 %<*en>
-\item ``\ast'' : values at the end of a paragraph or a horizontal box are
-adopted in the whole paragraph or the whole horizontal box.
+\item ``\ast'' : values at the end of a paragraph or a hbox are
+adopted in the whole paragraph or the whole hbox.
 %</en>
 %<*ja>
-\item ``\ast'':段落や水平ボックスの終端での値がその段落/水平ボックス全体で用いられる.
+\item ``\ast'':段落やhboxの終端での値がその段落/hbox全体で用いられる.
 %</ja>
 %<*en>
 \item ``\dagger'': assignments are always global.
@@ -3698,7 +4249,11 @@ Set a penalty which is inserted automatically after the character <chr\_code>,
 to prevent a line ends with this character. 
 \pTeX\ has following restrictions on \verb+\prebreakpenalty+ and \verb+\postbreakpenalty+,
 but they don't exist in \LuaTeX-ja:
-\dots
+\begin{itemize}
+ \item Both \verb+\prebreakpenalty+ and \verb+\postbreakpenalty+ cannot be set
+for the same character.
+ \item We can set \verb+\prebreakpenalty+ and \verb+\postbreakpenalty+  up to 256~characters.
+\end{itemize}
 %</en>
 
 \item[\Param{jatextfont}\,=\{<jfam>,<jfont\_cs>\}$^\ast$]
@@ -3712,6 +4267,8 @@ but they don't exist in \LuaTeX-ja:
 %<ja>[\TeX の \verb+\scriptscriptfont+]
 \item[\Param{yjabaselineshift}\,=<dimen>]\
 \item[\Param{yalbaselineshift}\,=<dimen>] [\verb+\ybaselineshift+]
+\item[\Param{tjabaselineshift}\,=<dimen>]\
+\item[\Param{talbaselineshift}\,=<dimen>] [\verb+\tbaselineshift+]
 
 \item[\Param{jaxspmode}\,=\{<chr\_code>,<mode>\}$^\ast$]
 
@@ -4025,7 +4582,7 @@ the beginning of a box and ``あ'', and also between ``あ''~and~``ウ''.
 ある.
 %</ja>
 
-\begin{LTXexample}
+\begin{LTXexample}[width=0.4\textwidth]
 \jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g
 \fbox{\hbox{あウあ\inhibitglue ウ}}
 \inhibitglue\par\noindent あ1
@@ -4108,7 +4665,7 @@ then
 \end{verbatim}
 does
 \begin{quote}
-If the current Japanese font is \verb+\hoge+, \texttt{U+3000}-\texttt{U+30FF}
+If the current Japanese font is \verb+\hoge+, \texttt{U+3000}--\texttt{U+30FF}
 and characters in class~1 (ideographic opening brackets) 
 are typeset by \verb+\piyo+.
 \end{quote}
@@ -4141,7 +4698,7 @@ are typeset by \verb+\piyo+.
 \ltjdeclarealtfont\hoge\piyo{"3000-"30FF, {-1}-{-1}}
 \end{verbatim}
 は「\verb+\hoge+ を利用しているとき,
-\texttt{U+3000}-\texttt{U+30FF}と
+\texttt{U+3000}--\texttt{U+30FF}と
 文字クラス1(開き括弧類)中の文字だけは \verb+\piyo+ を用いる」
 ことを設定する.\verb+{-1}-{-1}+ という変わった指定の仕方をしているのは,
 普通に \texttt{-1} と指定したのでは正しく$-1$と読み取られないという
@@ -4155,49 +4712,80 @@ are typeset by \verb+\piyo+.
 
 %<en>\subsection{Patch for NFSS2}
 %<ja>\subsection{NFSS2へのパッチ}
-\label{ssub-nfsspat}
+\label{ssec-nfsspat}
 
 \begin{figure}[!tb]
-\begin{lstlisting}[numberstyle=\tiny, numbers=left, numbersep=1em]
+\begin{LTXexample}[pos=b]
 \DeclareKanjiFamily{JY3}{edm}{}
-\DeclareFontShape{JY3}{edm}{m}{n}    {<-> s*IPAexMincho:jfm=ujis}{}
-\DeclareFontShape{JY3}{edm}{m}{green}{<-> s*IPAexMincho:jfm=ujis;color=007F00}{}
-\DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*IPAexMincho:jfm=ujis;color=0000FF}{}
-\DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{green}{"4E00-"67FF,{-2}-{-2}}
-\DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{blue}{ "6800-"9FFF}
-{\kanjifamily{edm}\selectfont
-日本国民は、正当に選挙された国会における代表者を通じて行動し、……}
-\end{lstlisting}
-\begin{quote}
-\DeclareKanjiFamily{JY3}{edm}{}
-\DeclareFontShape{JY3}{edm}{m}{n}    {<-> s*KozMinPr6N-Regular:jfm=ujis}{}
+\DeclareFontShape{JY3}{edm}{m}{n}    {<-> s*KozMinPr6N-Regular:jfm=ujis;}{}
 \DeclareFontShape{JY3}{edm}{m}{green}{<-> s*KozMinPr6N-Regular:jfm=ujis;color=007F00}{}
 \DeclareFontShape{JY3}{edm}{m}{blue} {<-> s*KozMinPr6N-Regular:jfm=ujis;color=0000FF}{}
 \DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{green}{"4E00-"67FF,{-2}-{-2}}
 \DeclareAlternateKanjiFont{JY3}{edm}{m}{n}{JY3}{edm}{m}{blue}{ "6800-"9FFF}
-
 {\kanjifamily{edm}\selectfont
 日本国民は、正当に選挙された国会における代表者を通じて行動し、……}
-\end{quote}
+\end{LTXexample}
 %<ja>\caption{\texttt{\textbackslash DeclareAlternateKanjiFont} の使用例}
 %<en>\caption{An example of \texttt{\textbackslash DeclareAlternateKanjiFont}}
 \label{fig:altkanji}
 \end{figure}
 
 %<*en>
-As described in Subsection~\ref{ssec-ltx}, Japanese patch for NFSS2 in \LuaTeX-ja
+Japanese patch for NFSS2 in \LuaTeX-ja
 is based on \texttt{plfonts.dtx} which plays the same role in \pLaTeXe.
-For an convenience, we will describe
-commands which are not described in Subsection~\ref{ssub-chgfnt}.
+We will describe
+commands which are not described in Subsection~\ref{ssec-chgfnt}.
 %</en>
 %<*ja>
-\ref{ssec-ltx}節で述べたように,\LuaTeX-jaのNFSS2への日本語パッチは
-\pLaTeXe で同様の役割を果たす \texttt{plfonts.dtx} をほぼそのまま利用している.
-便宜のため,ここでは\ref{ssub-chgfnt}節で述べていなかった命令について
+\LuaTeX-jaのNFSS2への日本語パッチは
+\pLaTeXe で同様の役割を果たす \texttt{plfonts.dtx} をベースに,
+和文エンコーディングの管理等をLuaで書きなおしたものである.
+ここでは\ref{ssec-chgfnt}節で述べていなかった命令について
 記述しておく.
 %</ja>
 
 \begin{cslist}%
+\par\smallskip\par\hskip-\leftskip{\bfseries%
+%<ja>追加の長さ変数達
+%<en>additonal dimensions
+}\par
+
+%<*en>
+Like \pLaTeXe, \LuaTeX-ja defines the following dimensions 
+for information of current Japanese font:
+%</en>
+%<*ja>
+\pLaTeXe と同様に,\LuaTeX-jaは「現在の和文フォントの情報」を格納する長さ変数
+%</ja>
+{\let\item=\origitem
+\begin{quote}
+ \verb+\cht+~(height), \verb+\cdp+~(depth), \verb+\cHT+~(sum of former two),\\
+ \verb+\cwd+~(width), \verb+\cvs+~(lineskip), \verb+\chs+~(equals to \verb+\cwd+)
+\end{quote}}
+%<en>and its \verb+\normalsize+ version:
+%<ja>と,その \verb+\normalsize+ 版である
+{\let\item=\origitem
+\begin{quote}
+ \verb+\Cht+~(height), \verb+\Cdp+~(depth),
+ \verb+\Cwd+~(width), \\\verb+\Cvs+~(equals to \verb+\baselineskip+), 
+ \verb+\Chs+~(equals to \verb+\cwd+)%
+%<en>.
+\end{quote}}
+%<*ja>
+を定義している.なお,\verb+\cwd+ と \verb+\zw+,また
+\verb+\cHT+ と \verb+\zh+ は一致しない可能性がある.なぜなら,
+\verb+\cwd+,~\verb+\cHT+ は「あ」の寸法から決定されるのに対し,
+\verb+\zw+ と \verb+\zh+ はJFMに指定された値に過ぎないからである.
+%</ja>
+%<*en>
+Note that \verb+\cwd+~and~\verb+\cHT+ may  differ from \verb+\zw+~and~\verb+\zh+
+respectively.
+On the one hand the former dimensions are determined from the character ``あ'',
+but on the other hand \verb+\zw+~and~\verb+\zh+ are specified by JFM.
+%</en>
+
+
+\item[DeclareYokoKanjiEncoding\{<encoding>\}\{<text-settings>\}\{<math-settings>\}]
 \item[DeclareYokoKanjiEncoding\{<encoding>\}\{<text-settings>\}\{<math-settings>\}]
 
 %<*en>
@@ -4205,16 +4793,16 @@ In NFSS2 under \LuaTeX-ja, distinction between alphabetic font families
             and Japanese font families are only made by their
             encodings. For example, encodings OT1 and T1 are for
             alphabetic font families, and a Japanese font family cannot
-            have these encodings. This command defines a new encoding
-            scheme for Japanese font family (in horizontal direction).
+            have these encodings. These command define a new encoding
+            scheme for Japanese font family.
 %</en>
 %<*ja>
 \LuaTeX-jaのNFSS2においては,欧文フォントファミリと和文フォントファミリは
 そのエンコーディングによってのみ区別される.
 例えば,OT1とT1のエンコーディングは欧文フォントファミリに対するものであり,
 和文フォントファミリはこれらのエンコーディングを持つことはできない.
\81\93ã\81®ã\82³ã\83\9eã\83³ã\83\89ã\81¯æ¨ªæ\9b¸ã\81\8d用和文フォントのための新しいエンコーディングを
-定義する.
\81\93ã\82\8cã\82\89ã\82³ã\83\9eã\83³ã\83\89ã\81¯æ¨ªçµ\84ç\94¨ã\83»ç¸¦çµ\84用和文フォントのための新しいエンコーディングを
+それぞれ定義する.
 %</ja>
 
 \item[DeclareKanjiEncodingDefaults\{<text-settings>\}\{<math-settings>\}]
@@ -4225,7 +4813,7 @@ In NFSS2 under \LuaTeX-ja, distinction between alphabetic font families
 The above 3~commands are just the counterparts for \verb+\DeclareFontEncodingDefaults+ and~others.
 %</en>
 %<*ja>
-上記3つのコマンドはちょうど \verb+DeclareFontEncodingDefaults+ などに対応するものである.
+上記3つのコマンドはちょうど \verb+\DeclareFontEncodingDefaults+ などに対応するものである.
 %</ja>
 
 \item[reDeclareMathAlphabet\{<unified-cmd>\}\{<al-cmd>\}\{<ja-cmd>\}]
@@ -4253,11 +4841,11 @@ The above 3~commands are just the counterparts for \verb+\DeclareFontEncodingDef
 \item <al-cmd>,~<ja-cmd>は既に定義されていなければならない.
       \verb+\reDeclareMathAlphabet+\\の後に
 両命令の内容を再定義しても,<unified-cmd>の内容にそれは反映されない.
-\item <al-cmd>,~<ja-cmd>に\verb+\@mathrm+などと\texttt{@}をつけた命令を指定した時の動作は保証できない.
+\item <al-cmd>,~<ja-cmd>に\verb+\@mathrm+などと \texttt{@} をつけた命令を指定した時の動作は保証できない.
 \end{itemize}}
 %</ja>
 
-\item[DeclareRelationFont\{<ja-encoding>\}\{<ja-family>\}\{<ja-series>\}\{<ja-shape>\}\\
+\item[DeclareRelationFont\{<ja-encoding>\}\{<ja-family>\}\{<ja-series>\}\{<ja-shape>\}\\*
   \null\hfill\{<al-encoding>\}\{<al-family>\}\{<al-series>\}\{<al-shape>\}]
 %<*en>
 This command sets the ``accompanied'' alphabetic font family (given by the latter 4~arguments)
@@ -4286,14 +4874,35 @@ Change current alphabetic font encoding/family/\dots\ to the `accompanied' alpha
 Like \verb+\fontfamily+, \verb+\selectfont+ is required to take an effect.
 %</en>
 %<*ja>
-現在の欧文フォントエンコーディング/ファミリ/…… を,
\8f¾å\9c¨ã\81®æ¬§æ\96\87ã\83\95ã\82©ã\83³ã\83\88ã\81®ã\82¨ã\83³ã\82³ã\83¼ã\83\87ã\82£ã\83³ã\82°ï¼\8fã\83\95ã\82¡ã\83\9fã\83ªï¼\8fâ\80¦â\80¦ ã\82\92ï¼\8c
 \verb+\DeclareRelationFont+ か \verb+\SetRelationFont+ で指定された
 現在の和文フォントファミリに対応する「従属欧文」フォントファミリに変更する.
 \verb+\fontfamily+ のように,有効にするためには \verb+\selectfont+ が必要である.
 %</ja>
 
 \item[adjustbaseline]
-\ldots
+%<*en>
+In \pLaTeXe, \verb+\adjustbaseline+ sets \verb+\tbaselineshift+ 
+to match the vertical center of ``M'' and that of ``あ''  in vertical typesetting:
+\[
+\text{\ttfamily \textbackslash tbaselineshift} \leftarrow 
+\frac{(h_{\text{M}}+d_{\text{M}}) - (h_{\text{あ}}+d_{\text{あ}})}2
+  + d_{\text{あ}} - d_{\text{M}},
+\]
+where $h_{a}$~and~$d_{a}$ denote the height of ``$a$'' and the depth, respectively.
+In \LuaTeX-ja, this \verb+\adjustbaseline+ does same task.
+%</en>
+%<*ja>
+\pLaTeXe では,\verb+\adjustbaseline+ は縦書時に「M」と「あ」の中心線を一致させるために,
+\verb+\tbaselineshift+ を設定する役割を持っていた:
+\[
+\text{\ttfamily \textbackslash tbaselineshift} \leftarrow 
+\frac{(h_{\text{M}}+d_{\text{M}}) - (h_{\text{あ}}+d_{\text{あ}})}2
+  + d_{\text{あ}} - d_{\text{M}},
+\]
+ここで,$h_{a}$,~$d_{a}$はそれぞれ「$a$」の高さ・深さを表す.
+\LuaTeX-jaにおいても\verb+\adjustbaseline+ は同様の処理を行っている.
+%</ja>
 
 \item[fontfamily\{<family>\}]
 %<*en>
@@ -4326,7 +4935,8 @@ to <family>. Which family will be changed is determined as follows:
       \verb+\DeclareKanijFamily+.
 %</en>
 %<*ja>
-\item エンコーディング<ja-enc>におけるファミリ<family>が既に \verb+\DeclareKanjiFamily+ によって定義されている.
+\item エンコーディング<ja-enc>におけるファミリ<family>が
+既に \verb+\DeclareKanjiFamily+ によって定義されている.
 %</ja>
 %<*en>
 \item A font definition named \texttt{<ja-enc><family>.fd} (the file name is
@@ -4366,9 +4976,11 @@ In this case, the default family for font substitution is used for
 \item[DeclareAlternateKanjiFont\{<base-encoding>\}\{<base-family>\}\{<base-series>\}\{<base-shape>\}\\
   \null\hfill\{<alt-encoding>\}\{<alt-family>\}\{<alt-series>\}\{<alt-shape>\}\{<range>\}]
 %<*ja>
-\ref{ssec-altfont}節の
-\verb+\ltjdeclarealtfont+ と同様に,前半の4引数の和文フォント(基底フォント)のうち<range>中の文字を
-第5--第8引数の和文フォントを使って組むように指示する.使用例を図\ref{fig:altkanji}に載せた.
+\ref{ssec-altfont}節の\
+\verb+\ltjdeclarealtfont+ と同様に,前半の4引数の
+和文フォント(基底フォント)のうち<range>中の文字を
+第5--第8引数の和文フォントを使って組むように指示する.
+使用例を図\nobreak\ref{fig:altkanji}に載せた.
 
 {\let\item\origitem
 %<en>\advance\linewidth-2em
@@ -4382,7 +4994,7 @@ In this case, the default family for font substitution is used for
 実際に効力が発揮するのは,書体変更やサイズ変更を行った時,
 あるいは(これらを含むが)\verb+\selectfont+ が実行された時である.
  \item 
-段落や水平ボックスの最後での設定値が段落/水平ボックス全体にわたって通用する点や,
+段落やhboxの最後での設定値が段落/hbox全体にわたって通用する点や,
 <range>に負数$-n$を指定した場合,それが「基底フォントの文字クラス$n$に属する文字全体」
 と解釈されるのは \verb+\ltjdeclarealtfont+ と同じである.
 \end{itemize}%
@@ -4429,10 +5041,22 @@ Avant Garde (OT1/pag/m/n) に変わっていることがわかる.
 \userelfont\selectfont あいうabc
 \end{LTXexample}
 
-%<en>\section{Extensions}
-%<ja>\section{拡張}
+%<*en>
+\section{Addons}
+\LuaTeX-ja has several addon packages. 
+These addons are written as \LaTeX\ packages, but 
+\Pkg{luatexja-otf} and~\Pkg{luatexja-adjust} can be loaded in plain \LuaTeX\
+by \verb+\input+.
+%</en>
+%<*ja>
+\section{拡張}
+\LuaTeX-jaには(動作には必須ではないが)自由に読み込める拡張が付属している.
+これらは\LaTeX のパッケージとして制作しているが,
+\Pkg{luatexja-otf}と\Pkg{luatexja-adjust}についてはplain \LuaTeX でも\ 
+\verb+\input+ で読み込み可能である.
+%</ja>
 \subsection{\texttt{luatexja-fontspec.sty}}
-
+\label{ssec-fontspec2}
 %<*en>
 As described in Subsection~\ref{ssec-fontspec}, this optional package
 provides the counterparts for several commands defined in the
@@ -4455,7 +5079,7 @@ the commands of Japanese version:
 \item[JFM-var=<name>] \
 
 %<*en>
-These 3 font features correspond to \texttt{cid}, \texttt{jfm} and
+These 3 keys correspond to \texttt{cid}, \texttt{jfm} and
 \texttt{jfmvar} keys for \verb+\jfont+ respectively.
 \texttt{CID} is effective only when with \texttt{NoEmbed}
 described below.
@@ -4472,13 +5096,67 @@ See Subsections~\ref{ssec-jfont} and \ref{ssec-psft} for details.
 
 \item[NoEmbed]
 %<*en>
-By specifying this font feature, one can use ``name-only'' Japanese font which
+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}.
 %</en>
 %<*ja>
 これを指定することで,PDFに埋め込まれない「名前だけ」のフォントを指定することが
 できる.\ref{ssec-psft}節を参照.
 %</ja>
+
+
+\begin{figure}[!tb]
+\begin{LTXexample}[pos=b]
+\jfontspec[
+  AltFont={
+    {Range="4E00-"67FF, Color=007F00},
+    {Range="6800-"9EFF, Color=0000FF},
+    {Range="3040-"306F, Font=KozGoPr6N-Regular},
+  }
+]{KozMinPr6N-Regular}
+日本国民は、正当に選挙された国会における代表者を通じて行動し、われらとわれらの子孫のために、
+諸国民との協和による成果と、わが国全土にわたつて自由のもたらす恵沢を確保し、……
+\end{LTXexample}
+%<ja>\caption{\texttt{AltFont} の使用例}
+%<en>\caption{An example of \texttt{AltFont}}
+\label{fig:altkanji-fontspec}
+\end{figure}
+
+\item[AltFont]\ 
+
+%<*en>
+As \verb+\ltjdeclarealtfont+~(Subsection~\ref{ssec-altfont}) and
+\verb+\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}節の \verb+\ltjdeclarealtfont+ や,
+\ref{ssec-nfsspat}節の \verb+\DeclareAlternateKanjiFont+ と同様に,
+このキーを用いると一部の文字を異なったフォントやfont featureを使って組むことができる.
+\texttt{AltFont} に指定する値は,次のように二重のコンマ区切りリストである:
+%</ja>
+\begin{lstlisting}[escapechar=\#]
+AltFont = {
+  ...
+  { Range=#\LARG range>#, #\LARG features>#},
+  { Range=#\LARG range>#, Font=#\LARG font~name>#, #\LARG features># },
+  { Range=#\LARG range>#, Font=#\LARG font~name># },
+  ...
+}
+\end{lstlisting}
+%<*en>
+Each sublist should have the \texttt{Range} key
+(sublist which does not contain \texttt{Range} key is simply ignored).
+A demonstrartion is shown in Figure~\ref{fig:altkanji-fontspec}.
+%</en>
+%<*ja>
+各部分リストには \texttt{Range} キーが必須である(含まれない部分リストは
+単純に無視される).
+指定例は図\ref{fig:altkanji-fontspec}に示した.
+%</ja>
 \end{list}
 
 %<*ja>
@@ -4487,16 +5165,18 @@ will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}.
 %</ja>
 
 
-
 \subsection{\texttt{luatexja-otf.sty}}
 \label{ssec-ltjotf}
 %<*en>
 This optional package supports typesetting characters in
-Adobe-Japan1. the package \Pkg{luatexja-otf} offers the following 2~low-level
+Adobe-Japan1 character collection 
+(or other CID character collecton, if the font is supported). 
+The package \Pkg{luatexja-otf} offers the following 2~low-level
 commands:
 %</en>
 %<*ja>
-この追加パッケージはAdobe-Japan1の文字の出力をサポートする.
+この追加パッケージはAdobe-Japan1(フォント自身が持っていれば,
+別のCID文字セットでも可)の文字の出力をサポートする.
 \Pkg{luatexja-otf}は以下の2つの低レベルコマンドを提供する:
 %</ja>
 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
@@ -4520,6 +5200,13 @@ but please remind remarks below.
 %</ja>
 \end{list}
 
+%<*ja>
+このパッケージは,\texttt{ajmacros.sty}(\Pkg{otf}パッケージ付属のマクロ集,井上浩一氏作)から
+漢字コードをUTF8にしたり,plain \LuaTeX でも利用可能するという
+修正を加えた \texttt{luatexja-ajmacros.sty} も自動的に読み込む.
+そのため,マクロ集にある \verb+\aj半角+ などのマクロもそのまま使用可能である.
+%</ja>
+
 %<en>\paragraph{Remarks}
 %<ja>\paragraph{注意}
 %<*en>
@@ -4548,7 +5235,6 @@ ordinary characters in the following points:
 %</ja>
 \end{itemize}
 
-
 %<en>\paragraph{Additional syntax of JFM}
 %<ja>\paragraph{JFMへの記法の追加}
 
@@ -4689,7 +5375,7 @@ for making the difference obvious.
 
 
 %<*en>
-...
+(see Japanese version of this manual)
 %</en>
 %<*ja>
 \pTeX では,行長調整において優先度の概念が存在しなかったため,図
@@ -4720,18 +5406,116 @@ for making the difference obvious.
 \item[\textbackslash ltjenableadjust]
 優先順位付きの行長調整を有効化する.
 
-\item[\textsf{adjust}=<bool>] \verb+\ltjsetparameter+ で指定可能な追加パラメータであり,
+\item[\textsf{adjust}\,=<bool>] \verb+\ltjsetparameter+ で指定可能な追加パラメータであり,
 <bool>が\textit{true}なら \verb+\ltjenableadjust+ を,
 そうでなければ \verb+\ltjdisableadjust+ を実行する.
-
-
 \end{list}
+%</ja>
 
+\subsection{\texttt{luatexja-ruby.sty}}
+%<*en>
+This addon package provides functionality of ``ruby'' (\emph{furigana}) annotations 
+using callbacks of \LuaTeX-ja. 
+There is no detailed manual of \Pkg{luatexja-ruby.sty} in English.
+(Japanese manual is another PDF file, \url{luatexja-ruby.pdf}.) 
+%</en>
+%<*ja>
+この追加パッケージは,\LuaTeX-jaの機能を利用したルビ(振り仮名)の組版機能を提供する.
+前後の文字種に応じた前後への自動進入や,
+行頭形・行中形・行末形の自動的な使い分けが特徴である.
+
+ルビ組版に設定可能な項目や注意事項が多いため,本追加パッケージの詳細な説明は
+使用例と共に \url{luatexja-ruby.pdf}\ という別ファイルに載せている.
+この節では簡単な使用方法のみ述べる.
+%</ja>
 
+\begin{description}
+%<*en>
+ \item[Group-ruby]
+By default, ruby characters (the second argument of \verb+\ruby+)
+are attached to base characters (the first argument), as one object.
+This type of ruby is called \emph{group-ruby}.
+%</en>
+%<*ja>
+ \item[グループルビ] 標準ではグループルビの形で組まれる.第1引数に親文字,
+第2引数にルビを記述する.
+%</ja>
+\begin{LTXexample}[width=0.3\textwidth]
+東西線\ruby{妙典}{みようでん}駅は……\\
+東西線の\ruby{妙典}{みようでん}駅は……\\
+東西線の\ruby{妙典}{みようでん}という駅……\\
+東西線\ruby{葛西}{かさい}駅は……
+\end{LTXexample}
+%<*en> 
+As the above example, ruby hangover is allowed on the Hiragana before/after 
+its base characters.
+%</en>
+%<ja> この例のように,標準では前後の平仮名にルビ全角までかかるようになっている.
 
+%<*en>
+\item[Mono-ruby]
+To attach ruby characters to each base characters (\emph{mono-ruby}),
+one should use \verb+\ruby+ multiple times:
+%</en>
+%<*ja>
+ \item[モノルビ] 親文字を1文字にするとモノルビとなる.
+2文字以上の熟語をモノルビの形で組みたい場合は,面倒でも
+その数だけ \verb+\ruby+ を書く必要がある.
+%</ja>
+\begin{LTXexample}[width=0.3\textwidth]
+東西線の\ruby{妙}{みよう}\ruby{典}{でん}駅は……
+\end{LTXexample}
 
+%<*en>
+ \item[Jukugo-ruby]
+Vertical bar~\verb+|+ denotes a boundary of \emph{groups}.
+%</en>
+%<*ja>
+ \item[熟語ルビ] 引数内の縦棒 \verb+|+ はグループの区切りを表し,
+複数グループのルビは熟語ルビとして組まれる.
+\cite{x4051}にあるように,
+どのグループでも「親文字」が対応するルビ以上の長さの場合は
+各グループごとに,そうでないときは全体をまとめて1つのグループルビとして組まれる.
+\cite{jlreq}で規定されている組み方とは異なるので注意.
+%</ja>
+\begin{LTXexample}
+\ruby{妙|典}{みよう|でん}\
+\ruby{葛|西}{か|さい}\
+\ruby{神楽|坂}{かぐら|ざか}
+\end{LTXexample}
+%<*en>
+If there are multiple groups in one \verb+\ruby+ call,
+A linebreak between two groups is allowed.
+%</en>
+%<ja> 複数ルビではグループとグループの間で改行が可能である.
+\begin{LTXexample}[width=0.3\textwidth]
+\vbox{\hsize=6\zw\noindent
+  \hbox to 2.5\zw{}\ruby{京|急|蒲|田}{けい|きゆう|かま|た}
+  \hbox to 2.5\zw{}\ruby{京|急|蒲|田}{けい|きゆう|かま|た}
+  \hbox to   3\zw{}\ruby{京|急|蒲|田}{けい|きゆう|かま|た}
+}
+\end{LTXexample}
+\end{description}
 
+%<*en>
+If the width of ruby characters are longer than that of base characters,
+\verb+\ruby+ automatically selects the appropriate form
+among the line-head form, the line-middle form, and the line-end form.
+%</en>
+%<*ja>
+また,ルビ文字のほうが親文字よりも長い場合は,自動的に
+行頭形・行中形・行末形のいずれか適切なものを選択する.
 %</ja>
+\begin{LTXexample}[width=0.3\textwidth]
+\vbox{\hsize=8\zw\noindent
+\null\kern3\zw ……を\ruby{承}{うけたまわ}る
+     \kern1\zw ……を\ruby{承}{うけたまわ}る\\
+\null\kern5\zw ……を\ruby{承}{うけたまわ}る
+}
+\end{LTXexample}
+
+
+
 
 
 
@@ -4754,6 +5538,7 @@ Here the following is the list of dimensions and attributes which are used in \L
 \begin{list}{}{%
 \def\makelabel{\ttfamily}\advance\leftmargin1\zw
 \def\dim#1{\item[\textbackslash #1\ \textrm{(dimension)}]}
+\def\cnt#1{\item[\textbackslash #1\ \textrm{(counter)}]}
 \def\attr#1{\item[\textbackslash #1\ \textrm{(attribute)}]}
 }
 
@@ -4784,17 +5569,25 @@ This \verb+\jH+ is the same \verb+\dimen+ register as \verb+\jQ+.
 \dim{ltj@zw}
 %<*en>
 A temporal register for the ``full-width'' of current Japanese font.
+The command \verb+\zw+ sets this register to the correct value, and
+``return'' this register itself.
 %</en>
 %<*ja>
 現在の和文フォントの「全角幅」を保持する一時レジスタ.
+\verb+\zw+ 命令は,このレジスタを適切な値に設定した後,
+「このレジスタ自体を返す」.
 %</ja>
 
 \dim{ltj@zh}
 %<*en>
 A temporal register for the ``full-height'' (usually the sum of height of imaginary body and its depth) of current Japanese font.
+The command \verb+\zh+ sets this register to the correct value, and
+``return'' this register itself.
 %</en>
 %<*ja>
 現在の和文フォントの「全角高さ」(通常,高さと深さの和)を保持する一時レジスタ.
+\verb+\zh+ 命令は,このレジスタを適切な値に設定した後,
+「このレジスタ自体を返す」.
 %</ja>
 
 \attr{jfam}
@@ -4807,10 +5600,18 @@ Current number of Japanese font family for math formulas.
 
 \attr{ltj@curjfnt}
 %<*en>
-The font index of current Japanese font.
+The font index of current Japanese font for horizontal direction.
+%</en>
+%<*ja>
+現在の横組用和文フォントのフォント番号.
+%</ja>
+
+\attr{ltj@curtfnt}
+%<*en>
+The font index of current Japanese font for vertical direction.
 %</en>
 %<*ja>
-現在の和文フォントのフォント番号.
+現在の縦組用和文フォントのフォント番号.
 %</ja>
 
 \attr{ltj@charclass}
@@ -4837,6 +5638,9 @@ The amount of shifting the baseline of Japanese fonts in scaled point ($2^{-16}\
 スケールド・ポイント($2^{-16}\,\textrm{pt}$)を単位とした和文フォントのベースラインの移動量.
 %</ja>
 
+\attr{ltj@tablshift}
+\attr{ltj@tkblshift}
+
 \attr{ltj@autospc}
 %<*en>
 Whether the auto insertion of \Param{\hyperlink{fld:kanjiskip}{kanjiskip}} is allowed at the node.
@@ -4864,15 +5668,15 @@ assigned to this attribute:
 \begin{description}
 \item[\textit{italic} (1)]
 %<*en>
-Glues from an italic correction
-          (\verb+\/+). This distinction of origins of glues
-          (from explicit \verb+\kern+, or from \verb+\/+)
-          is needed in the insertion process of \Param{\hyperlink{fld:xks}{xkanjiskip}}.
+Kerns from italic correction (\verb+\/+), or from kerning information of a Japanese font.
+These kerns are ``ignored'' in the insertion process of \textbf{JAglue},
+unlike explicit \verb+\kern+.
 %</en>
 %<*ja>
-イタリック補正(\verb+\/+)によるグルー.このグルーの由来の区別(\verb+\kern+ か
-\hskip\ltjgetparameter{xkanjiskip}
-\verb+\/+ か)は\Param{\hyperlink{fld:xks}{xkanjiskip}}の挿入過程において必要になる.
+イタリック補正(\verb+\/+)によるカーン,
+または \Pkg{luaotfload} によって挿入されたフォントのカーニング情報由来のカーン.
+これらのカーンは通常の \verb+\kern+ とは異なり,
+\textbf{JAglue}の挿入処理においては透過する.
 %</ja>
 
 \item[\textit{packed} (2)]
@@ -4882,31 +5686,31 @@ Glues from an italic correction
 Penalties inserted for the word-wrapping process (\emph{kinsoku shori}) of Japanese characters.
 %</en>
 %<ja>禁則処理のために挿入されたペナルティ.
-\item[\textit{from\_jfm} (6)]
+\item[\mathversion{bold}$(\textit{from\_jfm}-2)$--$(\textit{from\_jfm}+2)$~(4--8)]
 %<en>Glues/kerns from JFM.
 %<ja>JFM由来のグルー/カーン.
-\item[\textit{kanji\_skip} (9)]
-%<en>Glues for \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}.
-%<ja>\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}のグルー.
-\item[\textit{xkanji\_skip} (10)]
-%<en>Glues for \Param{\hyperlink{fld:xks}{xkanjiskip}}.
-%<ja>\Param{\hyperlink{fld:xks}{xkanjiskip}}のグルー.
-\item[\textit{processed} (11)]
+\item[\textit{kanji\_skip}~(9), \textit{kanji\_skip\_jfm}~(10)]
+%<en>Glues from \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}.
+%<ja>和文間空白\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}を表すグルー.
+\item[\textit{xkanji\_skip}~(11), \textit{xkanji\_skip\_jfm}~(12)]
+%<en>Glues from \Param{\hyperlink{fld:xks}{xkanjiskip}}.
+%<ja>和欧文間空白\Param{\hyperlink{fld:xks}{xkanjiskip}}を表すグルー.
+\item[\textit{processed} (13)]
 %<en>Nodes which is already processed by \ldots.
 %<ja>\LuaTeX-ja の内部処理によって既に処理されたノード.
-\item[\textit{ic\_processed} (12)]
+\item[\textit{ic\_processed} (14)]
 %<*en>
 Glues from an italic correction, but already processed in the insertion process of \textbf{JAglue}s.
 %</en>
 %<ja>イタリック補正に由来するグルーであって,既に \textbf{JAglue} 挿入処理にかかったもの.
 \item[\textit{boxbdd} (15)]
 %<en>Glues/kerns that inserted just the beginning or the ending of an hbox or a paragraph.
-%<ja>ある水平ボックスか段落の最初か最後に挿入されたグルー/カーン.
+%<ja>hboxか段落の最初か最後に挿入されたグルー/カーン.
 \end{description}
 
 %<*ja>
 また,挿入処理の結果であるリストの最初のノードでは,\verb+\ltj@icflag+ の値に
-\textit{processed\_begin\_flag}~(32)が追加される.これによって,\verb+\unhbox+ が
+\textit{processed\_begin\_flag}~(128)が追加される.これによって,\verb+\unhbox+ が
 連続した場合でも「ボックスの境界」が識別できるようになっている.
 %</ja>
 
@@ -4920,18 +5724,42 @@ $i$は7より小さい自然数.
 これら7つの属性レジスタは,どの文字ブロックが\textbf{JAchar}のブロックとして
 扱われるかを示すビットベクトルを格納する.
 %</ja>
+
+\cnt{ltj@dir@count}
+%<*ja>
+現在の組方向を表す.
+%</ja>
+\begin{description}
+\item[\textit{dir\_dtou} (1)]
+\item[\textit{dir\_tate} (3)]
+\item[\textit{dir\_yoko} (4)]
+\end{description}
+
+\attr{ltj@dir}
+%<*ja>
+ボックスにおける組方向を示す.上記の3つの値(1,~3,~4)の他に,
+それらに次を加えた値(17,~19, 20, 33, 35,~36)もとり得る.
+%</ja>
+\begin{description}
+\item[\textit{dir\_node\_auto} (16)]
+\item[\textit{dir\_node\_manual} (32)]
+\end{description}
+
+
 \end{list}
 
 %<*en>
 Furthermore, \LuaTeX-ja uses several user-defined whatsit nodes for
-inrernal processing. All those nodes store a natural number (hence the node's
-\texttt{type} is 100). 
+inrernal processing. All those nodes except \emph{direction} whatsits 
+store a natural number (hence its \texttt{type} is 100). 
+\emph{direction} whatsits store a node list, hence its \texttt{type} is 110.
 Their \texttt{user\_id} (used for distinguish user-defined whatsits) 
 are allocated by \texttt{luatexbase.newuserwhatsitid}.
 %</en>
 %<*ja>
 さらに,\LuaTeX-jaはいくつかのuser-defined whatsit nodeを内部処理に用いる.
-これらのwhatsitノードの \texttt{type} は100であり,ノードは自然数を格納している.
+\textit{direction} whatsitはノードリストを格納するが,
+それ以外のwhatsitノードの \texttt{type} は100であり,ノードは自然数を格納している.
 user-defined whatsitを識別するための \texttt{user\_id} は\ 
 \texttt{luatexbase.newuserwhatsitid} により確保されており,
 下の見出しは単なる識別用でしかない.
@@ -4960,7 +5788,7 @@ Nodes for \LuaTeX-ja's stack system (see the next
 
 \item[\textit{char\_by\_cid}]
 %<*en>
-Nodes for Japanese Characters which the callback process of
+Nodes for \textbf{JAchar} which the callback process of
           \Pkg{luaotfload} won't be applied, and the character code is
           stored in the \texttt{value} field. Each node of this type are 
            converted to a \textit{glyph\_node} \emph{after}
@@ -4968,13 +5796,25 @@ Nodes for Japanese Characters which the callback process of
 Nodes of this type is used in \verb+\CID+, \verb+\UTF+ and IVS support.
 %</en>
 %<*ja>
-\Pkg{luaotfload}のコールバックによる処理が適用されない和文文字のためのノードで,
+\Pkg{luaotfload}のコールバックによる処理が適用されない\textbf{JAchar}のためのノードで,
 \texttt{value} フィールドに文字コードが格納されている.
 この種類のノードはそれぞれが\Pkg{luaotfload}のコールバックの処理の
 \emph{後で}\textit{glyph\_node}に変換される.
 \verb+\CID+, \verb+\UTF+やIVS対応処理でこの種類のノードが利用されている.
 %</ja>
 
+\item[\textit{replace\_vs}]
+%<*en>
+Similar to \textit{char\_by\_cid} whatsits above.
+These nodes are for \textbf{ALchar} which the callback process of
+          \Pkg{luaotfload} won't be applied.
+%</en>
+%<*ja>
+上の\textit{char\_by\_cid}と同様に,
+これらのノードは\Pkg{luaotfload}のコールバックによる処理が適用されない\textbf{ALchar}のた
+          めものである.
+%</ja>
+
 \item[\textit{begin\_par}]
 %<*en>
 Nodes for indicating beginning of a paragraph.
@@ -4985,6 +5825,9 @@ for its label before the actual contents. So \dots
 「段落の開始」を意味するノード.
 list環境,itemize環境などにおいて,\verb+\item+ で始まる各項目は……
 %</ja>
+
+\item[\textit{direction}]
+
 \end{description}
 
 %<*en>
@@ -5028,7 +5871,7 @@ known from any callbacks.  In the \texttt{tex/packaging.w}, which is a
 file in the source of \LuaTeX, there are the following codes:
 %</en>
 %<*ja>
-\ref{ssec-param}節で述べたように,ある水平ボックスの中で効力を持つ
+\ref{ssec-param}節で述べたように,あるhboxの中で効力を持つ
 \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}の値は最後に現れた値のみであり,したがってボックス全体に適用される
 \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}は5\,ptであるべきである.しかし,\LuaTeX の実
 装を観察すると,この5\,ptという長さはどのコールバックからも知ることはできないことがわかる.
@@ -5075,7 +5918,7 @@ The code of stack system is based on that in a post of Dev-luatex mailing list\f
 %</en>
 %<*ja>
 スタックシステムのコードはDev-luatexメーリングリストのある投稿\footnote{%
-texttt{[Dev-luatex] tex.currentgrouplevel}: Jonathan Sauerによる2008/8/19の投稿.}を
+\texttt{[Dev-luatex] tex.currentgrouplevel}: Jonathan Sauerによる2008/8/19の投稿.}を
 ベースにしている.
 %</ja>
 
@@ -5090,7 +5933,7 @@ previous level is copied.
 %</en>
 %<*ja>
 情報を保持するために,2つの\TeX の整数レジスタを用いている:
-\verb+\ltj@@stack+ ã\81§ã\82¹ã\82¿ã\83\83ã\82¯ã\83¬ã\83\99ã\83«ï¼\8c\verb+\ltj@@group@level+ ã\81§最後の代入が
+\verb+\ltj@@stack+ ã\81«ã\82¹ã\82¿ã\83\83ã\82¯ã\83¬ã\83\99ã\83«ï¼\8c\verb+\ltj@@group@level+ ã\81«最後の代入が
 なされた時点での\TeX のグループレベルを保持している.
 パラメータは\texttt{charprop\_stack\_table}という名前のひとつの大きなテーブルに
 格納される.ここで,\texttt{charprop\_stack\_table[$i$]}はスタックレベル$i$の
@@ -5100,34 +5943,34 @@ previous level is copied.
 
 %<*en>
 To resolve the problem mentioned in above paragraph ``Background'', \LuaTeX-ja uses
-another thing: When a new stack level is about to be created, a whatsit
+another trick. When the stack level is about to be increased, a whatsit
 node whose type, subtype and value are 44~(\textit{user\_defined}),
-\textit{stack\_marker} and current group level respectively is appended to the current
+\textit{stack\_marker} and the current group level respectively is appended to the current
 list (we refer this node by \textit{stack\_flag}). This enables us to
 know whether assignment is done just inside a hbox. Suppose that the
 stack level is~$s$ and the \TeX's group level is~$t$ just after the hbox
 group, then:
 %</en>
 %<*ja>
-上の「背景」で述べた問題を解決するために,\LuaTeX-jaではもう一つの手法を導入する:
-新しいスタックレベルが生成されようとするとき,type, subtype, valueがそれぞれ
+上の「背景」で述べた問題を解決するために,\LuaTeX-jaでは次の手法を用いる:
+スタックレベルが増加するするとき,type, subtype, valueがそれぞれ
 44~(\textit{user\_defined}), \textit{stack\_marker},そして現在のグループレベルであるwhatsitノード
 を現在のリストに付け加える(このノードを\textit{stack\_flag}とする).
-これにより,ある水平ボックスの中で代入がなされたかどうかを知ることが可能
-となる.スタックレベルを$s$,その水平ボックスグループの直後の\TeX のグループレベルを
+これにより,あるhboxの中で代入がなされたかどうかを知ることが可能
+となる.スタックレベルを$s$,そのhbox groupの直後の\TeX のグループレベルを
 $t$とすると:
 %</ja>
 \begin{itemize}
 %<*en>
-\item If there is no \textit{stack\_flag} node in the list of the hbox, then
+\item If there is no \textit{stack\_flag} node in the list of the contents of the hbox, then
       no assignment was occurred inside the hbox. Hence values of
       parameters at the end of the hbox are stored in the stack
       level~$s$.
 %</en>
 %<*ja>
-\item もしその水平ボックスのリストの中に\textit{stack\_flag}ノードがなければ,
-  水平ボックスの中では代入は起こらなかったということになる.
-  したがって,その水平ボックスの終わりにおけるパラメータの値はスタックレベル$s$に
+\item もしそのhboxの中身を表すリストの中に\textit{stack\_flag}ノードがなければ,
+  hboxの中では代入は起こらなかったということになる.
+  したがって,そのhboxの終わりにおけるパラメータの値はスタックレベル$s$に
   格納されている.
 %</ja>
 
@@ -5139,8 +5982,8 @@ $t$とすると:
 %</en>
 %<*ja>
 \item もし値が$t+1$の\textit{stack\_flag}ノードがあれば,その
-  水平ボックスグループの中で代入が起こったことになる.
-  したがって,水平ボックスの終わりにおけるパラメータの値はスタックレベル$s+1$に
+  hboxの中で代入が起こったことになる.
+  したがって,hboxの終わりにおけるパラメータの値はスタックレベル$s+1$に
   格納されている.
 %</ja>
 
@@ -5154,7 +5997,7 @@ $t$とすると:
 %<*ja>
 \item もし\textit{stack\_flag}ノードがあるがそれらの値が全て$t+1$より大きい
   場合,そのボックスの中で代入が起こったが,それは「より内部の」グループで
-  起こったということになる.したがって,水平ボックスの終わりでのパラメータの
+  起こったということになる.したがって,hboxの終わりでのパラメータの
   値はスタックレベル$s$に格納されている.
 %</ja>
 \end{itemize}
@@ -5173,20 +6016,65 @@ To solve this problem, we use another trick: the assignment
 用いることで解決している.
 %</ja>
 
+%<*en>
+\subsection{Lua Functions of the Stack System}
+In this subsection, we will see how a user use \LuaTeX-ja's stack system to
+store some data which obeys the grouping of \TeX.
+%</en>
 %<*ja>
-\subsection{スタックシステムの使用法}
-未完
+\subsection{スタックシステムで使用される関数}
+本節では,ユーザが\LuaTeX-jaのスタックシステムを使用して,
+\TeX のグルーピングに従うような
+独自のデータを取り扱う方法を述べる.
 %</ja>
 
+%<*en>
+The following function can be used to store data into a stack:
+\begin{verbatim}
+luatexja.stack.set_stack_table(index, <any> data)
+\end{verbatim}
+Any values which except \texttt{nil}~and~NaN are usable as \textit{index}. 
+However, a user should use only negative integers or strings as \textit{index}, 
+since natural numbers are used by \LuaTeX-ja itself.
+Also, whether \textit{data} is stored locally or globally 
+is determined by \texttt{luatexja.isglobal}
+(stored globally if and only if \texttt{luatexja.isglobal == 'global'}).
+%</en>
 %<*ja>
-\subsection{パラメータの拡張}
-ここでは,\Pkg{luatexja-adjust}で行なっているように,
-\verb+\ltjsetparameter+,~\verb+\ltjgetparameter+に指定可能なパラメータに追加する方法
-を述べる.
+スタックに値を設定するには,以下のLua関数を呼びだせば良い:
+\begin{verbatim}
+luatexja.stack.set_stack_table(<any> index, <any> data)
+\end{verbatim}
+直感的には,スタックテーブル中のインデックス\textit{index}の値を\textit{data}にする,という意味である.
+\textit{index}の値としては \texttt{nil} とNaN以外の任意の値を使えるが,
+自然数は\LuaTeX-jaが使用する(将来の拡張用も含む)ので,
+ユーザが使用する場合は負の整数値か文字列の値にすることが望ましい.
+また,ローカルに設定されるかグローバルに設定されるかは,\texttt{luatexja.isglobal} の値に依存する
+(グローバルに設定されるのは,\texttt{luatexja.isglobal == 'global'} であるちょうどその時).
+%</ja>
 
-\paragraph{パラメータの設定}
-\verb+\ltjsetparameter+ と,\verb+\ltjglobalsetparameter+ の定義は
+%<*en>
+Stored data can be obtained as the return value of
+\begin{verbatim}
+luatexja.stack.get_stack_table(index, <any> default, <number> level)
+\end{verbatim}
+where \textit{level} is the stack level, which is usually the value of \verb+\ltj@@stack+, 
+and \textit{default} is the default value which will be returned if no values are stored 
+in the stack table whose level is \textit{level}.
+%</en>
+%<*ja>
+スタックの値は,
 \begin{verbatim}
+luatexja.stack.get_stack_table(<any> index, <any> default, <number> level)
+\end{verbatim}
+の戻り値で取得できる.\textit{level}はスタックレベルであり,
+通常は \verb+\ltj@@stack+ の値を指定することになるだろう.
+\textit{default}はレベル\textit{level}のスタックに値が設定されていなかった場合に
+返すデフォルト値である.
+%</ja>
+
+\begin{figure}[tb]
+\begin{lstlisting}[numbers=left, firstnumber=380]
 \protected\def\ltj@setpar@global{%
   \relax\ifnum\globaldefs>0\directlua{luatexja.isglobal='global'}%
     \else\directlua{luatexja.isglobal=''}\fi
@@ -5197,17 +6085,64 @@ To solve this problem, we use another trick: the assignment
   \relax\ifnum\globaldefs<0\directlua{luatexja.isglobal=''}%
     \else\directlua{luatexja.isglobal='global'}\fi%
   \setkeys[ltj]{japaram}{#1}\ignorespaces}
+\end{lstlisting} 
+%<ja>\caption{パラメータ設定命令の定義}
+%<en>\caption{Definiton of parameter setting commands}
+\label{fig:setpar-def}
+\end{figure}
+
+%<*en>
+\subsection{Extending Parameters}
+Keys for \verb+\ltjsetparameter+~and~\verb+\ltjgetparameter+ can be extended, 
+as in \Pkg{luatexja-adjust}.
+%</en>
+%<*ja>
+\subsection{パラメータの拡張}
+ここでは,\Pkg{luatexja-adjust}で行なっているように,
+\verb+\ltjsetparameter+,~\verb+\ltjgetparameter+に指定可能なキーを追加する方法
+を述べる.
+%</ja>
+
+%<*en>
+\paragraph{Setting parameters}
+Figure~\ref{fig:setpar-def} shows the ``most outer'' definition of 
+two commands, 
+\verb+\ltjsetparameter+ and \verb+\ltjglobalsetparameter+.
+Most important part is the last \verb+\setkeys+, 
+which is offered by the \Pkg{xkeyval} package.
+
+Hence, to add a key in \verb+\ltjsetparameter+, one only have to add a key
+whose prefix is \texttt{ltj} and whose family is \texttt{japaram}, as the following.
+\begin{verbatim}
+\define@key[ltj]{japaram}{...}{...}
 \end{verbatim}
+
+\verb+\ltjsetparameter+~and~\verb+\ltjglobalsetparameter+ automatically sets
+\texttt{luatexja.isglobal}. Its meaning is the following.
+\begin{align}
+ \texttt{luatexja.isglobal} = 
+\begin{cases}
+ \texttt{'global'}&\text{global}\\
+ \texttt{''}&\text{local}
+\end{cases}
+\end{align}
+This is determined not only by command name
+(\verb+\ltjsetparameter+~or~\verb+\ltjglobalsetparameter+), 
+but also by the value of \verb+\globaldefs+.
+%</en>
+%<*ja>
+\paragraph{パラメータの設定}
+\verb+\ltjsetparameter+ と,\verb+\ltjglobalsetparameter+ の定義は図\ref{fig:setpar-def}の
 のようになっている.
 本質的なのは最後の \verb+\setkeys+ で,これは\Pkg{xkeyval}パッケージの提供する命令である.
 
 このため,\verb+\ltjsetparameter+ に指定可能なパラメータを追加するには,
 <prefix>を \texttt{ltj},<family>を \texttt{japaram} としたキーを
 \begin{verbatim}
-\define@key[ltj]{japaram}{...}{...
+\define@key[ltj]{japaram}{...}{...}
 \end{verbatim}
 のように定義すれば良いだけである.
-なお,パラメータ指定がグローバルどうかを示す \texttt{luatexja.isglobal} が,
+なお,パラメータ指定がグローバルかローカルかどうかを示す \texttt{luatexja.isglobal} が,
 \begin{align}
  \texttt{luatexja.isglobal} = 
 \begin{cases}
@@ -5215,9 +6150,11 @@ To solve this problem, we use another trick: the assignment
  \texttt{''}&\text{パラメータ設定はローカル}
 \end{cases}
 \end{align}
-としてセットされる\footnote{命令が \texttt{\textbackslash ltjglobalsetparameter} かどうかだけでは
+として自動的にセットされる\footnote{命令が \texttt{\textbackslash ltjglobalsetparameter} かどうかだけでは
 なく,実行時の \texttt{\textbackslash globaldefs} の値にも依存して定まる.}.
+%</ja>
 
+%<*ja>
 \paragraph{パラメータの取得}
 一方,\verb+\ltjgetparameter+ はLuaスクリプトによって実装されている.
 値を取得するのに追加引数の要らないパラメータについては,\verb+luatexja.unary_pars+\ 
@@ -5247,7 +6184,6 @@ end
 \end{verbatim}
 を実行し,\TeX インターフェース側に
 「\verb+\ltjgetparameter{fuga}+ は追加引数が必要」ということを通知する必要がある.
-
 %</ja>
 
 %<en>\section{Linebreak after a Japanese Character}
 \begin{itemize}
 \item JFMグルーの挿入は,和文文字を表すトークンを元に水平リストに(文字を表す)<char\_node>を
 追加する過程で行われる.
-\item \Param{\hyperlink{fld:xks}{xkanjiskip}}の挿入は,水平ボックスへのパッケージングや行分割前に行われる.
+\item \Param{\hyperlink{fld:xks}{xkanjiskip}}の挿入は,hboxへのパッケージングや行分割前に行われる.
 \item \Param{\hyperlink{fld:kanjiskip}{kanjiskip}}はノードとしては挿入されない.パッケージングや行分割の計算時に
 「和文文字を表す2つの<char\_node>の間には\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}がある」ものとみなされる.
 \end{itemize}
-しかし,\LuaTeX-jaでは,水平ボックスへのパッケージングや行分割前に全ての
+しかし,\LuaTeX-jaでは,hboxへのパッケージングや行分割前に全ての
 \textbf{JAglue},即ちJFMグルー・\Param{\hyperlink{fld:xks}{xkanjiskip}}・\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}の
 3種類を一度に挿入することになっている.これは,\LuaTeX において欧文の合字・
 カーニング処理がノードベースになったことに対応する変更である.
@@ -5553,7 +6489,7 @@ with the \textit{id} of it:
 %</en>
 %<*ja>
 \item その \verb+\ltj@icflag+ の値が$[3,15)$に入るノードのリスト.
-  これらのノードはある既にパッケージングされた水平ボックスから \verb+\unhbox+ で
+  これらのノードはある既にパッケージングされたhboxから \verb+\unhbox+ で
   アンパックされたものである.
   その\textit{id}は\textit{id\_pbox}である.
 %</ja>
@@ -5621,7 +6557,7 @@ The \textit{id} is \textit{id\_hlist} if the node is an
 %<*ja>
 \item ボックス様のノード,つまり水平ボックス,垂直ボックス,罫線 (\verb+\vrule+),
   そして\textit{unset\_node}.
-  その\textit{id}は垂直に移動していない水平ボックスならば\textit{id\_hlist},
+  その\textit{id}は垂直に移動していないhboxならば\textit{id\_hlist},
   そうでなければ\textit{id\_box\_like}となる.
 %</ja>
 
@@ -5670,7 +6606,7 @@ $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$は,その和文文字
 \item[\textit{id\_math}] インライン数式.\\
 便宜的に,$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ともに
 「文字コード$-1$の欧文文字」とおく.
-\item[\textit{id\_hlist}] 縦方向にシフトされていない水平ボックス.\\
+\item[\textit{id\_hlist}] 縦方向にシフトされていないhbox.\\
 この場合,$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$はそれぞれ$p$の内容を表すリストの,
 先頭・末尾のノードである.
 \begin{itemize}
@@ -5678,11 +6614,11 @@ $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$は,その和文文字
 \begin{verbatim}
 \hbox{\hbox{abc}...\hbox{\lower1pt\hbox{xyz}}}
 \end{verbatim}
-のように,$p$の内容が別の水平ボックスで開始・終了している可能性も十分あり得る.そのような場合,
+のように,$p$の内容が別のhboxで開始・終了している可能性も十分あり得る.そのような場合,
 $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$の算出は,
-\emph{垂直方向にシフトされていない}水平ボックス
+\emph{垂直方向にシフトされていない}hbox
 場合だけ内部を再帰的に探索する.例えば上の例では,$\mathit{Np}.\mathit{head}$は文字「a」を表すノードであり,
-一方$\mathit{Np}.\mathit{tail}$は垂直方向にシフトされた水平ボックス
+一方$\mathit{Np}.\mathit{tail}$は垂直方向にシフトされたhbox
 \verb+\lower1pt\hbox{xyz}+ に対応するノードである.
 \item また,先頭にアクセント付きの文字がきたり,末尾にイタリック補正用のカーンが
 来ることもあり得る.この場合は,クラスタの定義のところにもあったように,それらは無視して算出を行う.
@@ -5712,11 +6648,11 @@ $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$の算出は,
 \textit{id}が\textit{id\_jglyph}であるか,\\
 \textit{id}が\textit{id\_pbox}であって$\mathit{Np}.\mathit{head}$が\textbf{JAchar}であるとき.
 
-\item[和文B] リスト中の水平ボックスの中身の先頭として出現した和文文字.和文Aとの違いは,これの前に
+\item[和文B] リスト中のhboxの中身の先頭として出現した和文文字.和文Aとの違いは,これの前に
 JFMグルーの挿入が行われない(\Param{\hyperlink{fld:xks}{xkanjiskip}},~\Param{\hyperlink{fld:kanjiskip}{kanjiskip}}は入り得る)ことである.\\
 \textit{id}が\textit{id\_hlist}か\textit{id\_disc}であって$\mathit{Np}.\mathit{head}$が\textbf{JAchar}であるとき.
 
-\item[欧文] リスト中に直接/水平ボックスの中身として出現している欧文文字.次の3つの場合が該当:
+\item[欧文] リスト中に直接/hboxの中身として出現している欧文文字.次の3つの場合が該当:
 \begin{itemize}
 \item \textit{id}が\textit{id\_glyph}である.
 \item \textit{id}が\textit{id\_math}である.
@@ -5730,22 +6666,22 @@ JFMグルーの挿入が行われない(\Param{\hyperlink{fld:xks}{xkanjiskip}
 
 \end{description}
 
-\subsection{段落/水平ボックスの先頭や末尾}
+\subsection{段落/hboxの先頭や末尾}
 \paragraph{先頭部の処理}
-まず,段落/水平ボックスの一番最初にあるクラスタ\textit{Np}を探索する.
-水平ボックスの場合は何の問題もないが,段落の場合では以下のノード達を事前に読み飛ばしておく:
+まず,段落/hboxの一番最初にあるクラスタ\textit{Np}を探索する.
+hboxの場合は何の問題もないが,段落の場合では以下のノード達を事前に読み飛ばしておく:
 \begin{itemize}
-\item \verb+\parindent+ 由来の水平ボックス($\mathit{subtype}=3$)
+\item \verb+\parindent+ 由来のhbox($\mathit{subtype}=3$)
 \item \textit{subtype}が44~(\textit{user\_defined})でないようなwhatsit
 \end{itemize}
-これは,\verb+\parindent+由来の水平ボックスがクラスタを構成しないようにするためである.
+これは,\verb+\parindent+由来のhboxがクラスタを構成しないようにするためである.
 
 次に,\textit{Np}の直前に空白$g$を必要なら挿入する:
 \begin{enumerate}
 \item この処理が働くような\textit{Np}は\textsf{和文A}である.
-\item 問題のリストが字下げありの段落(\verb+\parindent+ 由来の水平ボックスあり)の場合は,
+\item 問題のリストが字下げありの段落(\verb+\parindent+ 由来のhboxあり)の場合は,
 この空白$g$は「文字コード \texttt{'parbdd'} の文字」と\textit{Np}の間に入るグルー/カーンである.
-\item そうでないとき(\verb+noindent+ で開始された段落や水平ボックス)は,
+\item そうでないとき(\verb+noindent+ で開始された段落やhbox)は,
 $g$は「文字コード \texttt{'boxbdd'} の文字」と\textit{Np}の間に入るグルー/カーンである.
 \end{enumerate}
 ただし,もし$g$がglueであった場合,この挿入によって\textit{Np}による行分割が新たに可能になるべきではない.
@@ -5756,7 +6692,7 @@ $g$は「文字コード \texttt{'boxbdd'} の文字」と\textit{Np}の間に
 \end{itemize}
 
 \paragraph{末尾の処理}
-末尾の処理は,問題のリストが段落のものか水平ボックスのものかによって異なる.
+末尾の処理は,問題のリストが段落のものかhboxのものかによって異なる.
 後者の場合は容易い:最後のクラスタを\textit{Nq}とおくと,\textit{Nq}と「文字コード\ 
 \texttt{'boxbdd'} の文字」の間に入るグルー/カーンを,
 \textit{Nq}の直後に挿入するのみである.
@@ -5862,9 +6798,9 @@ x+y&\text{if\ }\Param{\hyperlink{fld:diffjfm}{diffrentjfm}}=\texttt{both};
 
 例えば,
 \begin{verbatim}
-\jfont\foo=psft:Ryumin-Light:jfm=ujis
-\jfont\bar=psft:GothicBBB-Medium:jfm=ujis
-\jfont\baz=psft:GothicBBB-Medium:jfm=ujis;jfmvar=piyo
+\jfont\foo=psft:Ryumin-Light:jfm=ujis;-kern
+\jfont\bar=psft:GothicBBB-Medium:jfm=ujis;-kern
+\jfont\baz=psft:GothicBBB-Medium:jfm=ujis;jfmvar=piyo;-kern
 \end{verbatim}
 という3フォントを考え,
 \[
@@ -5932,6 +6868,7 @@ $a$は禁則処理用に\textit{Nq}と\textit{Np}の間に加えられるべき
 %<en>\caption{Summary of JFM glues}
 %<ja>\caption{JFM グルーの概要}
 \label{tab-jfmglue}
+%<en>\medskip
 \begin{center}
 \small
 \begin{tabular}{c|cccccc}
@@ -5988,7 +6925,7 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K]
   between two clusters for \emph{kinsoku shori}.
 %</en>
 %<*ja>
-\item \LuaTeX-jaã\81¯2ã\81¤ã\81®ã\82¯ã\83©ã\82¹ã\82¿ã\81®é\96\93ã\81®ç¦\81å\89\87å\87¦ç\90\86ç\94¨ã\81®ã\83\9aã\83\8aã\83«ã\83\86ã\82£ã\82\92調ç¯\80するために「\textsf{P-normal~[PN]}」の方法を採用する.
+\item \LuaTeX-jaã\81¯2ã\81¤ã\81®ã\82¯ã\83©ã\82¹ã\82¿ã\81®é\96\93ã\81®ç¦\81å\89\87å\87¦ç\90\86ç\94¨ã\81®ã\83\9aã\83\8aã\83«ã\83\86ã\82£ã\82\92設å®\9aするために「\textsf{P-normal~[PN]}」の方法を採用する.
 %</ja>
 \end{enumerate}
 \end{quote}
@@ -6154,7 +7091,7 @@ $\mathit{Nq}.\mathit{tail}$は無意味なので,
 \end{itemize}
 
 \paragraph{和文Aと和文Bの違い}
-先に述べたように,\textsf{和文B}は水平ボックスの中身の先頭(or 末尾)として出現している
+先に述べたように,\textsf{和文B}はhboxの中身の先頭(or 末尾)として出現している
 和文文字である.リスト内に直接ノードとして現れている和文文字(\textsf{和文A})との違いは,
 \begin{itemize}
 \item \textsf{和文B}に対しては,JFMの文字クラス指定から定まる空白
@@ -6183,7 +7120,7 @@ $\mathit{Nq}.\mathit{tail}$は無意味なので,
 \begin{itemize}
 \item 1行目の\verb+\inhibitglue+は\textsf{Boundary-B~[\OB]}の処理のみを抑止するので,ピリオドと「A」の間には
 \Param{\hyperlink{fld:xks}{xkanjiskip}}(四分アキ)が入ることに注意.
-\item 2行目のピリオドと「A」の間においては,前者が\textsf{和文B}となる(水平ボックスの中身の末尾として登場しているから)ので,
+\item 2行目のピリオドと「A」の間においては,前者が\textsf{和文B}となる(hboxの中身の末尾として登場しているから)ので,
 そもそも\textsf{Boundary-B~[\OB]}の処理は行われない.よって,\Param{\hyperlink{fld:xks}{xkanjiskip}}が入ることとなる.
 \item 3行目では,ピリオドの属するクラスタは\textsf{和文A}である.これによって,
 ピリオドと「A」の間には\textsf{Boundary-B~[\OB]}由来の半角アキが入ることになる.
@@ -6257,7 +7194,7 @@ Consider the following input:
 例えば次のような入力を考えよう:
 %</ja>
 \begin{verbatim*}
-\begin{lstlisting}[escapechar=`\#]
+\begin{lstlisting}[escapechar=\#]
 #\ほげ xぴよ#
 \end{lstlisting}
 \end{verbatim*}
@@ -6288,7 +7225,7 @@ instead of ``\verb+\ほげ+''.
 しかし,\Pkg{lltjp-listings} が実際にロードされるのは \verb+\begin{document}+\ 
 のところであるので,プリアンブル内ではこれらの追加キーは使用できない.
 
-\texttt{ivsraw}は,ブール値の値をとるキーであり,標準ではfalseである.
+\texttt{vsraw}は,ブール値の値をとるキーであり,標準ではfalseである.
 \begin{itemize}
  \item trueの場合は,異体字セレクタは「直前の文字に続けて」出力される.
 もしもIVSサポート(\ref{ssec-ltjotf}節)が有効になっていた場合は,
@@ -6320,7 +7257,9 @@ instead of ``\verb+\ほげ+''.
 }}}
 \lstset{vscmd=\IVSB}
 \end{lstlisting}
-\end{itemize} 
+\end{itemize}
+既定の出力命令を復活させたい場合は\ \verb+vsraw=\ltjlistingsvsstdcmd+\ 
+とすれば良い.
 %</ja>
 
 %<en>\subsection{Class of Characters}
@@ -6580,7 +7519,7 @@ JFM中にある文字クラス$n$の定義の
 \end{enumerate}
 \begin{enumerate}
  \item 行末の和文文字を移動したことで$\textit{total}=0$となれば,
-調整の必要はなく,行が格納されている水平ボックス
+調整の必要はなく,行が格納されているhbox
 \texttt{glue\_set}, \texttt{glue\_sign}, \texttt{glue\_order}を再計算すればよい.
 以降,$\textit{total}\neq 0$と仮定する.
  \item \textit{total}が「\textbf{JAglue}以外のグルーの伸び量の合計」(以下,(A)の伸び量の
@@ -6589,7 +7528,7 @@ JFM中にある文字クラス$n$の定義の
 よって,以下の処理を行う:
 \begin{enumerate}
 \item 各\textbf{JAglue}の伸び量を0とする.
-\item 行が格納されている水平ボックス
+\item 行が格納されているhbox
 \texttt{glue\_set}, \texttt{glue\_sign}, \texttt{glue\_order}を再計算する.
 これによって,\textit{total}は\textbf{JAglue}以外のグルーによって負担される.
 \end{enumerate}
@@ -6610,7 +7549,7 @@ JFM中にある文字クラス$n$の定義の
 \begin{enumerate}
 \item (C)に属するグルーの伸び量を$p$倍する.
 \item (D)--(H)に属するグルーの伸び量を0とする.
-\item 行が格納されている水平ボックス
+\item 行が格納されているhbox
 \texttt{glue\_set}, \texttt{glue\_sign}, \texttt{glue\_order}を再計算する.
 これによって,\textit{total}は\textbf{JAglue}以外のグルーによって負担される.
 \end{enumerate}
@@ -6621,7 +7560,7 @@ JFM中にある文字クラス$n$の定義の
 %</ja>
 
 %<*ja>
-\section{IVS対応(未完)}
+\section{IVS対応}
 \verb+luatexja.otf.enable_ivs()+ を実行し,IVS対応を有効にした状態では,
 \verb+pre_linebreak_filter+ や \verb+hpack_filter+ コールバックには
 次の4つが順に実行される状態となっている:
@@ -6665,6 +7604,7 @@ OpenTypeフォントでもTrueTypeフォントでもIVS情報が格納されて
 %%% to_table を使わなくしたことで,メモリ使用量は減った
 IVS情報をキャッシュに保存することで2回目以降の実行時間を節約している.
 
+
 \section{複数フォントの「合成」(未完)}
 
 \section{\LuaTeX-jaにおけるキャッシュ}
@@ -6817,7 +7757,7 @@ are created or updated.
 \item[save\_cache\_luc(<filename>, <data>{[, <serialized\_data>]})]\ 
 
 Same as \texttt{save\_cache}, except that only the binary cache is updated. 
-The third argument <serialized data> is not usually given.
+The third argument <serialized\_data> is not usually given.
 But if this is given, it is treated as a string representation of <data>.
 
 \item[load\_cache(<filename>, <outdate>)]
@@ -6835,6 +7775,47 @@ Hence, the return value of \texttt{load\_cache} is non-nil,
 if and only if the updated cache is found.
 \end{list}
 %</en>
+%<*ja>
+\subsection{内部命令}
+\LuaTeX-jaにおけるキャッシュ管理は,\texttt{luatexja.base}~(\texttt{ltj-base.lua})に
+実装しており,以下の3関数が公開されている.
+ここで,<filename>は保存するキャッシュのファイル名を\emph{拡張子なしで}指定する.
+\begin{list}{}%
+{\def\makelabel#1{\ttfamily#1}}
+\item[save\_cache(<filename>, <data>)]
+nilでない<data>をキャッシュ<filename>に保存する.
+テキスト形式の<filename>\texttt{.lua}のみならず,
+そのバイナリ版も作成/更新される.
+
+\item[save\_cache\_luc(<filename>, <data>{[, <serialized\_data>]})]\ 
+
+\texttt{save\_cache}と同様だが,バイナリキャッシュのみが更新される.
+第3引数<serialized\_data>が与えられた場合,それを
+<data>の文字列化表現として使用する.
+そのため,<serialized\_data>は普通は指定しないことになるだろう.
+
+\item[load\_cache(<filename>, <outdate>)]
+キャッシュ<filename>を読み込む.
+<outdate>は1引数(キャッシュの中身)をとる関数であり,
+その戻り値は「キャッシュの更新が必要」かどうかを示すブール値でないといけない.
+
+\texttt{load\_cache}は,まずバイナリキャッシュ<filename>\texttt{.\{luc|lub\}}を
+読みこむ.もしその内容が「新しい」,つまり<outdate>の評価結果が \texttt{false} なら
+\texttt{load\_cache}はこのバイナリキャッシュの中身を返す.
+もしバイナリキャッシュが見つからなかったか,「古すぎる」ならばテキスト版
+            <filename>\texttt{.lua}を読み込み,その値を返す.
+
+以上より,\texttt{load\_cache}自体がnilでない値を返すのは,ちょうど「新しい」キャッシュが
+見つかった場合である.
+\end{list}
+%</ja>
+
+
+%<*ja>
+\section{縦組の実装}
+
+
+%</ja>
 
 \begin{thebibliography}{99}
   \addcontentsline{toc}{section}{\refname}
@@ -6855,10 +7836,14 @@ TUG 2013, October 2013.
 Requirements for Japanese Text Layout (W3C Working Group Note), 2011, 2012. \newblock
 \url{http://www.w3.org/TR/jlreq/}%
 %<ja> \\日本語訳の書籍版:W3C日本語組版タスクフォース(編),『W3C技術ノート 日本語組版処理の要件』,東京電機大学出版局,2012.
-\bibitem{min10} ä¹\99é\83¨å\8e³å·±ï¼\8cmin10フォントについて.\\\null\hfill
+\bibitem{min10} ä¹\99é\83¨å\8e³å·±ï¼\8emin10フォントについて.\\\null\hfill
 \url{http://argent.shinshu-u.ac.jp/~otobe/tex/files/min10.pdf}
-\bibitem{x4051} 日本工業規格(Japanese Industrial Standard), JIS~X~4051,
+\bibitem{x4051} 日本工業規格(Japanese Industrial Standard). JIS~X~4051,
 日本語文書の組版方法(Formatting rules for Japanese documents), 1993, 1995, 2004.
+\bibitem{ptexdoc} 濱野尚人,田村明史,倉沢良一.\TeX の出版への応用—縦組み機能の組み込み—.
+\\\null\hfill\texttt{.../texmf-dist/doc/ptex/base/ptexdoc.pdf}
+\bibitem{ptextug} Hisato Hamano. \newblock 
+\textit{Vertical Typesetting with \TeX}, TUGBoat~\textbf{11}(3), 346--352, 1990.
 \end{thebibliography}
 
 \newpage