X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=d9ecfda5eeffa93d91c70c98de3d2b01565872b2;hb=466aee095c5b7d4e8174295dc2cfd5697a87a884;hp=196df72c70bad9bd65d4ac31d07b27eeeaa32be3;hpb=5c9ea8c9be123d8242a69e5ee94ee3ca1104f056;p=luatex-ja%2Fluatexja.git
diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx
index 196df72..d9ecfda 100644
--- a/doc/luatexja.dtx
+++ b/doc/luatexja.dtx
@@ -1,9 +1,9 @@
%<*!showexpl>
%#! lualatex -shell-escape
-% \documentclass[a4paper,titlepage]{article}
-% \documentclass[a4paper,titlepage]{ltjsarticle}
-% \documentclass[a4paper,titlepage]{ltjsarticle}
+%\documentclass[a4paper,titlepage]{article}
+%\documentclass[a4paper,titlepage]{ltjsarticle}
+%\documentclass[a4paper,titlepage]{ltjsarticle}
%%%%%%%%
\makeatletter
@@ -31,7 +31,7 @@
%
%<*ja>
\usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry}
-\usepackage{luatexja-adjust}
+\usepackage{luatexja-adjust}%\ltjdisableadjust
\advance\leftmargini-1\zw\advance\leftmarginii-1\zw
%
%<*zh>
@@ -3378,9 +3378,9 @@ Furthermore, the glyph is shifted according to values of fields
\label{fig-pos}
\end{figure}
-\item[kern={\{[$j$]=, ...\}}]
+\item[kern={\{[$j$]=, [$j'$]=\{, []\}...\}}]
-\item[glue={\{[$j$]=\{, , , []\}, ...\}}]
+\item[glue={\{[$j$]=\{, , , [], []\}, ...\}}]
%<*ja>
æåã¯ã©ã¹$i$ã®æåã¨$j$ã®æåã®éã«æ¿å
¥ãããkernãglueã®éãæå®ããï¼
@@ -3390,6 +3390,25 @@ Furthermore, the glyph is shifted according to values of fields
度ã$-2$ãã$+2$ã®éã®æ´æ°ã§æå®ããï¼ã®çç¥æã®å¤
ã¯0ã§ããï¼ç¯å²å¤ã®å¤ãæå®ãããã¨ãã®åä½ã¯æªå®ç¾©ã§ããï¼ï¼
+ãçç¥å¯è½ãã£ã¼ã«ãã§ããï¼$-1$ãã$+1$ã®å®æ°å¤ãã¨ãï¼çç¥æã®å¤ã¯0ã§ããï¼
+\begin{itemize}
+\item $-1$ã¯ãã®ã°ã«ã¼ããåã®æåãç±æ¥ã§ãããã¨ã示ãï¼
+\item $+1$ã¯ãã®ã°ã«ã¼ããå¾ã®æåãç±æ¥ã§ãããã¨ã示ãï¼
+\item ãã以å¤ã®å¤ã¯ï¼ãåã®æåãç±æ¥ã®ã°ã«ã¼ã¨ãå¾ã®æåãç±æ¥ã®
+ã°ã«ã¼ãæ··åããã¦ãããã¨ã示ãï¼
+\end{itemize}
+ãªãï¼ãã®ãã£ã¼ã«ãã®å¤ã¯\Param{differentjfm}ã®å¤ã\texttt{pleft},~\texttt{pright},~\texttt{paverage}ã®å¤ã®ã¨ãã®ã¿å®éã«ç¨ããããï¼
+
+ä¾ãã°ï¼\cite{x4051}ã§ã¯ï¼å¥ç¹ã¨ä¸ç¹ã®éã«ã¯ï¼
+å¥ç¹ç±æ¥ã®äºå空ãã¨ä¸ç¹ç±æ¥ã®åå空ããæ¿å
¥ããããï¼ãã®å ´åã«ã¯
+\begin{itemize}
+\item ã«ã¯$0.5+0.25=0.75$ãæå®ããï¼
+\item ã«ã¯æ¬¡ã®å¤ãæå®ããï¼
+\[
+ -1\cdot \frac{0.5}{0.5+0.25} + 1 \cdot \frac{0.25}{0.5+0.25} = -\frac13
+\]
+\end{itemize}
+
%
\item[end\_stretch=]
@@ -3487,10 +3506,10 @@ The following is the list of `imaginary characters':
%%%è¡ã®çµç«¯ã表ãï¼
%%%è¡å°¾ç»æå符ã
-\item['diffmet']
-%Used at a boundary between two \textbf{JAchar}s whose JFM or size is different.
-%JFMããµã¤ãºãç°ãªã2ã¤ã®\textbf{JAchar}ã®éã®å¢çã¨ãã¦ç¨ããããï¼
-%ç¨äºä¸¤ä¸ªä¸å大å°æä¸åJFMç两个\textbf{JAchar}é´è¾¹çã
+%%\item['diffmet']
+%%Used at a boundary between two \textbf{JAchar}s whose JFM or size is different.
+%%JFMããµã¤ãºãç°ãªã2ã¤ã®\textbf{JAchar}ã®éã®å¢çã¨ãã¦ç¨ããããï¼
+%%ç¨äºä¸¤ä¸ªä¸å大å°æä¸åJFMç两个\textbf{JAchar}é´è¾¹çã
\item['boxbdd']
%The beginning/ending of a horizontal box, and the beginning of a noindented paragraph.
@@ -4157,6 +4176,9 @@ JFMï¼ãããã¯ãµã¤ãºï¼ãç°ãªã2ã¤ã®\textbf{JAchar}ã®éã«ã°ã«
\item[\texttt{both}]
\item[\texttt{large}]
\item[\texttt{small}]
+\item[\texttt{pleft}]
+\item[\texttt{pright}]
+\item[\texttt{paverage}]
\end{description}
\item[\Param{jacharrange}\,=$^\ast$]
@@ -5669,19 +5691,54 @@ $g$ã¯ãæåã³ã¼ã\texttt{'boxbdd'}ã®æåãã¨\textit{Np}ã®éã«å
¥
\item ãã両ã¯ã©ã¹ã¿ã®éã§\verb+\inhibitglue+ãå®è¡ããã¦ããå ´åï¼è¨¼ã¨ãã¦whatsitãã¼ããèªåæ¿å
¥ãããï¼ï¼
代ããã«\Param{kanjiskip}ãæ¿å
¥ããããã¨ã¨ãªãï¼æ¬¡ã¸ï¼
\item \textit{Nq}ã¨\textit{Np}ãåãJFMã»åã\texttt{jfmvar}ãã¼ã»åããµã¤ãºã®åæãã©ã³ãã§ãã£ããªãã°ï¼
- å
±éã«ä½¿ã£ã¦ããJFMå
ã§æ¿å
¥ããã空ç½ï¼ã°ã«ã¼ãã«ã¼ã³ï¼ã決ã¾ã£ã¦ããã調ã¹ãï¼
+ å
±éã«ä½¿ã£ã¦ããJFMå
ã§æ¿å
¥ããã空ç½ï¼ã°ã«ã¼ãã«ã¼ã³ï¼ã決ã¾ã£ã¦ããã調ã¹ï¼æ±ºã¾ã£ã¦ããã°ãããæ¡ç¨ï¼
\item 1.ã§ã2.ã§ããªãå ´åã¯ï¼\textit{Nq}ã¨\textit{Np}ãéãJFM/\texttt{jfmvar}/ãµã¤ãºã§ããï¼
ãã®å ´åï¼ã¾ã
\[
-\vcenter{\halign{\hfil$#:={}$&(\inhibitglue#\inhibitglue)\cr
-gb&\textit{Nq}ã¨ãæåã³ã¼ãã{\tt'diffmet'}ã®æåãã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³\cr
-ga&ãæåã³ã¼ãã{\tt'diffmet'}ã®æåãã¨\textit{Np}ã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³\cr
+\vcenter{\halign{\hfil$#:={}$&\inhibitglue#\inhibitglue\cr
+gb&(\textit{Nq}ã¨ã使ç¨ãã©ã³ãã\textit{Nq}ã®ããã¨åãã§ï¼\hfil\cr
+\omit&\quad æåã³ã¼ãã\textit{Np}ã®ããã®æåãã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³)\hfil\cr
+ga&(\inhibitglue ã使ç¨ãã©ã³ãã\textit{Np}ã®ããã¨åãã§ï¼\hfil\cr
+\omit&\quad æåã³ã¼ãã\textit{Nq}ã®ããã®æåãã¨\textit{Np}ã¨ã®éã«å
¥ãã°ã«ã¼ï¼ã«ã¼ã³)\hfil\cr
}}
\]
-ã¨ãã¦ï¼å·¦å´ç±æ¥ã»å³å´ç±æ¥ã®ç©ºç½ï¼ã°ã«ã¼ï¼ã«ã¼ã³ï¼ãï¼ããããã®JFMããï¼æ±ããï¼
-$\mathit{ga}$ã¨$\mathit{gb}$ã®ã©ã¡ããçæ¹ãæªå®ç¾©ã§ãããªãã°ï¼å®ç¾©ããã¦ããå´ã®å¤ããã®ã¾ã¾æ¡ç¨ããï¼
-ãã$\mathit{ga}$ã¨$\mathit{gb}$ã両æ¹æ±ºã¾ã£ã¦ãããªãã°ï¼ä¸¡è
ã®å¤ãå¹³å\footnote{\Param{differentjfm}ãã©ã¡ã¿ã®
-å¤ã«ãã£ã¦ï¼ã大ããæ¹ããå°ããæ¹ããåè¨ãã«å¤ãããã¨ãã§ããï¼}ããå¤ãæ¡ç¨ããï¼
+ã¨ãã¦ï¼åå´ã®æåã®JFMã使ã£ãæã®ç©ºç½ï¼ã°ã«ã¼ï¼ã«ã¼ã³ï¼ã¨ï¼å¾å´ã®æåã®JFMã使ã£ãæã®ãããæ±ããï¼
+
+$\mathit{gb}$,~$\mathit{ga}$ããããã«å¯¾ããã®å¤ã$d_b$,~$d_a$ã¨ããï¼
+\begin{itemize}
+\item
+$\mathit{ga}$ã¨$\mathit{gb}$ã®ä¸¡æ¹ãæªå®ç¾©ã§ãããªãã°ï¼JFMç±æ¥ã®ã°ã«ã¼ã¯æ¿å
¥ãããï¼\Param{kanjiskip}ãæ¡ç¨ãããã¨ã¨ãªãï¼ã©ã¡ããçæ¹ã®ã¿ãæªå®ç¾©ã§ãããªãã°ï¼æ¬¡ã®ã¹ãããã§ãã®æªå®ç¾©ã®æ¹ã¯é·ã0ã®kernã§ï¼ã®å¤ã¯0ã§ãããã®ããã«æ±ãããï¼
+\item
+\Param{differentjfm}ã®å¤ã\texttt{pleft}, \texttt{pright}, \texttt{paverage}ã®ã¨ãï¼
+ã®æå®ã«å¾ã£ã¦æ¯ä¾é
åãè¡ãï¼
+JFMç±æ¥ã®ã°ã«ã¼ï¼ã«ã¼ã³ã¯ä»¥ä¸ã®å¤ã¨ãªãï¼
+\[
+ f\left(\frac{1-d_b}2\textit{gb} + \frac{1+d_b}2\textit{ga},
+\frac{1-d_a}2\textit{gb} + \frac{1+d_a}2\textit{ga}\right)
+\]
+ããã§ï¼$f(x,y)$ã¯
+\[
+ f(x,y)=\begin{cases}
+x&\text{if\ }\Param{differentjfm}=\texttt{pleft};\\
+y&\text{if\ }\Param{differentjfm}=\texttt{pright};\\
+(x+y)/2&\text{if\ }\Param{differentjfm}=\texttt{paverage};
+\end{cases}.
+\]
+\item
+\Param{differentmet}ããã以å¤ã®å¤ã®æã¯ï¼ã®å¤ã¯ç¡è¦ããï¼JFMç±æ¥ã®ã°ã«ã¼ï¼ã«ã¼ã³ã¯ä»¥ä¸ã®å¤ã¨ãªãï¼
+\[
+ f(\textit{gb},\textit{ga})
+\]
+ããã§ï¼$f(x,y)$ã¯
+\[
+ f(x,y)=\begin{cases}
+\min(x,y)&\text{if\ }\Param{differentjfm}=\texttt{small};\\
+\max(x,y)&\text{if\ }\Param{differentjfm}=\texttt{large};\\
+(x+y)/2&\text{if\ }\Param{differentjfm}=\texttt{average};\\
+x+y&\text{if\ }\Param{differentjfm}=\texttt{both};
+\end{cases}.
+\]
+\end{itemize}
\end{enumerate}
ä¾ãã°ï¼
@@ -6020,43 +6077,122 @@ $\mathit{Nq}.\mathit{tail}$ã¯ç¡æå³ãªã®ã§ï¼
\section{psft}
+%\section{Patch for the \Pkg{listings} package}
+%\section{\Pkg{listings} ããã±ã¼ã¸ã¸ã®å¯¾å¿}
+
+%<*en>
+It is well-known that the \Pkg{listings} package outputs weird results
+for Japanese input.
+The \Pkg{listings} package makes most of letters active and assigns
+output command for each letter \cite{listings}.
+But Japanese characters are not included in these activated letters.
+For \pTeX{} series, there is no method to make Japanese characters active;
+a patch \Pkg{jlisting.sty} \cite{jlisting} resolves the problem forcibly.
+%
%<*ja>
-\section{\Pkg{listings} ããã±ã¼ã¸ã¸ã®å¯¾å¿}
\Pkg{listings} ããã±ã¼ã¸ãï¼ãã®ã¾ã¾ã§ã¯æ¥æ¬èªãã¾ã¨ãã«åºåã§ããªããã¨
-ã¯ããç¥ããã¦ããï¼ãã¡ãã¨æ´å½¢ãã¦åºåããããã«ï¼\Pkg{listings}ããã±ã¼
+ã¯ããç¥ããã¦ããï¼ãã¡ãã¨æ´å½¢ãã¦åºåããããã«ï¼\Pkg{listings}ããã±ã¼
ã¸ã¯å
é¨ã§ãã»ã¨ãã©ã®æåããã¢ã¯ãã£ãã«ãï¼åæåã«å¯¾ãã¦ãã®æåã®åº
-åå½ä»¤ãå²ãå½ã¦ã¦ãã (\cite{listings})ï¼
+åå½ä»¤ãå²ãå½ã¦ã¦ãã \cite{listings}ï¼
ãããï¼ããã§ã¢ã¯ãã£ãã«ããæåã®ä¸ã«ï¼åææ
-åããªãããã§ããï¼p\TeX ç³»åã§ã¯ï¼åææåãã¢ã¯ãã£ãã«ããææ³ããªãï¼
+åããªãããã§ããï¼\pTeX ç³»åã§ã¯ï¼åææåãã¢ã¯ãã£ãã«ããææ³ããªãï¼
\Pkg{jlisting.sty} ã¨ããããã\cite{jlisting}ãç¨ãããã¨ã§ç¡çãã解決ãã¦ããï¼
+%
+%<*en>
+In \LuaTeX-ja, the problem is resolved by using \verb+process_input_buffer+ callback.
+The callback function inserts the output command before each letter above U+0080.
+This method can omits the process to make all Japanese characters active
+(most of the activated characters are not used in many cases).
+%
+%<*ja>
\LuaTeX-jaã§ã¯ï¼\verb+process_input_buffer+ ã³ã¼ã«ããã¯ãå©ç¨ãããã¨ã§ï¼
ãåè¡ã«åºç¾ããU+0080以éã®æåã«å¯¾ãã¦ï¼ãããã®åºåå½ä»¤ãåç½®ãããã¨ããæ¹æ³ãã¨ã£ã¦ããï¼
ããã«ããï¼ï¼å
¥åã«ã¯ä½¿ç¨ããã¦ããªããããããªãï¼åææåãããã¹ã¦ã¢ã¯ãã£ãåããæéããªãï¼
è¦éããè¯ãå®è£
ã«ãªã£ã¦ããï¼
+%
+%<*en>
+If \Pkg{listings.sty} and \LuaTeX-ja were loaded,
+then the patch \Pkg{lltjp-listings.sty} is loaded automatically at \verb+\begin{document}+.
+%
+%<*ja>
\LuaTeX-ja ã§å©ç¨ããã \Pkg{listings} ããã±ã¼ã¸ã¸ã®ããã \Pkg{lltjp-listings.sty} ã¯ï¼
\Pkg{listings.sty} ã¨\LuaTeX-jaãèªã¿è¾¼ãã§ããã°ï¼
\verb+\begin{document}+ ã®ç®æã«ããã¦èªåçã«èªã¿è¾¼ã¾ããã®ã§ï¼é常ã¯ãã¾ã
æèããå¿
è¦ã¯ãªãï¼
+%
+
+%\paragraph{Class of characters}
+%\paragraph{æå種}
-\paragraph{æå種}
+%<*en>
+Roughly speaking, the \Pkg{listings} package processes input as follows:
+%
+%<*ja>
\Pkg{listings} ããã±ã¼ã¸ã®å
é¨ã§ã¯ï¼å¤§éæã«è¨ãã¨
+%
\begin{enumerate}
+%<*en>
+\item Collects \textit{letters} and \textit{digits}, which can be used for the name of identifiers.
+%
+%<*ja>
\item èå¥åã¨ãã¦ä½¿ããæå (``letter'',~``digit'') ãã¡ã
éããï¼
+%
+
+%<*en>
+\item When reading an \textit{other}, outputs the collected character string (with modification, if needed).
+%
+%<*ja>
\item letterã§ãdigitã§ããªãæåãç¾ããæã«ï¼åéããæååãï¼å¿
è¦ãªã修飾ãã¦ï¼åºåããï¼
+%
+
+%<*en>
+\item Collects \textit{others}.
+%
+%<*ja>
\item ä»åº¦ã¯éã«ï¼letterã§ãªãæåãã¡ãletterãç¾ããã¾ã§éããï¼
+%
+
+%<*en>
+\item When reading a \textit{letter} or a \textit{digit}, outputs the collected character string.
+%
+%<*ja>
\item letterãåºç¾ãããéããæååãåºåããï¼
+%
+
+%<*en>
+\item Turns back to 1.
+%
+%<*ja>
\item 1.ã«æ»ãï¼
+%
\end{enumerate}
+%<*en>
+By the above process, line breaks inside of an identifier are blocked.
+A flag \verb+\lst@ifletter+ indicates whether the previous character can be used
+for the name of identifiers or not.
+%
+%<*ja>
ã¨ããå¦çãè¡ããã¦ããï¼ããã«ããï¼èå¥åã®éä¸ã§ã¯è¡åå²ãè¡ãããªãããã«ãªã£ã¦ããï¼
ç´åã®æåãèå¥åã¨ãã¦ä½¿ãããå¦ã㯠\verb+\lst@ifletter+ ã¨ãããã©ã°ã«æ ¼ç´ããã¦ããï¼
+%
+%<*en>
+For Japanese characters, line breaks are permitted on both sides
+except for parentheses, dashes, etc.
+To process Japanese characters,
+The pacth \Pkg{lltjp-listings.sty} introduces a new flag \verb+\lst@ifkanji+, which indicates
+whether the previous character is Japanese character or not.
+For illustration, we introduce the following classes of character:
+%
+%<*ja>
ãã¦ï¼æ¥æ¬èªã®å¦çã§ããï¼æ®ã©ã®åææåã®åå¾ã§ã¯è¡åå²ãå¯è½ã§ãããï¼ãã®ä¸æ¹ã§
æ¬å¼§é¡ãé³å¼ããªã©ã§ã¯ç¦åå¦çãå¿
è¦ãªãã¨ããï¼\Pkg{lltjp-listings.sty} ã§ã¯ï¼
-ç´åãåææåã§ãããã示ããã©ã° \verb+\lst@kanji+ ãæ°ãã«å°å
¥ããï¼
+ç´åãåææåã§ãããã示ããã©ã° \verb+\lst@ifkanji+ ãæ°ãã«å°å
¥ããï¼
以éï¼èª¬æã®ããã«ä»¥ä¸ã®ããã«æåãåé¡ããï¼
+%
\begin{center}
\small
\begin{tabular}{lccccc}
@@ -6064,23 +6200,55 @@ $\mathit{Nq}.\mathit{tail}$ã¯ç¡æå³ãªã®ã§ï¼
&Letter&Other&Kanji&Open&Close\\\midrule
\verb+\lst@ifletter+&T&F&T&F&T\\
\verb+\lst@ifkanji+&F&F&T&T&F\\
-æå³&èå¥åä¸ã®æå&ãã®ä»æ¬§ææå&æ®ã©ã®åææå&éãæ¬å¼§é¡&éãæ¬å¼§é¡\\
+%Meaning&identifier char&other alphabet&most of Japanese char&open paren&close paren\\
+%æå³&èå¥åä¸ã®æå&ãã®ä»æ¬§ææå&æ®ã©ã®åææå&éãæ¬å¼§é¡&éãæ¬å¼§é¡\\
\bottomrule
\end{tabular}
\end{center}
+%<*en>
+Note that \textit{digits} in the \Pkg{listings} package can be Letter or
+Other according to circumstances.
+%
+%<*ja>
ãªãï¼æ¬æ¥ã®\Pkg{listings} ããã±ã¼ã¸ã§ã®åé¡``digit''ã¯ï¼
åºç¾ç¶æ³ã«ãã£ã¦ï¼ä¸ã®è¡¨ã®Letterã¨Otherã®ã©ã¡ãã«ããªãããï¼
ã¾ãï¼Kanjiã¨Close㯠\verb+\lst@ifletter+ 㨠\verb+\lst@ifkanji+ ã®å¤ãä¸è´ãã¦ãããï¼
ããã¯ééãã§ã¯ãªãï¼
+%
+%<*en>
+For example, let us consider the case an Open comes after a Letter.
+Since an Open represents Japanese open parenthesis,
+it is preferred to be permitted to insert line break after the Letter.
+Therefore, the collected character string is output in this case.
+%
+%<*ja>
ä¾ãã°ï¼Letterã®ç´å¾ã«Openãæ¥ãå ´åãèããï¼
æå種Openã¯åæéãæ¬å¼§é¡ãæ³å®ãã¦ããã®ã§ï¼Letterã®ç´å¾ã§ã¯è¡åå²ãå¯è½ã§ãããã¨ãæã¾ããï¼
ãã®ããï¼ãã®å ´åã§ã¯ï¼ãã§ã«åéããã¦ããæååãåºåãããã¨ã§è¡åå²ã許容ããããã«ããï¼
+%
+
+%<*en>
+The following table summarizes $5\times 5=25$ cases:
+%
+%<*ja>
åãããã«ï¼$5\times 5=25$éãå
¨ã¦ã«ã¤ãã¦æ¸ãã¨ï¼æ¬¡ã®ããã«ãªãï¼
+%
\begin{center}
\small
\begin{tabular}{llccccc}
\toprule
+%<*en>
+&&\multicolumn{4}{c}{Next}\\\cmidrule(lr){3-7}
+&&\hbox to 4em{\hss Letter\hss}&\hbox to 4em{\hss Other\hss}
+&\hbox to 4em{\hss Kanji\hss}&\hbox to 4em{\hss Open\hss}&Close\\\midrule
+&Letter&collects&\multicolumn{3}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
+&Other&outputs&collects&\multicolumn{2}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
+Prev&Kanji&\multicolumn{4}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
+&Open&\multicolumn{5}{c}{\hrulefill \ collects\ \hrulefill}\\
+&Close&\multicolumn{4}{c}{\hrulefill \ outputs\ \hrulefill}&collects\\
+%
+%<*ja>
&&\multicolumn{4}{c}{å¾ãå´ã®æå}\\\cmidrule(lr){3-7}
&&\hbox to 4em{\hss Letter\hss}&\hbox to 4em{\hss Other\hss}
&\hbox to 4em{\hss Kanji\hss}&\hbox to 4em{\hss Open\hss}&Close\\\midrule
@@ -6089,39 +6257,65 @@ $\mathit{Nq}.\mathit{tail}$ã¯ç¡æå³ãªã®ã§ï¼
æ&Kanji&\multicolumn{4}{c}{\hrulefill \ åºå\ \hrulefill}&åé\\
å&Open&\multicolumn{5}{c}{\hrulefill \ åé\ \hrulefill}\\
種&Close&\multicolumn{4}{c}{\hrulefill \ åºå\ \hrulefill}&åé\\
+%
\bottomrule
\end{tabular}
\end{center}
-ä¸ã®è¡¨ã«ããã¦ï¼
+%In the above table,
+%ä¸ã®è¡¨ã«ããã¦ï¼
\begin{itemize}
-\item ãåºåãã¯ï¼ããã¾ã§ã«éããæååãåºåï¼âããã§è¡åå²å¯è½ï¼ãæå³ããï¼
-\item ãåéãã¯ï¼å¾å´ã®æåãï¼ç¾å¨åéãããæååã«è¿½å ï¼è¡åå²ä¸å¯ï¼ãæå³ããï¼
+%\item ``outputs'' means to output the collected character string (i.e., line breaking is permitted there).
+%\item ãåºåãã¯ï¼ããã¾ã§ã«éããæååãåºåï¼âããã§è¡åå²å¯è½ï¼ãæå³ããï¼
+
+%\item ``collects'' means to append the next character to the collected character string (i.e., line breaking is prohibited there).
+%\item ãåéãã¯ï¼å¾å´ã®æåãï¼ç¾å¨åéãããæååã«è¿½å ï¼è¡åå²ä¸å¯ï¼ãæå³ããï¼
\end{itemize}
-\paragraph{åææåæ±ãã¨ãªãæå}
+%\paragraph{Classification of characters}
+%\paragraph{åææåæ±ãã¨ãªãæå}
+
+%<*en>
+Characters are classified according to \Param{jacharrange} parameter (see Section \ref{ssec-setrange}):
+%
+%<*ja>
\Pkg{listings} ããã±ã¼ã¸ã«ããã¦åææåã¨æ±ããã
ï¼åã«è¿°ã¹ãKanji, Openï¼ãããã¯ãéãæ¬å¼§é¡ãåé¡ï¼ãå¦ãã¯ï¼
-é常ã®\textbf{JAchar}/\textbf{Alchar}ã®ç¯å²ã®è¨å®ï¼\ref{ssec-setrange}ç¯ï¼ã«å¾ã£ã¦è¡ãããï¼
+é常ã®\textbf{JAchar}/\textbf{Alchar}ã®ç¯å²ã®è¨å®ï¼\Param{jacharrange} ãã©ã¡ã¼ã¿ï¼\ref{ssec-setrange}ç¯ãåç
§ï¼ã«å¾ã£ã¦è¡ãããï¼
+%
\begin{itemize}
-\item ï¼U+0080以éã®ï¼\textbf{ALchar}ã¯ï¼ãã¹ã¦Letteræ±ãã§ããï¼
-\item ï¼U+0080以éã®ï¼\textbf{JAchar}ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®é åºã«å¾ã£ã¦æå種ã決ããï¼
+%\item \textbf{ALchars} above U+0080 are Letter.
+%\item ï¼U+0080以éã®ï¼\textbf{ALchar}ã¯ï¼ãã¹ã¦Letteræ±ãã§ããï¼
+
+%\item \textbf{JAchars} are classified in the order as follows:
+%\item ï¼U+0080以éã®ï¼\textbf{JAchar}ã«ã¤ãã¦ã¯ï¼ä»¥ä¸ã®é åºã«å¾ã£ã¦æå種ã決ããï¼
\begin{enumerate}
-\item \Param{prebreakpenalty} ã0以ä¸ã®æåã¯Openæ±ãã§ããï¼
-\item \Param{postbreakpenalty} ã0以ä¸ã®æåã¯Closeæ±ãã§ããï¼
-\item ä¸ã®2æ¡ä»¶ã®ã©ã¡ãã«ãå½ã¦ã¯ã¾ããªãã£ãæåã¯ï¼Kanjiæ±ãã§ããï¼
+%\item Characters whose \Param{prebreakpenalty} is greater than or equal to 0 are Open.
+%\item \Param{prebreakpenalty} ã0以ä¸ã®æåã¯Openæ±ãã§ããï¼
+
+%\item Characters whose \Param{postbreakpenalty} is greater than or equal to 0 are Close.
+%\item \Param{postbreakpenalty} ã0以ä¸ã®æåã¯Closeæ±ãã§ããï¼
+
+%\item Characters that don't satisfy the above two conditions are Kanji.
+%\item ä¸ã®2æ¡ä»¶ã®ã©ã¡ãã«ãå½ã¦ã¯ã¾ããªãã£ãæåã¯ï¼Kanjiæ±ãã§ããï¼
\end{enumerate}
-ãªãï¼åè§ã«ã(U+FF61--U+FF9F)以å¤ã®\textbf{JAchar}ã¯æ¬§ææå2æååã®å¹
ãã¨ããã®ã¨ã¿ãªãããï¼
-åè§ã«ãã¯æ¬§ææå1æååã®å¹
ã¨ãªãï¼
\end{itemize}
-ãããã®æå種決å®ã¯ï¼å®éã« \texttt{lstlisting} ç°å¢ãªã©ã®å
é¨ã§æåãåºã¦ãããã³ã«è¡ãããï¼
+%<*en>
+The width of halfwidth kana (U+FF61--U+FF9F) is same as the width of \textbf{ALchar};
+the width of the other \textbf{JAchars} is double the width of \textbf{ALchar}.
+%
+%<*ja>
+ãªãï¼åè§ã«ã(U+FF61--U+FF9F)以å¤ã®\textbf{JAchar}ã¯æ¬§ææå2æååã®å¹
ãã¨ããã®ã¨ã¿ãªãããï¼
+åè§ã«ãã¯æ¬§ææå1æååã®å¹
ã¨ãªãï¼
%
%<*en>
-\section{Patch for the \Pkg{listings} package}
-\dots
+The classification process is executed every time a character appears in
+listing environments.
%
-
+%<*ja>
+ãããã®æå種決å®ã¯ï¼å®éã« \texttt{lstlisting} ç°å¢ãªã©ã®å
é¨ã§æåãåºã¦ãããã³ã«è¡ãããï¼
+%
%<*ja>
\section{åæã®è¡é·è£æ£æ¹æ³}
@@ -6150,16 +6344,42 @@ $\mathit{Nq}.\mathit{tail}$ã¯ç¡æå³ãªã®ã§ï¼
è¡ããã¦ããã¨ãã¦è¯ãï¼ã¾ãï¼æ®µè½ä¸ã®è¡ä¸ã®ã°ã«ã¼ã
\begin{itemize}
\item ä¸ã®ã©ãã«ã該å½ããªãã°ã«ã¼
-\item å欧æé空ç½(\Param{xkanjiskip})
\item JFMã°ã«ã¼ï¼åªå
度å¥ã«ã¾ã¨ããããï¼
+\item å欧æé空ç½(\Param{xkanjiskip})
\item åæé空ç½(\Param{kanjiskip})
\end{itemize}
ã®$1+1+5+1=8$ã¤ã«é¡å¥ãï¼ããããã®ç¨®å¥ãã¨ã«è¨±å®¹ããã¦ãã伸縮度ã®åè¨ãè¨ç®ããï¼
ã¾ãï¼è¡é·ã¨èªç¶é·ã¨ã®å·®ã®çµ¶å¯¾å¤ãè¨ç®ãï¼ããã\textit{total}ã¨ããï¼
\subsection{è¡æ«æåã®ä½ç½®èª¿æ´}
-ã¾ãï¼è¡æ«ãåææåã§ãã£ãå ´åï¼ãããåãããã¨ã«ãã£ã¦ï¼\textbf{JAglue} ãè² æ
ãã調æ´éã
-å°ãªããããã¨ããï¼
+ã¾ãï¼è¡æ«ãæåã¯ã©ã¹$n$ã®\textbf{Jachar}ã§ãã£ãå ´åï¼
+ãããåãããã¨ã«ãã£ã¦ï¼\textbf{JAglue} ãè² æ
ãã調æ´éãå°ãªããããã¨ããï¼
+ãã®è¡æ«æåã®å·¦å³ã®ç§»åå¯è½éã¯ï¼JFMä¸ã«ããæåã¯ã©ã¹$n$ã®å®ç¾©ã®
+\texttt{end\_stretch},~\texttt{end\_shrink}ãã£ã¼ã«ãã«å
¨è§åä½ã®å¤ã¨ãã¦è¨è¿°ããã¦ããï¼
+
+ä¾ãã°ï¼è¡æ«æåãå¥ç¹ãããã§ããï¼ããã§ç¨ãããã¦ããJFMä¸ã«
+\begin{verbatim}
+ [2] = {
+ chars = { 'ã', ... }, width = 0.5, ...,
+ end_stretch = 0.5, end_shrink = 0.5,
+ },
+\end{verbatim}
+ã¨ããæå®ããã£ãå ´åï¼ãã®è¡æ«ã®å¥ç¹ã¯
+\begin{itemize}
+\item é常ã®\TeX ã®è¡åå²å¦çã§ãåè§ä»¥ä¸ã®è©°ãããè¡ããã¦ããå ´åï¼
+ãã®åã®è¡ä¸ã®\textbf{JAglue}ã®è² æ
ã軽æ¸ããããï¼
+è¡æ«ã®å¥ç¹ãåè§ã ãå³ã«ç§»åããï¼ã¶ãä¸ãçµãè¡ãï¼ï¼
+\item é常ã®\TeX ã®è¡åå²å¦çã§ãåè§ä»¥ä¸ã®ç©ºãããè¡ããã¦ããå ´åï¼
+éã«è¡æ«å¥ç¹ãåè§å·¦ã«ç§»åãããï¼è¦ãç®çã«å
¨è§åãã¨ãªãï¼ï¼
+\item 以ä¸ã®ã©ã¡ãã§ããªãå ´åï¼è¡æ«å¥ç¹ã®ä½ç½®èª¿æ´ã¯è¡ããªãï¼
+\end{itemize}
+ã¨ãªãï¼
+
+è¡æ«æåã移åããå ´åï¼ãã®åã ã\textit{total}ã®å¤ãå¼ãã¦ããï¼
+
+\subsection{ã°ã«ã¼ã®èª¿æ´}
+\textit{total}ã®åã ããï¼è¡ä¸ã®ã°ã«ã¼ã®ä¼¸ç¸®åº¦ã«å¿ãã¦è² æ
ããããã¨ã«ãªãï¼
+â¦â¦
%
@@ -6190,29 +6410,86 @@ Victor Eijkhout, \emph{\TeX\ by Topic, A \TeX nician's Reference}, Addison-Wesl
\newpage
\appendix
-%<*ja>
-\section{\LuaTeX-jaã«ãããJIS~X~0213éæ¼¢åã®catcode}
+%\section{The category code of non-kanji characters defined in JIS~X~0213}
+%\section{\LuaTeX-jaã«ãããJIS~X~0213éæ¼¢åã®catcode}
+
+%<*en>
+In these tables, the default catcode (\LuaTeX-ja) and kcatcode ((u)\pTeX) of non-kanji
+characters defined in JIS~X~0213 from row 1 to row 13 is summarized.
+Each character is printed as follows:
+%
+%<*ja>
ããã§ã¯ï¼JIS~X~0213ã®éæ¼¢åé¨åï¼ç¬¬1åºã第13åºï¼ã®ãã¡ï¼
ã©ã®æåã(u)\pTeX ã\LuaTeX-jaã§å¶å¾¡ç¶´å
ã«ä½¿ç¨å¯è½ãã表ã«ãã¦ã¾ã¨ããï¼
åæåã¯
+%
\begin{center}
\tt\fboxsep=1pt\fbox{\hbox to \zw{\gt ã\hss}}\,\scriptsize LUP
\end{center}
+%<*ja>
ã®ããã«è¡¨ç¤ºãã¦ããï¼åæåã¯æ¬¡ã®æå³ãæã£ã¦ããï¼
-ãã®è¡¨ã®çæã¯ï¼JIS X 0208ã®ç¯å²å
ã®æåã«ã¤ãã¦ã¯\verb+\jis+å½ä»¤ã使ã£ã¦è¡ãªã£ã¦ããï¼
+ãã®è¡¨ã®çæã¯ï¼JIS~X~0208ã®ç¯å²å
ã®æåã«ã¤ãã¦ã¯\verb+\jis+å½ä»¤ã使ã£ã¦è¡ãªã£ã¦ããï¼
+%
+%<*en>
+The tables are generated by using \verb+\jis+ command for characters included in
+JIS~X~0208.
+Each character in the tables means:
+%
\begin{itemize}
+%<*en>
+\item The background of a character regarded as \textbf{ALchar} in \LuaTeX-ja
+ is colored light blue.
+%
+%<*ja>
\item èæ¯ãèãéãå¡ããã¦ããæåã¯ï¼
\LuaTeX-ja ã®æ¨æºã§\textbf{ALchar}ã¨ãã¦èªèããã¦ããæåã§ããï¼
+%
+
+%<*en>
+\item The first letter {\tt L} means that the character is available for
+ the name of a control sequence in \XeTeX{} and \LuaTeX-ja (its catcode is 11).
+%
+%<*ja>
\item 1æåç®ã® {\tt L} ã¯ï¼\XeTeX ã\LuaTeX-jaã«ããã¦ãã®æåãå¶å¾¡ç¶´å
ã«
使ç¨å¯è½ï¼catcodeã11ï¼ã§ãããã¨ã表ãã¦ããï¼
+%
+
+%<*en>
+\item The second letter {\tt U} means that the character is available for
+ the name of a control sequence in \upTeX{} (its kcatcode is 16 or 17).
+ \upTeX{} regards these characters as Japanese character.
+%
+%<*ja>
\item 2æåç®ã®{\tt U} ã¯ï¼\upTeX ã«ããã¦ãã®æåãå¶å¾¡ç¶´å
ã«ä½¿ç¨å¯è½ï¼kcatcodeã¯16,~17ï¼ã§ãããã¨ã
表ãã¦ããï¼ãã®ç¯å²å
ã§ã¯ï¼\upTeX ã¯æ¨æºã§å
¨æåãåææåã¨ãã¦æ±ãããã§ããï¼
+%
+
+%<*en>
+\item The third letter {\tt P} means that the character is available for
+ the name of a control sequence in \pTeX{} (its kcatcode is 16 or 17).
+%
+%<*ja>
\item 3æåç®ã® {\tt P} ã¯ï¼\pTeX ã«ããã¦ãã®æåãå¶å¾¡ç¶´å
ã«ä½¿ç¨å¯è½ï¼kcatcodeã¯16,~17ï¼ã§ãããã¨ã
表ãã¦ããï¼
+%
+
+%<*en>
+\item If the third letter is {\tt -} (or the character is printed in red),
+ the character is not included in JIS~X~0208.
+ Therefore, you can consider the character is not available in \pTeX.
+%
+%<*ja>
\item 3æåç®ã{\tt -}ã¨ãªã£ã¦ãããã®ï¼æ¬ä½ã®æåã赤身ããã£ã¦ããï¼ã¯ï¼
-JIS~X~0208ã«ãªããã使ç¨ä¸è½ã¨èãã¦è¯ããã®ã§ããï¼
+JIS~X~0208ã«ãªããã\pTeX ã§ã¯ä½¿ç¨ä¸è½ã¨èãã¦è¯ããã®ã§ããï¼
+%
+
+%<*en>
+\item The kana for bidakuon in row 4 and 5 are omitted.
+%
+%<*ja>
\item 第4åºã¨ç¬¬5åºã«ããï¼é¼»æ¿é³ã®ä»®åã«ã¤ãã¦ã¯çç¥ããï¼
+%
\end{itemize}
@@ -6538,7 +6815,9 @@ JIS~X~0208ã«ãªããã使ç¨ä¸è½ã¨èãã¦è¯ããã®ã§ããï¼
}
\def\test#1{{%
-\subsection*{第#1åº}\tt\small\fboxsep=1pt\centering\tabcolsep=0.25\zw
+%\subsection*{Row #1}
+%\subsection*{第#1åº}
+\tt\small\fboxsep=1pt\centering\tabcolsep=0.25\zw
\begin{tabular}{ccccccccccccccccc}\toprule&"0&"1&"2&"3&"4&"5&"6&"7&"8&"9&"A&"B&"C&"D&"E&"F\\
\out{#1}{2}\out{#1}{3}\out{#1}{4}\out{#1}{5}\out{#1}{6}\out{#1}{7}\bottomrule
\end{tabular}\par}\medskip}
@@ -6546,8 +6825,6 @@ JIS~X~0208ã«ãªããã使ç¨ä¸è½ã¨èãã¦è¯ããã®ã§ããï¼
\test{1}\test{2}\test{3}\test{4}\test{5}\test{6}\test{7}\test{8}
\test{9}\test{10}\test{11}\test{12}\test{13}
-%
-
\section{Package versions used in this document}
This document was typeset using the following packages: