OSDN Git Service

Merge branch 'kmaeda-manual' into kitagawa_test
[luatex-ja/luatexja.git] / doc / luatexja.dtx
index 3fd84e1..8d6dbb2 100644 (file)
@@ -133,7 +133,7 @@ ASCII \pTeX やそれの拡張物が用いられることが一般的であっ
 のエンジン拡張であり,(少々仕様上不便な点はあるものの)商業印刷の分野に
 も用いられるほどの高品質な日本語組版を可能としている.だが,それは弱点に
 もなってしまった:\pTeX という(組版的に)満足なものがあったため,海外で
-è¡\8cã\82\8fã\82\8cã\81¦ã\81\84ã\82\8bæ\95°ã\80\85ã\81®\TeX ã\81®æ\8b¡å¼µâ\94\80â\94\80ä¾\8bã\81\88ã\81°\eTeX ã\82\84\pdfTeX â\94\80â\94\80や,TrueType,
+è¡\8cã\82\8fã\82\8cã\81¦ã\81\84ã\82\8bæ\95°ã\80\85ã\81®\TeX ã\81®æ\8b¡å¼µâ\80\95â\80\95ä¾\8bã\81\88ã\81°\eTeX ã\82\84\pdfTeX â\80\95â\80\95や,TrueType,
 OpenType, Unicodeといった計算機で日本語を扱う際の状況の変化に追従すること
 を怠ってしまったのだ.
 %</ja>
@@ -499,6 +499,7 @@ $ git clone git://git.sourceforge.jp/gitroot/luatex-ja/luatexja.git
 \item 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 \TeX\ Live (in \texttt{texmf-dist/tex/luatex/luatexja})
   \item W32\TeX\ (in \texttt{luatexja.tar.xz})
   \end{itemize}
@@ -524,6 +525,7 @@ $ git clone git://git.sourceforge.jp/gitroot/luatex-ja/luatexja.git
 \item 今や,\LuaTeX-jaは以下のアーカイブ,およびディストリビューションにも収録されている:
   \begin{itemize}
   \item CTAN (\texttt{macros/luatex/generic/luatexja})
+  \item MiK\TeX\ (\texttt{luatexja.tar.lzma})
   \item \TeX\ Live (\texttt{texmf-dist/tex/luatex/luatexja})
   \item W32\TeX\ (\texttt{luatexja.tar.xz})
   \end{itemize}
@@ -1920,9 +1922,26 @@ the `standard' Japanese fonts, namely, `Ryumin-Light' and
 つまり`Ryumin-Light'と`GothicBBB-Medium'の指定でこのプリフィックスが使われる.
 %</ja>
 
-\paragraph{\texttt{cid} key}
+%<en>\paragraph{\texttt{cid} key}
+%<ja>\paragraph{\texttt{cid}キー}
 \label{para-cid}
 
+%<*en>
+The default font defined by using \texttt{psft:} prefix is for Japanese typesetting;
+it is Adobe-Japan1-6 CID-keyed font.
+One can specify \texttt{cid} key to use other CID-keyed non-embedded fonts
+for Chinese or Korean typesetting.
+\begin{lstlisting}[numbers=left]
+\jfont\testJ={psft:Ryumin-Light:cid=Adobe-Japan1-6;jfm=jis}     % Japanese
+\jfont\testD={psft:Ryumin-Light:jfm=jis}                        % default value is Adobe-Japan1-6
+\jfont\testC={psft:AdobeMingStd-Light:cid=Adobe-CNS1-5;jfm=jis} % Traditional Chinese
+\jfont\testG={psft:SimSun:cid=Adobe-GB1-5;jfm=jis}              % Simplified Chinese
+\jfont\testK={psft:Batang:cid=Adobe-Korea1-2;jfm=jis}           % Korean
+\end{lstlisting}
+Note that the code above specifies \texttt{jfm-jis.lua}, which is for Japanese fonts,
+as JFM for Chinese and Korean fonts.
+%</en>
+%<*ja>
 標準で\texttt{psft:}プリフィックスで定義されるフォントは日本語用のもので
 あり,Adobe-Japan1-6のCIDに対応したものとなる.しかし,\LuaTeX-jaは中国語
 の組版にも威力を発揮することが分かり,日本語フォントでない非埋込フォント
@@ -1937,29 +1956,43 @@ the `standard' Japanese fonts, namely, `Ryumin-Light' and
 \jfont\testK={psft:Batang:cid=Adobe-Korea1-2;jfm=jis}           % 韓国語
 \end{lstlisting}
 上のコードでは中国語・韓国語用フォントに対してもJFMに
-日本語用の \texttt{jfm-jis.lua} を指定しているので注意されたい.
+日本語用の\texttt{jfm-jis.lua}を指定しているので注意されたい.
+%</ja>
 
+%<*en>
+At present, \LuaTeX-ja supports only 4 values written in the sample code above.
+Specifying other values, e.g.,
+%</en>
+%<*ja>
 今のところ,\LuaTeX-jaは上のサンプルコード中に書いた4つの値しかサポートしていない.
+%</ja>
 \begin{lstlisting}
 \jfont\test={psft:Ryumin-Light:cid=Adobe-Japan2;jfm=jis}
 \end{lstlisting}
+%<*en>
+occurs the following error:
+%</en>
+%<*ja>
 のようにそれら以外の値を指定すると,
+%</ja>
 \begin{lstlisting}[numbers=left]
 ! Package luatexja Error: bad cid key `Adobe-Japan2'.
 
 See the luatexja package documentation for explanation.
 Type  H <return>  for immediate help.
-<to be read again> 
-                   \par 
-l.78 
-     
+<to be read again>
+                   \par
+l.78
+
 ? h
 I couldn't find any non-embedded font information for the CID
 `Adobe-Japan2'. For now, I'll use `Adobe-Japan1-6'.
 Please contact the LuaTeX-ja project team.
-? 
+?
 \end{lstlisting}
+%<*ja>
 というエラーが出る.
+%</ja>
 
 %<en>\subsection{Structure of JFM file}
 %<ja>\subsection{JFMファイルの構造}
@@ -2629,7 +2662,7 @@ of \LuaTeX, see Section~\ref{sec-para}.
 先に述べたように,\verb+\ltjsetparameter+ と \verb+\ltjgetparameter+ は
 \LuaTeX-jaのほとんどのパラメータにアクセスするためのプリミティブである.
 \LuaTeX-jaが\pTeX のような文法(例えば,\verb+\prebreakpenalty`)=10000+)を
-採用しない理由の一つは,\LuaTeX のソースにおける \verb+\hpack_filter+
+採用しない理由の一つは,\LuaTeX のソースにおける \verb+hpack_filter+
 コールバックの位置にある.\ref{sec-para}節を参照.
 %</ja>
 
@@ -3177,41 +3210,33 @@ the commands of Japanese version:
 
 
 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
+\item[CID=<name>]
 \item[JFM=<name>]
-\item[JFM-var=<name>]
+\item[JFM-var=<name>] \
 
 %<*en>
-These 2 font features correspond to \texttt{jfm} and \texttt{jfmvar} keys for
-\verb+\jfont+ primitive, respectively. See Subsection~\ref{ssec-jfont}.
+These 3 font features correspond to \texttt{cid}, \texttt{jfm} and
+\texttt{jfmvar} keys for \verb+\jfont+ primitive, respectively.
+\texttt{CID} is effective only when with \texttt{NoEmbed}
+described below.
+See Subsections~\ref{ssec-jfont} and \ref{ssec-psft} for details.
 %</en>
 %<*ja>
-これら2つのキーはそれぞれ \verb+\jfont+ プリミティブに対する
-\texttt{jfm}, \texttt{jfmvar}キーとそれぞれ対応する.
-\ref{ssec-jfont}節を参照.
+これら3つのキーはそれぞれ \verb+\jfont+ プリミティブに対する
+\texttt{cid}, \texttt{jfm}, \texttt{jfmvar}キーとそれぞれ対応する.
+\texttt{CID} は下の \texttt{NoEmbed} と合わせて用いられたときのみ有効である.
+詳細は\ref{ssec-jfont}節と\ref{ssec-psft}節を参照.
 %</ja>
 
 \item[NoEmbed]
 %<*en>
-By specifying this font feature, you can use `name-only' Japanese font which
+By specifying this font feature, 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>
-
-\item[CID=<name>]
-%<*en>
-This feature is effective only when with NoEmbed feature.
-You can use the non-embedded CID-keyed font whose glyphs are addressed according
-to the specified character collection defined by Adobe Inc.
-The default value is Adobe-Japan1. See also Subsection~\ref{ssec-psft}.
-%</en>
-%<*ja>
-NoEmbed キーと合わせて用いる.
-非埋め込みの CID-keyed フォントがどの文字コレクションに基づくものかを指定する.
-デフォルトは Adobe-Japan1 である.\ref{ssec-psft}節も参照.
-%</ja>
 \end{list}
 
 \subsection{\texttt{luatexja-otf.sty}}
@@ -3557,7 +3582,7 @@ Nodes for Japanese Characters which the callback process of
 %</ja>
 
 \item[30114]
-Nodes for indicating beginning of a paragraph. 
+Nodes for indicating beginning of a paragraph.
 A paragraph which is started by \verb+\item+ in list-like environments has a horizontal box
 for its label before the actual contents. So \dots
 \end{description}
@@ -3857,10 +3882,11 @@ Considering these situations, handling of an end-of-line in \LuaTeX-ja are as fo
 \begin{quote}
 A character U+FFFFF (its category code is set to 14~(comment) by
 \LuaTeX-ja) is appended to an input line, \emph{before \LuaTeX\ actually
-process it}, if and only if the following two conditions are satisfied:
+process it}, if and only if the following three conditions are satisfied:
 \begin{enumerate}
 \item The category code of the character $\langle${return}$\rangle$
       (whose character code is 13) is 5~(end-of-line).
+\item The category code of U+FFFFF itself is 14~(comment).
 \item The input line matches the following `regular expression':
 \[
   (\text{any char})^*(\textbf{JAchar})
 
 \begin{quote}
 各入力行に対し,\textbf{その入力行が読まれる前の内部状態で}
-以下の2条件が満たされている場合,\LuaTeX-jaはU+FFFFF番の文字
+以下の3条件が満たされている場合,\LuaTeX-jaはU+FFFFF番の文字
 \footnote{この文字はコメント文字として扱われるように\LuaTeX-ja内部で設定をしている.}
 を末尾に追加する.よって,その場合に改行は空白とは見做されないこととなる.
 \begin{enumerate}
 \item 改行文字(文字コード13番)のカテゴリーコードが5~(end-of-line)である.
+\item U+FFFFFのカテゴリーコードが14~(comment)である.
 \item 入力行は次の「正規表現」にマッチしている:
 \[
   (\text{any char})^*(\textbf{JAchar})