+
+%<*ja>
+\section{\LuaTeX-jaにおける \texttt{\textbackslash catcode}}
+\subsection{予備知識:\pTeX と\upTeX における \texttt{\textbackslash kcatcode}}
+\pTeX,\upTeX においては,和文文字が制御綴内で利用できるかどうか
+は \verb+\kcatcode+ の値によって決定されるのであった.
+詳細は表\ref{table-kcat}を参照されたい.
+%</ja>
+%<*en>
+\section{\texttt{\textbackslash catcode} in \LuaTeX-ja}
+\subsection{Preliminaries: \texttt{\textbackslash kcatcode} in \pTeX\ and \upTeX}
+In \pTeX~and~\upTeX, the value of \verb+\kcatcode+ determines
+whether a Japanese character can be used in a control word.
+For the detail, see Table~\ref{table-kcat}.
+%</en>
+
+\begin{table}[t]
+\small
+\caption{\texttt{\textbackslash kcatcode} in \upTeX}
+\label{table-kcat}
+%<en>\medskip
+
+\noindent\hfill
+\begin{tabular}{ccccc}
+\toprule
+\bfseries \verb+\kcatcode+&
+%<*en>
+\bfseries meaning&
+\bfseries control word&
+\bfseries widow penalty\hbox{}$^*$&
+\bfseries linebreak\\
+%</en>
+%<*ja>
+\bfseries 意図&
+\bfseries 制御綴中に使用&
+\bfseries 文字ウィドウ処理\hbox{}$^*$&
+\bfseries 直後での改行\\
+%</ja>
+\midrule
+15&non-cjk&\multicolumn{3}{c}{(treated as usual \LaTeX)}\\
+16&kanji&Y&Y&ignored\\
+17&kana&Y&Y&ignored\\
+18&other&N&N&ignored\\
+19&hangul&Y&Y&space\\
+\bottomrule
+\end{tabular}\hfill\null
+
+\medskip
+
+%<*ja>
+文字ウィドウ処理\hbox{}$^*$: 「漢字が一文字だけ次の行に行くのを防ぐ」\
+\texttt{\textbackslash jcharwidowpenalty} が,
+その文字の直前に挿入されうるか否か,を示す.
+%</ja>
+\end{table}
+
+%<*en>
+\verb+\kcatcode+ can be set by a row of JIS~X~0208 in \pTeX,
+and generally by a Unicode block\footnote{%
+ \upTeX\ divides \texttt{U+FF00}--\texttt{U+FFEF} (Halfwidth and Fullwidth Forms)
+ into three subblocks, and \texttt{\textbackslash kcatcode} can be set by a subblock.
+}
+in \upTeX. So characters which can be used in a control word
+slightly differ between \pTeX~and~\upTeX.
+%</en>
+%<*ja>
+\pTeX では \verb+\kcatcode+ はJIS~X~0208の区単位,
+\upTeX では概ねUnicodeブロック単位\footnote{%
+ \texttt{U+FF00}--\texttt{U+FFEF} (Halfwidth and Fullwidth Forms)は
+ 「全角英数字」「半角カナ」「その他」と3つに分割されており,
+ それぞれ別々に \texttt{\textbackslash kcatcode} が指定できるようになっている.
+}で設定可能になっている.そのため,\pTeX と\upTeX の初期状態では
+制御綴内で使用可能な文字が微妙に異なっている.
+%</ja>
+
+%<*en>
+\subsection{Case of \LuaTeX-ja}
+The role of \verb+\kcatcode+ in \pTeX~and~\upTeX\ caan be
+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}}
+is controlled by using the character range, see Subsection~\ref{ssec-setrange}.
+ \item
+\emph{Whether the character can be used in a control word}
+is controlled by setting \verb+\catcode+ to 11~(enabled) or 12~(disabled), as usual.
+ \item
+\emph{Whether \Param{jcharwidowpenalty} can be inserted before the character}
+is controlled by the lowermost bit of the \Param{kcatcode} parameter.
+ \item
+\emph{Ignoring linebreak after a \textbf{JAchar}} is always ignored.
+\end{itemize}
+%</en>
+%<*ja>
+\subsection{\LuaTeX-jaの場合}
+\LuaTeX-jaでは,従来の\pTeX・\upTeX における \verb+\kcatcode+ の役割を
+分割している:
+\begin{description}
+ \item[欧文/和文の区別 (\upTeX)]
+\verb+\ltjdefcharrange+ と\textsf{jacharrange}パラメータ(\ref{ssec-setrange}節)
+ \item[制御綴中に使用可か]
+\LuaTeX 自身の \verb+\catcode+ でよい
+ \item[\Param{jcharwidowpenalty}が挿入可か]
+\Param{kcatcode}パラメータの最下位ビット
+ \item[直後の改行の無視]
+日本語しか想定していないので\textbf{JAchar}については一律有効
+\end{description}
+%</ja>
+
+%<*en>
+Default setting of \verb+\catcode+ of \LuaTeX\ can be found
+in \texttt{luatex-unicode-letters.tex},
+which is based on \texttt{unicode-letters.tex} (for \XeTeX).
+However, the default setting of \verb+\catcode+ differs
+between \XeTeX\ and \LuaTeX, by the following reasons:
+\begin{itemize}
+ \item \texttt{luatex-unicode-letters.tex} is based on old \texttt{unicode-letters.tex}.
+ \item The latter half of \texttt{unicode-letters.tex} sets
+\verb+\catcode+ of Kanji and kana characters to 11,
+via setting \verb+\XeTeXcharclass+.
+
+However, this latter half is simply omitted in
+\texttt{luatex-unicode-letters.tex}, hence
+\verb+\catcode+ of Kanji and kana characters remains 12 in \LuaTeX.
+\end{itemize}
+In other words, Kanji nor kana characters cannot be used in
+a control word, in the default setting of \LuaTeX.
+
+This would be inconvenient for \pTeX~users to shifting to \LuaTeX-ja,
+since several control words containing Kanji, such as \verb+\西暦+,
+are used in \pTeX.
+Hence, \LuaTeX-ja have a counterpart of \texttt{unicode-letters.tex}
+for \LuaTeX, \emph{to match the \texttt{\textbackslash catcode} setting with that of \XeTeX.}
+%</en>
+%<*ja>
+ネイティブにUnicode全部の文字を扱える\XeTeX や\LuaTeX では,
+文字が制御綴内で使用できるかは通常の欧文文字と同じく \verb+\catcode+
+で指定することとなる.\XeTeX における \verb+\catcode+ の初期設定は\
+\texttt{unicode-letters.tex} 中に記述されており,\LuaTeX ではそれを
+元にした \texttt{luatex-unicode-letters.tex} を用いている.
+
+だが,\XeTeX における \verb+\catcode+ の初期設定と
+\LuaTeX におけるそれは一致していない:
+\begin{itemize}
+ \item \texttt{luatex-unicode-letters.tex} の元になった\
+\texttt{unicode-letters.tex} が古い
+ \item \texttt{unicode-letters.tex} の後半部では
+\verb+\XeTeXcharclass+ の設定を行なっており,
+それによって漢字や仮名の \verb+\catcode+ が11に設定されている.
+
+しかし,\texttt{luatex-unicode-letters.tex} ではこの「後半部」が
+まるごと省略されており,漢字や仮名の \verb+\catcode+ は12のまま.
+\end{itemize}
+言い換えると,\LuaTeX の初期状態では漢字や仮名を制御綴内に
+使用することはできない.
+
+これでは \pTeX で使用できた \verb+\西暦+ などが使えないこととなり,
+\LuaTeX-jaへの移行で手間が生じる.そのため,\LuaTeX-jaでは
+\texttt{unicode-letters.tex} の後半部にあたる内容を自前でパッチし,
+結果として\textbf{\XeTeX における初期設定と同じになるようにしている.}
+%</ja>
+
+\begin{table}
+ \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 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\\
+\D 30FB&1&6&N&Y&N\\
+\D 309B&1&11&N&Y&N\\
+\D 309C&1&12&N&Y&N\\
+\D FF40&1&14&N&N&Y\\
+\D FF3E&1&16&N&N&Y\\
+\D FFE3&1&17&N&N&Y\\
+\D FF3F&1&18&N&N&Y\\
+\D 30FD&1&19&N&Y&Y\\
+\D 30FE&1&20&N&Y&Y\\
+\D 309D&1&21&N&Y&Y\\
+\D 309E&1&22&N&Y&Y\\
+\D 3003&1&23&N&N&Y\\
+\D 4EDD&1&24&N&Y&Y\\
+\D 3005&1&25&N&N&Y\\
+\D 3006&1&26&N&N&Y\\
+\D 3007&1&27&N&N&Y\\
+\D 30FC&1&28&N&Y&Y\\
+\bottomrule
+\end{tabular}\qquad
+\begin{tabular}{cccccc}
+\toprule
+%<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\\
+\D FF3C&1&32&N&N&Y\\
+\D FF5C&1&35&N&N&Y\\
+\D FF0B&1&60&N&N&Y\\
+\D FF1D&1&65&N&N&Y\\
+\D FF1C&1&67&N&N&Y\\
+\D FF1E&1&68&N&N&Y\\
+\D FF03&1&84&N&N&Y\\
+\D FF06&1&85&N&N&Y\\
+\D FF0A&1&86&N&N&Y\\
+\D FF20&1&87&N&N&Y\\
+\D 3012&2&9&N&N&Y\\
+\D 3013&2&14&N&N&Y\\
+\D FFE2&2&44&N&N&Y\\
+\D 212B&2&82&N&N&Y\\
+%<en>\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}Greek letters (row 6)}&Y&N&Y\\
+%<en>\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}Cyrillic letters (row 7)}&N&N&Y\\
+%<ja>\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}ギリシャ文字(6区)}&Y&N&Y\\
+%<ja>\multicolumn{3}{c}{$\vphantom{\D 3000}$\hbox{}キリル文字(7区)}&N&N&Y\\
+$\vphantom{\D 3000}$\\
+\bottomrule
+\end{tabular}\hss}\par
+\end{table}
+
+%<*en>
+\subsection{Non-kanji Characters in a Control Word}
+Because the engine differ, so non-kanji JIS~X~0208 characters
+which can be used in a control word differ in \pTeX, in \upTeX,~and~in \LuaTeX-ja.
+Table~\ref{table-kcat-diff} shows the difference.
+Except for four characters ``・'',~``゛'', ``゜'',~``゠'',
+\LuaTeX-ja admits more characters in a control word than \upTeX.
+\emph{Note that the ideographic space~\texttt{U+3000} can be used
+in a control word in \LuaTeX-ja.}
+
+Difference becomes larger, if we consider
+non-kanji JIS~X~0213 characters.
+For the detail, see \url{https://github.com/h-kitagawa/kct}.
+%</en>
+%<*ja>
+\subsection{制御綴中に使用出来るJIS非漢字の違い}
+
+エンジンが異なるので,\pTeX, \upTeX, \LuaTeX-ja
+において制御綴中に使用可能なJIS~X~0208の文字は異なる.
+異なっているところだけを載せると,表\ref{table-kcat-diff}のようになる.
+「・」「゛」「゜」「゠」を除けば,\LuaTeX-jaでは\upTeX より多くの文字が
+制御綴に使用可能になっている.
+\textbf{特に重要なのは,全角空白(\texttt{U+3000})が
+\LuaTeX-jaでは制御綴中に使用可能であることである.}
+
+JIS~X~0213の範囲に広げると,差異はさらに大きくなる.
+詳細については例えば \url{https://github.com/h-kitagawa/kct} 中の\
+\texttt{kct-uni-out.pdf} などを参照すること.
+%</ja>
+
+