X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=44a9214a1a0cc53af21dfbe15a7b85a863728409;hb=9dbbc6173ff46048a6fd079cc7475f5e3968657e;hp=702d60021be9c575df55f293072221d959bb9782;hpb=5f81f287d4389835fb9332f7537c91f74666a243;p=luatex-ja%2Fluatexja.git diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index 702d600..44a9214 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -44,6 +44,7 @@ \usepackage[margin=25mm,lmargin=30mm,rmargin=30mm,footskip=6mm]{geometry} \usepackage{luatexja-adjust}\ltjdisableadjust \parskip=\smallskipamount +\makeatletter \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% @@ -77,6 +78,7 @@ explpreset={numberstyle=\tiny, numbers=left, numbersep=1em, columns=fixed} } % Suppress output from showexpl to stdout. +\makeatletter \let\SX@Info\relax %%%%%%%% colors @@ -274,8 +276,8 @@ scripts for appropriate callbacks. %<*en> The \LuaTeX-ja package is under much influence of \pTeX\ engine. The initial -target of development was to implement features of \pTeX. However, -implementing all feature of \pTeX\ is impossible, +target of development was to implement features of \pTeX. However, +implementing all feature of \pTeX\ is impossible, since all process of \LuaTeX-ja must be implemented only by Lua and \TeX\ macros. Hence \emph{\LuaTeX-ja is not a just porting of \pTeX; unnatural specifications/behaviors of \pTeX\ were not adopted}. @@ -300,7 +302,7 @@ For more detailed information, see Part~\ref{part-imp} or other sections of this % %<*en> -\paragraph{Command names} \pTeX\ addes several primitives, such as \cs{kanjiskip}, +\paragraph{Command names} \pTeX\ addes several primitives, such as \cs{kanjiskip}, \cs{prebreakpenalty},~and,~\cs{ifydir}. They can be used as follows: % %<*ja> @@ -313,7 +315,7 @@ For more detailed information, see Part~\ref{part-imp} or other sections of this \prebreakpenalty`ぁ=100 \ifydir ... \fi \end{verbatim} -% However, we cannot use them under \LuaTeX-ja. +% However, we cannot use them under \LuaTeX-ja. % Instead of them, we have to write as the following. % は\LuaTeX-jaには存在しない.\LuaTeX-jaでは以下のように記述することになる. \begin{verbatim} @@ -323,7 +325,7 @@ For more detailed information, see Part~\ref{part-imp} or other sections of this \ltjsetparameter{prebreakpenalty={`ぁ,100}} \ifnum\ltjgetparemeter{direction}=4 ... \fi \end{verbatim} -%<*en> +%<*en> Note that \pTeX\ adds new two useful units, namely \texttt{zw}~and~\texttt{zh}. As shown above, they are changed by \cs{zw}~and~\cs{zh} respectively, in \LuaTeX-ja. % @@ -418,13 +420,13 @@ The insertion process of glues/kerns between two Japanese %<*en> \paragraph{Directions} -From this version, \LuaTeX-ja supports vertical writing; +From version~20150420.0, \LuaTeX-ja supports vertical writing; but this feature must \emph{not} be confused with $\Omega$-style direction support of \LuaTeX\ itself. ... % %<*ja> \paragraph{組方向} -本版からは,不安定ながらも\LuaTeX-ja における縦組みをサポートしている. +20150420.0版からは,不安定ながらも\LuaTeX-ja における縦組みをサポートしている. なお,\LuaTeX 本体も,$\Omega$流の組方向をサポートしているが,それとは全くの別物であること に注意してほしい. \LuaTeX のコールバックや実装により,特に異なった組方向のボックスを扱う場合には @@ -519,21 +521,21 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}. %\paragraph{プロジェクトWiki} プロジェクトWikiは構築中である. %<*en> \begin{itemize} -\item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29} (English) -\item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage} (Japanese) -\item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28zh%29} (Chinese) +\item \url{https://osdn.jp/projects/luatex-ja/wiki/FrontPage%28en%29} (English) +\item \url{https://osdn.jp/projects/luatex-ja/wiki/FrontPage} (Japanese) +\item \url{https://osdn.jp/projects/luatex-ja/wiki/FrontPage%28zh%29} (Chinese) \end{itemize} % %<*ja> \begin{itemize} -\item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage}(日本語) -\item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29}(英語) -\item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28zh%29}(中国語) +\item \url{https://osdn.jp/projects/luatex-ja/wiki/FrontPage}(日本語) +\item \url{https://osdn.jp/projects/luatex-ja/wiki/FrontPage%28en%29}(英語) +\item \url{https://osdn.jp/projects/luatex-ja/wiki/FrontPage%28zh%29}(中国語) \end{itemize} % -%This project is hosted by SourceForge.JP. -%本プロジェクトはSourceForge.JPのサービスを用いて運営されている. +%This project is hosted by OSDN. +%本プロジェクトはOSDNのサービスを用いて運営されている. %\paragraph{Members}\ %\paragraph{開発メンバー}\ @@ -564,7 +566,7 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}. %\subsection{インストール} %The following packages are needed for the \LuaTeX-ja\ package. -%*ja>\LuaTeX-jaパッケージの動作には次のパッケージ類が必要である. +%\LuaTeX-jaパッケージの動作には次のパッケージ類が必要である. \begin{itemize} \item \LuaTeX\ beta-0.80.0 (or later) \item \Pkg{luaotfload} v2.5 (or later) @@ -630,11 +632,11 @@ W32\TeX においてはIPAexフォントは \texttt{luatexja.tar.xz} 内にあ \begin{itemize} \item Clone the Git repository: \begin{lstlisting} -$ git clone git://git.sourceforge.jp/gitroot/luatex-ja/luatexja.git +$ git clone git://git.osdn.jp/gitroot/luatex-ja/luatexja.git \end{lstlisting} \item Download the \texttt{tar.gz} archive of HEAD in the \texttt{master} branch from \begin{flushleft} -\url{http://git.sourceforge.jp/view?p=luatex-ja/luatexja.git;a=snapshot;h=HEAD;sf=tgz}. +\url{http://git.osdn.jp/view?p=luatex-ja/luatexja.git;a=snapshot;h=HEAD;sf=tgz}. \end{flushleft} \end{itemize} @@ -648,11 +650,11 @@ the forefront of development is not the \texttt{master} branch. \begin{itemize} \item Gitリポジトリをクローンする: \begin{lstlisting} -$ git clone git://git.sourceforge.jp/gitroot/luatex-ja/luatexja.git +$ git clone git://git.osdn.jp/gitroot/luatex-ja/luatexja.git \end{lstlisting} \item \texttt{master}ブランチのスナップショット(\texttt{tar.gz}形式)をダウンロードする. \begin{flushleft} -\url{http://git.sourceforge.jp/view?p=luatex-ja/luatexja.git;a=snapshot;h=HEAD;sf=tgz}. +\url{http://git.osdn.jp/view?p=luatex-ja/luatexja.git;a=snapshot;h=HEAD;sf=tgz}. \end{flushleft} \end{itemize} \texttt{master}ブランチ(従って,CTAN内のアーカイブも)はたまにしか更新されないことに注意. @@ -743,6 +745,20 @@ For changes from \pTeX, see Subsection~\ref{ssec:chgptex}. 従来日本語の文字コードとして用いられてきたEUC-JPやShift-JISは使用できない. % %<*en> +\item By default, \LuaTeX-ja uses Japanese fonts to typeset Greek and Cyrillic letters, + and some Unicode symbols such as \P~and~\S. To change this behavior, + put \lstinline!\ltjsetparameter{jacharrange={-2,-3,-8}}! in the preamble. + For the detailed description, see Subsection~\ref{ssec-setrange}. +% +%<*ja> +\item +標準では,\LuaTeX-jaはギリシャ文字やキリル文字,それに\P や\S などの記号を和文フォントを使っ + て組む.ギリシャ語などを本格的に組むなどこの状況が望ましくない場合, + プリアンブルに \lstinline!\ltjsetparameter{jacharrange={-2,-3,-8}}! を入れると + 上記種類の文字は欧文フォントを用いて組まれるようになる. + 詳しい説明は\ref{ssec-setrange}節を参照してほしい. +% +%<*en> \item \LuaTeX-ja is very slower than \pTeX. Generally speaking, LuaJIT\TeX\ processes \LuaTeX-ja about 30\% faster than \LuaTeX, but not always. @@ -753,9 +769,10 @@ about 30\% faster than \LuaTeX, but not always. LuaJIT\TeX を用いると\LuaTeX のだいたい1.3倍の速度で動くようであるが, IPA mj明朝などの大きいフォントを用いた場合には\LuaTeX よりも遅くなることもある. % + \item% %<*en> -\textbf{Outdated note for MiK\TeX\ users}\quad +\textbf{(Outdated) note for MiK\TeX\ users}\quad \LuaTeX-ja requires that several CMap files% \footnote{\texttt{UniJIS2004-UTF32-\{H,V\}} and \texttt{Adobe-Japan1-UCS2}.} must be found from \LuaTeX. @@ -768,7 +785,7 @@ so you will encounter an error like the following: \LuaTeX-jaが動作するためには,\emph{導入・更新後の初回起動時に} \texttt{UniJIS2004-UTF32-\{H,V\}}, \texttt{Adobe-Japan1-UCS2}という3つのCMapが \LuaTeX によって見つけられることが必要である. -しかしやや古いMiK\TeX ではそのようになっていないので,次のエラーが発生するだろう: +しかし古いバージョンのMiK\TeX ではそのようになっていないので,次のエラーが発生するだろう: % \begin{lstlisting} ! LuaTeX error ...iles (x86)/MiKTeX 2.9/tex/luatex/luatexja/ltj-rmlgbm.lua @@ -777,13 +794,14 @@ bad argument #1 to 'open' (string expected, got nil) %<*en> If so, please execute a batch file which is written on -\href{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29}{ the Project Wiki (English)}. +\href{https://osdn.jp/projects/luatex-ja/wiki/FrontPage%28en%29}{ the Project Wiki (English)}. This batch file creates a temporary directory, copy CMaps in it, -run \LuaTeX-ja in this directory, and finally delete the temporary directory. +run a test file which loads \LuaTeX-ja in this directory, +and finally delete the temporary directory. % %<*ja> そのような場合には, -\href{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29}{% +\href{https://osdn.jp/projects/luatex-ja/wiki/FrontPage%28en%29}{% プロジェクトWiki英語版トップページ}中に書かれているバッチファイルを 実行して欲しい.このバッチファイルは,作業用ディレクトリにCMap達を コピーし,その中で\LuaTeX-ja の初回起動を行い,作業用ディレクトリを消す作業をしている. @@ -1041,14 +1059,14 @@ vertical writing is used: % \begin{lstlisting} ! Incompatible direction list can't be unboxed. -\@begindvi ->\unvbox \@begindvibox - \global \let \@begindvi \@empty +\@begindvi ->\unvbox \@begindvibox + \global \let \@begindvi \@empty \end{lstlisting} %<*en> Now, \LuaTeX-ja automatically applies the patch \Pkg{lltjp-geometry} to the \Pkg{geometry} package, when the direction of the document is \emph{tate} (vertical writing). -This patch \Pkg{lltjp-geometry} also can be used in \pLaTeX; for the detail, please refer +This patch \Pkg{lltjp-geometry} also can be used in \pLaTeX; for the detail, please refer \url{lltjp-geometry.pdf}~(Japanese). % %<*ja> @@ -1381,7 +1399,7 @@ package with several options. This package provides functions in a part of \item[fontspec] %<*en> -With this option, Japanese fonts are selected using functionality of +With this option, Japanese fonts are selected using functionality of the \Pkg{luatexja-fontspec} package. This means that the \Pkg{fontspec} package is automatically loaded by this package. \emph{This option is enabled by default.} @@ -1817,7 +1835,7 @@ are internally specified by: Under \pLaTeX, \Pkg{japanese-otf} package (developed by Shuzaburo Saito) is used for typesetting characters which is in Adobe-Japan1-6 CID but not in JIS~X~0208. Since this package is widely used, \LuaTeX-ja -supports some of functions in the \Pkg{japanese-otf} package, +supports some of functions in the \Pkg{japanese-otf} package, as an external package \Pkg{luatexja-otf}. % %<*ja> @@ -1928,8 +1946,8 @@ parameters, you have to use commands \cs{ltjsetparameter} and 用いる. % -%\subsection{Editing the Range of \textbf{JAchar}s} -%\subsection{\textbf{JAchar}の範囲の設定} +%\subsection{Range of \textbf{JAchar}s} +%\subsection{\textbf{JAchar}の範囲} \label{ssec-setrange} %<*en> @@ -2515,13 +2533,13 @@ $\Phi\vdash F(x)\ \hbox{for all}\ x\in A$ \subsection{\emph{kinsoku} parameters and OpenType features} Among parameters which related to Japanese word-wrapping process (\emph{kinsoku shori}), \begin{quote} - \Param{jaxspmode},~\Param{alxspmode}, \Param{prebreakpenalty}, + \Param{jaxspmode},~\Param{alxspmode}, \Param{prebreakpenalty}, \Param{postbreakpenalty}~and~\Param{kcatcode} \end{quote} are stored by each character codes. ... For example, a fullwidth katakana ``ア'' on line~10 in the below input is replaced to -its halfwidth variant ``ア'', by \verb+hwid+ feature. +its halfwidth variant ``ア'', by \verb+hwid+ feature. However, the penalty inserted after it is 10 which is the \Param{postbreakpenalty} of ``ア'', not 20. % @@ -3753,7 +3771,7 @@ letter-spacing and the width of italic correction are not correct: 但し,以下の例の3行目に示すように,明示的に \texttt{vert}, \texttt{vrt2}(のいずれか)の 有効・無効を指定した場合は別である. \begin{lstlisting} -\tfont\S=file:KozMinPr6N-Regular.otf:jfm=ujisv +\tfont\S=file:KozMinPr6N-Regular.otf:jfm=ujisv % vert and vrt2 are automatically activated \tfont\T=file:KozMinPr6N-Regular.otf:jfm=ujisv;-vert % vert and vrt2 are not activated \end{lstlisting} @@ -4723,7 +4741,7 @@ glueであれば,\texttt{[$j$]=\{false, , , \}} で \end{itemize} \item[ascent\textrm{, }descent] …… -\item[chars\_cbcache] +\item[chars\_cbcache] …… \end{cslist} % @@ -5379,7 +5397,7 @@ The correct way is using a temporary register. \ltjsetparameter{kanjiskip=0\zw plus .1\zw minus .01\zw} \@tempskipa=\ltjgetparameter{xkanjiskip} \ifdim\@tempskipa>\z@ - \if@slide + \if@slide \ltjsetparameter{xkanjiskip=0.1em} \else \ltjsetparameter{xkanjiskip=0.25em plus 0.15em minus 0.06em} @@ -5399,7 +5417,7 @@ The correct way is using a temporary register. \ltjsetkanjiskip{\z@ plus .1\zw minus .01\zw} \@tempskipa=\ltjgetparameter{xkanjiskip} \ifdim\@tempskipa>\z@ - \if@slide + \if@slide \ltjsetxkanjiskip.1em \else \ltjsetxkanjiskip.25em plus .15em minus .06em @@ -5434,7 +5452,7 @@ The correct way is using a temporary register. さて,縦組の欧文ベースライン補正量\Param{talbaselineshift}は, 実際には \cs{ltj@tablshift} という属性レジスタに格納されている (\ref{sec-para}\nobreak 節参照).属性レジスタは長さではなく整数値を格納する\footnote{% - 従って,\texttt{\textbackslash @savetbaselineshift=\textbackslash ltj@tablshift}\ + 従って,\texttt{\textbackslash @savetbaselineshift=\textbackslash ltj@tablshift}\ のように記述することはできない.属性レジスタを \cs{tbaselineshift} という名称にしなかっ たのはそのためである. }ものであり,\cs{ltj@tablshift} は補正量を sp 単位で保持することから, @@ -6046,7 +6064,7 @@ will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}. \item[TateFeatures=\{\}\textrm{, }TateFont=] %<*en> The \texttt{TateFeatures} key specifies font features which are only turned~on in -vertical writing, such as \texttt{Style=VerticalKana}~(\texttt{vkna} feature). +vertical writing, such as \texttt{Style=VerticalKana}~(\texttt{vkna} feature). Similarly, the \texttt{TateFont} key specifies the Japanese font which will be used only in vertical writing. A demonstrarion is shown in Figure~\ref{fig:yokotate-fontspec}. @@ -8327,10 +8345,10 @@ $\mathit{Nq}.\mathit{tail}$は無意味なので, 仮想ボディの高さ$h$,深さ$d$については \begin{description} \catcode`\<=12\catcode`\>=12 - \item[$\texttt{yoffset}\geq 0$のとき] -$h = \max(\texttt{height} + \texttt{yoffset}, 0)$, -$d = \max(\texttt{depth} - \texttt{yoffset}, 0)$, - \item[$\texttt{yoffset}<0$のとき] + \item[$\texttt{yoffset}\geq 0$のとき] +$h = \max(\texttt{height} + \texttt{yoffset}, 0)$, +$d = \max(\texttt{depth} - \texttt{yoffset}, 0)$, + \item[$\texttt{yoffset}<0$のとき] $h = \max(\texttt{height} + \texttt{yoffset}, 0)$, $d=\texttt{depth}$. \end{description} という仕様になっている.つまり,\texttt{yoffset} が負(グリフを下ける)の場合に深さは増加しな @@ -8472,9 +8490,9 @@ instead of ``\verb+\ほげ+''. %<*en> \paragraph{Variation selectors} \Pkg{lltjp-listings} add two keys, namely \texttt{vsraw}~and~\texttt{vscmd}, -which specify how variation selectors are treated in +which specify how variation selectors are treated in \texttt{lstlisting} or other enviroments. -Note that these additional keys are not usable in the preamble, +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 @@ -8502,7 +8520,7 @@ variation selectors are ``combined'' with the previous character. \end{lstlisting} \end{LTXexample} %<*en> -\item If the \texttt{vsraw} key is false, then +\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. @@ -9012,7 +9030,7 @@ as in Page~\pageref{para-cid}. This file stores the table which stores the following. \begin{itemize} \item unicode variants in a font ``\texttt{***}'' - \item vertical width of glyphs, if it is not equal to the sum of + \item vertical width of glyphs, if it is not equal to the sum of the height of ascender and the depth of descender \item vertical variants \end{itemize} @@ -9368,7 +9386,7 @@ TUG 2013, October 2013. \bibitem{jlisting} Thor Watanabe. \newblock Listings\ -\ MyTeXpert. %\newblock %\\\null\hfill -\url{http://mytexpert.sourceforge.jp/index.php?Listings} +\url{http://mytexpert.osdn.jp/index.php?Listings} \bibitem{jlreq} W3C Japanese Layout Task Force~(ed). \newblock Requirements for Japanese Text Layout (W3C Working Group Note), 2011, 2012. \newblock \url{http://www.w3.org/TR/jlreq/}%