OSDN Git Service

2014 -> 2015.
[luatex-ja/luatexja.git] / doc / luatexja.dtx
index f98bd5d..aabf2ec 100644 (file)
@@ -917,9 +917,25 @@ Note that the bold series in both family are same as the medium series of \emph{
 また,どちらのファミリでもイタリック体・スラント体は定義されない.
 %</ja>
 
-
 %<en>\item Japanese characters in math mode are typeset by the font family \texttt{mc}.
 %<ja>\item 数式モード中の和文文字は明朝体(\texttt{mc})で出力される.
+
+%<*en>
+\item If you use the \Pkg{beamer} class with the default font theme (which uses sans serif
+      fonts) and with \LuaTeX-ja, you might want to change default Japanese fonts to
+      \emph{gothic} family. The following line  changes  the default Japanese font family
+      to \emph{gothic}:
+%</en>
+%<*ja>
+\item \Pkg{beamer}クラスを既定のフォント設定で使う場合,既定欧文フォントがサンセリフなの
+      で,既定和文フォントもゴシック体にしたいと思うかもしれない.その場合はプリアンブルに
+次を書けばよい:
+%</ja>
+\begin{lstlisting}
+ \renewcommand{\kanjifamilydefault}{\gtdefault}
+\end{lstlisting}
+
+
 \end{itemize}
 
 %<*en>
@@ -1075,6 +1091,7 @@ auto select&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\
 \ref{ssec-altfont}節の \cs{ltjdeclarealtfont} と,その\LaTeX 版の\
 \cs{DeclareAlternateKanjiFont}(\ref{ssec-nfsspat}節)を参照せよ.
 %</ja>
+
 \end{itemize}
 
 %<*en>
@@ -2502,7 +2519,7 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.}
 %<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 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\\
@@ -2510,16 +2527,18 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.}
 \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 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\\
+\D FF0F&1&31&N&N&Y\\
+\D FF3C&1&32&N&N&Y\\
 \bottomrule
 \end{tabular}\qquad
 \begin{tabular}{cccccc}
@@ -2527,8 +2546,6 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.}
 %<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\\
@@ -2546,7 +2563,6 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.}
 %<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}
@@ -2573,8 +2589,6 @@ For the detail, see \url{https://github.com/h-kitagawa/kct}.
 異なっているところだけを載せると,表\ref{table-kcat-diff}のようになる.
 「・」「゛」「゜」「゠」を除けば,\LuaTeX-jaでは\upTeX より多くの文字が
 制御綴に使用可能になっている.
-\textbf{特に重要なのは,全角空白(\texttt{U+3000})が
-\LuaTeX-jaでは制御綴中に使用可能であることである.}
 
 JIS~X~0213の範囲に広げると,差異はさらに大きくなる.
 詳細については例えば \url{https://github.com/h-kitagawa/kct} 中の\
@@ -6967,7 +6981,7 @@ then the patch \Pkg{lltjp-listings} is loaded automatically at \verb+\begin{docu
 意識する必要はない.
 %</ja>
 
-%<en>\subsection{Notes}
+%<en>\subsection{Notes and additional keys}
 %<ja>\subsection{注意}
 %<*en>
 \paragraph{Escaping to \LaTeX}
@@ -7009,6 +7023,20 @@ instead of ``\verb+\ほげ+''.
 「\cs{}\IVSA FFFFF」というcontrol symbolが実行されることになる.
 %</ja>
 
+%<*en>
+\paragraph{Variation selectors}
+\Pkg{lltjp-listings} add two keys, namely \texttt{vsraw}~and~\texttt{vscmd},
+which specify how variation selectors are treated in 
+\texttt{lstlisting} or other enviroments.
+Note that these additional keys are not usable in the preamble, 
+since \Pkg{lltjp-listings} is loaded at \verb+\begin{document}+.
+
+\texttt{vsraw} is a key which takes a boolean value, and its default value is
+false.
+\begin{itemize}
+ \item If the \texttt{vsraw} key is true, then
+variation selectors are ``combined'' with the previous character.
+%</en>
 %<*ja>
 \paragraph{異体字セレクタの扱い}
 \texttt{lstlisting} 環境などの内部にある異体字セレクタを扱うため,
@@ -7021,21 +7049,31 @@ instead of ``\verb+\ほげ+''.
  \item trueの場合は,異体字セレクタは「直前の文字に続けて」出力される.
 もしもIVSサポート(\ref{ssec-ltjotf}節)が有効になっていた場合は,
 以下の例(左側は入力,右側はその出力)のようになる.
+%</ja>
 \begin{LTXexample}
 \begin{lstlisting}[vsraw=true]
 葛󠄀城市,葛󠄁飾区,葛西
 \end{lstlisting}
 \end{LTXexample}
+%<*en>
+\item If the \texttt{vsraw} key is false, then 
+variation selectors are typeset by an appropriate command, which is specified by
+      the \texttt{vscmd} key.
+The default setting of the \texttt{vscmd} key produces the following.
+%</en>
+%<*ja>
 \item falseの場合は,異体字セレクタは適当な命令によって「見える形で」出力される.
 どのような形で出力されるかを規定するのが \texttt{vscmd} キーであり,
 \Pkg{lltjp-listings} の標準設定では以下の例の右側のように出力される.
+%</ja>
 \begin{LTXexample}
 \begin{lstlisting}[vsraw=false,
    vscmd=\ltjlistingsvsstdcmd]
 葛󠄀城市,葛󠄁飾区,葛西
 \end{lstlisting}
 \end{LTXexample}
-ちなみに,本ドキュメントでは次のようにしている:
+%<ja> ちなみに,本ドキュメントでは次のようにしている:
+%<en> For example, the following code is the setting of the \texttt{vscmd} key in this document.
 \begin{lstlisting}[numbers=left]
 \def\IVSA#1#2#3#4#5{%
   \textcolor{blue}{\raisebox{3.5pt}{\tt%
@@ -7049,10 +7087,56 @@ instead of ``\verb+\ほげ+''.
 \lstset{vscmd=\IVSB}
 \end{lstlisting}
 \end{itemize}
-既定の出力命令を復活させたい場合は\ \verb+vsraw=\ltjlistingsvsstdcmd+\
+%<*en>
+The default output command of variation selectors is stored in \verb+\ltjlistingsvsstdcmd+.
+%</en>
+%<*ja>
+既定の出力命令を復活させたい場合は\ \verb+vscmd=\ltjlistingsvsstdcmd+\
 とすれば良い.
 %</ja>
 
+%<*en>
+\paragraph{The \texttt{doubleletterspace} key}
+Even the column format is \texttt{[c]fixed}, sometimes characters are not vertically aligned.
+The following example  is typeset with \texttt{basewidth=2em}, and
+you'll see the leftmost ``\texttt{H}'' are not vertically aligned.
+\begin{lstlisting}[basewidth=2em, basicstyle=\tt,numbers=left]
+:H:
+:HHHH:
+\end{lstlisting}
+
+\Pkg{lltjp-listing} adds the \texttt{doubleletterspace} key (not activated by default, for
+compatibility) to
+improve the situation, namely doubles inter-character space in each output unit.
+With this key, the above input now produces better output.
+\begin{lstlisting}[basewidth=2em, basicstyle=\tt,numbers=left, doubleletterspace]
+:H:
+:HHHH:
+\end{lstlisting}
+%</en>
+%<*ja>
+\paragraph{\texttt{doubleletterspace}キー}
+\Pkg{listings}パッケージで列揃えが \texttt{[c]fixed} となっている場合でも,
+場合によっては文字が縦に揃わない場合もある.
+例を以下に示そう.これは強調するために \texttt{basewidth=2em} を設定している.
+\begin{lstlisting}[basewidth=2em, basicstyle=\tt,numbers=left]
+:H:
+:HHHH:
+\end{lstlisting}
+1行目と2行目の「\texttt{H}」の位置が揃っていないが,
+これは出力単位ごとに,先頭・末尾・各文字間に同じ量の空白を挿入することによる.
+
+\Pkg{lltjp-listing}では,このような症状を改善させるために \texttt{doubleletterspace} キー
+を追加した(標準では互換性のために無効になっている).このキーを有効にすると,
+出力単位中の各文字間の空白を2倍にすることで文字を揃いやすくしている.
+上と同じものを \texttt{doubleletterspace} キーを有効にして組んだものが以下であり,
+きちんと「\texttt{H}」の位置が揃っていることが分かる.
+\begin{lstlisting}[basewidth=2em, basicstyle=\tt,numbers=left, doubleletterspace]
+:H:
+:HHHH:
+\end{lstlisting}
+%</ja>
+
 %<en>\subsection{Class of Characters}
 %<ja>\subsection{文字種}
 
@@ -7182,7 +7266,7 @@ are classified into above 5~classes by the following rules:
 Letter, Other, Kanji, Open, Closeのどれに属するかは次によって決まる:
 %</ja>
 \begin{itemize}
-%<en>\item \textbf{ALchar}s above \texttt{U+0080} are classified as Letter.
+%<en>\item \textbf{ALchar}s above or equal to~\texttt{U+0080} are classified as Letter.
 %<ja>\item (\texttt{U+0080}以降の)\textbf{ALchar}は,すべてLetter扱いである.
 
 %<en>\item \textbf{JAchar}s are classified in the order as follows:
@@ -7394,10 +7478,11 @@ OpenTypeフォントでもTrueTypeフォントでもIVS情報が格納されて
 \texttt{fontloader} の呼び出しでかなり時間を消費することから,
 %%% to_table を使わなくしたことで,メモリ使用量は減った
 IVS情報をキャッシュに保存することで2回目以降の実行時間を節約している.
+%</ja>
 
 
+%<*ja>
 \section{複数フォントの「合成」(未完)}
-
 \section{\LuaTeX-jaにおけるキャッシュ}
 \Pkg{luaotfload}パッケージが,各TrueType・OpenTypeフォントの情報を
 キャッシュとして保存しているのと同様の方法で,