X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=8d6dbb2c983a15b2e5c00ecd44b3d06889188be1;hb=6e672f2c6c4c966166ec272a021b0f3afa93bee0;hp=3fd84e1ae0a177acf342ac3244e72d2eb11f587b;hpb=880636d81e9819b31dec8a5f897bbfaf1732d18b;p=luatex-ja%2Fluatexja.git diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index 3fd84e1..8d6dbb2 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -133,7 +133,7 @@ ASCII \pTeX やそれの拡張物が用いられることが一般的であっ のエンジン拡張であり,(少々仕様上不便な点はあるものの)商業印刷の分野に も用いられるほどの高品質な日本語組版を可能としている.だが,それは弱点に もなってしまった:\pTeX という(組版的に)満足なものがあったため,海外で -行われている数々の\TeX の拡張──例えば\eTeX や\pdfTeX ──や,TrueType, +行われている数々の\TeX の拡張――例えば\eTeX や\pdfTeX ――や,TrueType, OpenType, Unicodeといった計算機で日本語を扱う際の状況の変化に追従すること を怠ってしまったのだ. % @@ -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'の指定でこのプリフィックスが使われる. % -\paragraph{\texttt{cid} key} +%\paragraph{\texttt{cid} key} +%\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. +% +%<*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}を指定しているので注意されたい. +% +%<*en> +At present, \LuaTeX-ja supports only 4 values written in the sample code above. +Specifying other values, e.g., +% +%<*ja> 今のところ,\LuaTeX-jaは上のサンプルコード中に書いた4つの値しかサポートしていない. +% \begin{lstlisting} \jfont\test={psft:Ryumin-Light:cid=Adobe-Japan2;jfm=jis} \end{lstlisting} +%<*en> +occurs the following error: +% +%<*ja> のようにそれら以外の値を指定すると, +% \begin{lstlisting}[numbers=left] ! Package luatexja Error: bad cid key `Adobe-Japan2'. See the luatexja package documentation for explanation. Type H for immediate help. - - \par -l.78 - + + \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> というエラーが出る. +% %\subsection{Structure of JFM file} %\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}節を参照. % @@ -3177,41 +3210,33 @@ the commands of Japanese version: \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw} +\item[CID=] \item[JFM=] -\item[JFM-var=] +\item[JFM-var=] \ %<*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. % %<*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}節を参照. % \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}. % %<*ja> これを指定することで,PDFに埋め込まれない「名前だけ」のフォントを指定することが できる.\ref{ssec-psft}節を参照. % - -\item[CID=] -%<*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}. -% -%<*ja> -NoEmbed キーと合わせて用いる. -非埋め込みの CID-keyed フォントがどの文字コレクションに基づくものかを指定する. -デフォルトは Adobe-Japan1 である.\ref{ssec-psft}節も参照. -% \end{list} \subsection{\texttt{luatexja-otf.sty}} @@ -3557,7 +3582,7 @@ Nodes for Japanese Characters which the callback process of % \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}) @@ -3902,11 +3928,12 @@ u \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})