X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=doc%2Fluatexja.dtx;h=1c306990f4182d295c57ff5a1b44f33a0c03fdfb;hb=f4648633114b448dadb484b114606ac663073819;hp=04a3243bee994e2800a1edeecd0f5982942c7cd2;hpb=c5aff528b17507167bf54f78c788c0b798e5ec1f;p=luatex-ja%2Fluatexja.git diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index 04a3243..1c30699 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -29,22 +29,22 @@ \usepackage[kozuka-pr6n]{luatexja-preset} \usepackage{unicode-math} \setmainfont[Ligatures=TeX]{Linux Libertine O} -\setsansfont[Scale=0.95,Ligatures=TeX]{TeX Gyre Heros} \setmonofont[Scale=MatchLowercase, ItalicFont=lmmono10-italic.otf, BoldFont=lmmonolt10-bold.otf, BoldItalicFont=lmmonolt10-boldoblique.otf ]{lmmono10-regular.otf} \setmonojfont{KozGoPr6N-Regular.otf} \setmathfont[Scale=MatchLowercase]{xits-math.otf} +\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Linux Biolinum O} %<*ja> \def\emph#1{\textbf{\textgt{#1}}} \def\headfont{\normalfont\bfseries\gtfamily}\normalsize % -%\frenchspacing - %<*en> +\frenchspacing \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}% @@ -78,6 +78,7 @@ explpreset={numberstyle=\tiny, numbers=left, numbersep=1em, columns=fixed} } % Suppress output from showexpl to stdout. +\makeatletter \let\SX@Info\relax %%%%%%%% colors @@ -157,7 +158,7 @@ \vskip\belowcaptionskip} \def\_{\leavevmode \kern .06em\vbox {\hrule \@width .333em}} -\def\cs#1{\texttt{\upshape\textbackslash #1}} +\def\cs#1{\texttt{\upshape\textbackslash\ltjsetparameter{autoxspacing=false}#1}} %%%%%%%% \makeatother @@ -275,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}. @@ -301,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> @@ -314,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} @@ -324,9 +325,9 @@ 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. +As shown above, they are changed by \cs{zw}~and~\cs{zh} respectively, in \LuaTeX-ja. % %<*ja> 特に注意してほしいのは,\pTeX で追加された \texttt{zw} と \texttt{zh} という単位を @@ -365,9 +366,9 @@ The insertion process of glues/kerns between two Japanese \begin{itemize} %<*en> -\item As \LuaTeX's internal ligature handling is ``node-based'' +\item As \LuaTeX's internal ligature handling is \emph{node-based} (\textit{e.g.}, \verb+of{}fice+ doesn't prevent ligatures), the - insertion process of \textbf{JAglue} is now ``node-based''. + insertion process of \textbf{JAglue} is now \emph{node-based}. % %<*ja> \item \LuaTeX の内部での合字の扱いは「ノード」を単位として行われるようになっている(例えば, @@ -419,17 +420,17 @@ 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 のコールバックや実装により,特に異なった組方向のボックスを扱う場合には -\cs{wd}, \cs{ht}, \cs{dp}等の仕様が異なるので注意.詳細は第\ref{sec-direction}節を参照. +\cs{wd}, \cs{ht}, \cs{dp}等の仕様が異なるので注意.詳細は第\ref{sec-direction}章を参照. % %<*en> @@ -520,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{開発メンバー}\ @@ -565,23 +566,24 @@ and \emph{Japanese fonts} for fonts used in \textbf{JAchar}. %\subsection{インストール} %The following packages are needed for the \LuaTeX-ja\ package. -%\LuaTeX-jaパッケージには,次のパッケージ類が必要である. +%\LuaTeX-jaパッケージの動作には次のパッケージ類が必要である. \begin{itemize} \item \LuaTeX\ beta-0.80.0 (or later) \item \Pkg{luaotfload} v2.5 (or later) \item \Pkg{adobemapping} (Adobe cmap and pdfmapping files) \item \Pkg{everysel} (if you want to use \LuaTeX-ja with \LaTeXe) -%\item \emph{IPAex fonts}(\url{http://ipafont.ipa.go.jp/}) +\item \Pkg{fontspec} v2.4 +%\item \emph{IPAex fonts} (\url{http://ipafont.ipa.go.jp/}) %\item \emph{IPAexフォント(\url{http://ipafont.ipa.go.jp/})} \end{itemize} +%In summary, this version of \LuaTeX-ja no longer supports \TeX~Live~2014 (or older version). +%<*ja> +要約すると,本バージョンの\LuaTeX-jaは\TeX~Live~2014以前では動作しない\footnote{% + もっとも,自分で\LuaTeX のバイナリをSubversionリポジトリからビルドしていれば話は別である. +}. +% %<*en> -\emph{This version of \LuaTeX-ja no longer supports \TeX~Live~2013 (or older version). -If you want to use this version with \TeX~Live~2014, you have to build a development -version of \LuaTeX\ from its source.} - -\medskip - Now \LuaTeX-ja is available from CTAN (in the \texttt{macros/luatex/generic/luatexja} directory), and the following distributions: @@ -593,11 +595,6 @@ the following distributions: IPAex fonts are also available in these distributions. % %<*ja> -\emph{本バージョンの\LuaTeX-jaは\TeX~Live~2013以前では動作しない.\TeX~Live~2014で -用いたい場合は,自力で\LuaTeX 開発版をソースからビルドする必要がある.} - -\medskip - 現在,\LuaTeX-jaはCTAN (\texttt{macros/luatex/generic/luatexja})に収録されている他, 以下のディストリビューションにも収録されている: \begin{itemize} @@ -635,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} @@ -653,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内のアーカイブも)はたまにしか更新されないことに注意. @@ -694,9 +691,11 @@ $ lualatex ltjltxdoc.ins $ luatex ltj-kinsoku_make.tex \end{lstlisting} %<*en> -Note that \texttt{*.\{dtx,ins\}} and \texttt{ltj-kinsoku\_make.tex} are not needed in regular use. +\emph{Do not forget The last line (processing \texttt{ltj-kinsoku\_make.tex})}. +\texttt{*.\{dtx,ins\}} and \texttt{ltj-kinsoku\_make.tex} used here are not needed in regular use. % %<*ja> +\emph{最後の \texttt{ltj-kinsoku\_make.tex} の実行を忘れないように注意}. ここで使用した \texttt{*.\{dtx,ins\}} と \texttt{ltj-kinsoku\_make.tex} は 通常の使用にあたっては必要ない. % @@ -723,7 +722,7 @@ Note that \texttt{*.\{dtx,ins\}} and \texttt{ltj-kinsoku\_make.tex} are not need \item If \texttt{mktexlsr} is needed to update the file name database, make it so. % %<*ja> -\item 必要があれば,\texttt{mktexlsr}を実行する. +\item 必要があれば,\texttt{mktexlsr} を実行する. % \end{enumerate} @@ -746,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. @@ -756,9 +769,10 @@ about 30\% faster than \LuaTeX, but not always. LuaJIT\TeX を用いると\LuaTeX のだいたい1.3倍の速度で動くようであるが, IPA mj明朝などの大きいフォントを用いた場合には\LuaTeX よりも遅くなることもある. % + \item% %<*en> -\textbf{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. @@ -771,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 @@ -780,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 の初回起動を行い,作業用ディレクトリを消す作業をしている. @@ -813,7 +828,7 @@ run \LuaTeX-ja in this directory, and finally delete the temporary directory. \begin{tabular}{cccccc} \toprule \textbf{direction}& -\textbf{classification}&\textbf{font name}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule +\textbf{classification}&\textbf{font name}&\bf ``10\,pt''&\bf``7\,pt''&\bf``5\,pt''\\\midrule \smash{\raisebox{-1ex}{\emph{yoko} (horizontal)}}& \emph{mincho}&IPAex Mincho&\cs{tenmin}&\cs{sevenmin}&\cs{fivemin}\\ &\emph{gothic}&IPAex Gothic&\cs{tengt} &\cs{sevengt} &\cs{fivegt}\\ @@ -830,7 +845,7 @@ run \LuaTeX-ja in this directory, and finally delete the temporary directory. \begin{center}\small \begin{tabular}{cccccc} \toprule -\emph{組方向}&\emph{字体}&\emph{フォント名}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule +\emph{組方向}&\emph{字体}&\emph{フォント名}&\bf ``10\,pt''&\bf``7\,pt''&\bf``5\,pt''\\\midrule \smash{\raisebox{-1ex}{横組}}& 明朝体&IPAex明朝&\cs{tenmin}&\cs{sevenmin}&\cs{fivemin}\\ &ゴシック体&IPAexゴシック&\cs{tengt} &\cs{sevengt} &\cs{fivegt}\\ @@ -1044,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> @@ -1090,13 +1105,12 @@ For \LaTeXe, \LuaTeX-ja adopted most of the font selection system of \pLaTeXe\ ( % \begin{itemize} %<*en> -\item Commands \cs{fontfamily}, \cs{fontseries}, - \cs{fontshape}, and \cs{selectfont} can be used to change +\item Commands \cs{fontfamily}, \cs{fontseries}, and \cs{fontshape} can be used to change attributes of Japanese fonts. % %<*ja> -\item 和文フォントの属性を変更するには,\cs{fontfamily}, \cs{fontseries}, \cs{fontshape}, - そしてそれらを反映させるために \cs{selectfont} を用いればよい. +\item 和文フォントの属性を変更するには,\cs{fontfamily}, \cs{fontseries}, \cs{fontshape} を使用する. + もちろん,それらを実際に反映させるには手動で \cs{selectfont} を実行する必要がある. % %<*en> @@ -1138,7 +1152,7 @@ auto select&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\ \verb+\fontencoding{+\verb+}+ changes the encoding of alphabetic fonts or Japanese fonts depending on the argument. For example, \verb+\fontencoding{JY3}+ changes the encoding of Japanese fonts to - \texttt{JY3},and \verb+\fontencoding{T1}+ changes the encoding of + \texttt{JY3}, and \verb+\fontencoding{T1}+ changes the encoding of alphabetic fonts to \texttt{T1}. \cs{fontfamily} also changes the current Japanese font family, the current alphabetic font family, \emph{or both}. @@ -1157,14 +1171,16 @@ auto select&\cs{fontencoding}&\cs{fontfamily}&---&---&\cs{usefont}\\ %<*en> \item For defining a Japanese font family, use \cs{DeclareKanjiFamily} instead of - \cs{DeclareFontFamily}. However, in the present implementation, - using \cs{DeclareFontFamily} doesn't cause any problem. + \cs{DeclareFontFamily}. (In previous version of \LuaTeX-ja, + using \cs{DeclareFontFamily} didn't cause any problem. But this no longer applies + the current version.) \item Defining a Japanese font shape can be done by usual \cs{DeclareFontShape}: % %<*ja> \item 和文フォントファミリの定義には \cs{DeclareFontFamily} の - 代わりに \cs{DeclareKanjiFamily} を用いる.しかし,現在の - 実装では \cs{DeclareFontFamily} を用いても問題は生じない. + 代わりに \cs{DeclareKanjiFamily} を用いる.以前の + 実装では \cs{DeclareFontFamily} を用いても問題は生じなかったが,現在の実装では + そうはいかない. \item 和文フォントのシェイプを定義するには,通常の \cs{DeclareFontShape} を使えば良い: % \begin{lstlisting} @@ -1384,7 +1400,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.} @@ -1408,16 +1424,33 @@ before \Pkg{luatexja-preset}: \end{lstlisting} \item[nfssonly] +%<*en> +With this option,selecting Japanese fonts won't be performed using the functionality of + the \Pkg{fontspec} package, but only standard NFSS2. + +This option will be disabled when \Pkg{luatexja-fontspec} package is loaded. +Note that the \Pkg{fontspec} can coexist with the option as the following: +\begin{lstlisting} +\usepackage{fontspec} +\usepackage[hiragino-pron,nfssonly]{luatexja-preset} +\end{lstlisting} +Note that the functionality of the \Pkg{luatexja-fontspec} package, such as + \cs{setmainjfont}, cannot be used in the example above. +% %<*ja> \LaTeX 標準のフォント選択機構(NFSS2)を用いて \texttt{ltjpm}(明朝),\texttt{ltjpg}(ゴシック),それに後に述べる \texttt{deluxe} オプ ションが指定された場合には \texttt{ltjpmg}(丸ゴシック)という 3つの和文フォントファミリを定義し,これらを用いる. -このオプションは,単に和文フォントを選択できればよく,\Pkg{fontspec}パッケージの機能を全く使わない -場合のみ指定すべきである.パッケージ読み込み時に既に\Pkg{fontspec}パッケージが読み込まれて - いた場合は無視される. - +欧文フォントの指定で\Pkg{fontspec}パッケージを読み込んでいる場合でも +\begin{lstlisting} +\usepackage{fontspec} +\usepackage[hiragino-pron,nfssonly]{luatexja-preset} +\end{lstlisting} +のようにこのオプションを指定することは可能である.一方, +パッケージ読み込み時に既に\Pkg{luatexja-fontspec}パッケージが読み込まれて + いる場合は \texttt{nfssonly} オプションは無視される. % \item[nodeluxe] @@ -1442,23 +1475,32 @@ Use \textit{mincho} with two weights (medium~and~bold), because \textit{rounded gothic} is called \textit{maru gothic} (丸ゴシック) in Japanese.}. The heavy weight of \textit{gothic} can be used by ``changing the family'' \cs{gtebfamily}, or \verb+\textgteb{...}+. -This is because \Pkg{fontspec} package can handle only medium (\cs{mdseries}) and +This is because the \Pkg{fontspec} package can handle only medium (\cs{mdseries}) and bold (\cs{bfseries}). % %<*ja> 明朝体2ウェイト・ゴシック体3ウェイトと, 丸ゴシック体 (\cs{mgfamily}, \verb+\textmg{...}+) を使用可能とする. -ゴシック体は細字・太字・極太の3ウェイトがあるが, -極太ゴシック体はファミリの切り替え (\cs{gtebfamily}, \verb+\textgteb{...}+) % -で実現している.\Pkg{fontspec}では通常 (\cs{mdseries}) と太字 (\cs{bfseries}) しか扱えないために -このような中途半端な実装になっている. +ゴシック体は中字・太字・極太の3ウェイトがあるが, +極太ゴシック体を使う場合, +\begin{itemize} + \item \cs{gtebfamily}, \verb+\textgteb{...}+ + \item \cs{ebseries} (周囲がゴシック体のとき,\texttt{nfssonly} オプション指定時のみ) +\end{itemize} +のいずれかを用いる.標準で \cs{ebseries} が準備されていないのは,バージョンが古い +\Pkg{fontspec}では中字(\cs{mdseries})と太字(\cs{bfseries})しか扱えなかった名残である. % \item[expert] %<*en> Use horizontal/vertical kana alternates, and define a command \cs{rubyfamily} to use kana characters designed for ruby. % -%横組・縦組専用仮名を用いる.また,\cs{rubyfamily} でルビ用仮名が使用可能となる. +%<*ja> +横組・縦組専用仮名を用いる.また,\cs{rubyfamily} でルビ用仮名が使用可能となる\footnote{% + \cs{rubyfamily}とはいいつつ,実際にはフォントファミリを切り替えるのではない(通常では + font featureの追加,\texttt{nfssonly} 指定時にはシェイプを \texttt{rb} に切り替え). +}. +% \item[bold] %Substitute bold series of \textit{gothic} for bold series of \textit{mincho}. %「明朝の太字」をゴシック体の太字によって代替する. @@ -1501,7 +1543,7 @@ In following tables, starred fonts (e.g.~KozGo\dots-Regular) are used for medium \texttt{morisawa-pro}, \texttt{morisawa-pr6n}以外はフォントの指定は (ファイル名でなく)フォント名で行われる. 以下の表において,*\,つきのフォント(e,g,~KozGo\dots-Regular)は,\emph{\texttt{deluxe}オプション指定時に} -ゴシック体細字として用いられるものを示している. +ゴシック体中字として用いられるものを示している. % \begin{cslist}[style=standard] \item[kozuka-pro] Kozuka Pro (Adobe-Japan1-4) fonts. @@ -1582,7 +1624,7 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \midrule %\textit{rounded gothic} %\gt 丸ゴシック -&&Hiragino~Maru~Gothic~ProN~W4&Hiragino~Maru~Gothic~ProN~W4\\ +&&Hiragino~Maru~Gothic~Pro~W4&Hiragino~Maru~Gothic~ProN~W4\\ \bottomrule \end{tabular} \end{center} @@ -1647,18 +1689,46 @@ Std/StdNフォントであり,その他はAdobe-Japan1-5対応である. \end{tabular} \end{center} + \item[moga-mobo] MogaMincho, MogaGothic, and MoboGothic. +%These fonts can be downloaded from\\\hfill \url{http://yozvox.web.fc2.com/}. +%これらのフォントは \url{http://yozvox.web.fc2.com/} からダウンロードできる. + +\begin{center}\small +\begin{tabular}{clll} +\toprule +\bf family&\bf series&\bf default, \texttt{90jis}~option&\bf \texttt{jis2004} option\\ +\midrule + &medium&Moga90Mincho&MogaMincho\\ +%\smash{\raisebox{1.5ex}{\textit{mincho}}}% +%\smash{\raisebox{1.5ex}{\gt 明朝}}% + &bold&Moga90Mincho Bold&MogaMincho Bold\\ +\midrule + &&Moga90Gothic&MogaGothic\\ + &\smash{\raisebox{1.5ex}{medium}} + &Moga90Gothic&MogaGothic\\ +\cmidrule(l){2-4} +%\textit{gothic}% +%\gt ゴシック + &bold&Moga90Gothic Bold&MogaGothic Bold\\ + &heavy&Moga90Gothic Bold&MogaGothic Bold\\ +\midrule +%\textit{rounded gothic} +%\gt 丸ゴシック +&&Mobo90Gothic&MoboGothic\\ +\bottomrule +\end{tabular} +\end{center} + + \end{cslist} %\paragraph{Presets for single weight} %\paragraph{単ウェイト用プリセット一覧} %<*en> Next, we describe settings for using only single weight. -In four settings below, we use same fonts for medium and bold (and heavy) weights. -(Hence \verb+\mcfamily\bfseries+ and \verb+\mcfamily\mdseries+ yields same Japanese fonts, -even if \texttt{deluxe} option is also specified). % %<*ja> -次に,単ウェイト用の設定を述べる.この4設定では「細字」「太字」の区別はない. -また,丸ゴシック体はゴシック体と同じフォントを用いる. +次に,単ウェイト用の設定を述べる.この4設定では +明朝体太字・丸ゴシック体はゴシック体と同じフォントが用いられる. % \par\nobreak\medskip {\centering\small @@ -1717,11 +1787,11 @@ We can use HG~fonts bundled with Microsoft~Office for realizing multiple weights \multicolumn{3}{c}{HG Maru Gothic PRO}\\ % %<*ja> -\gtfamily 明朝体細字 +\gtfamily 明朝体中字 &IPA明朝&IPAex明朝&MS明朝\\\midrule \gtfamily 明朝体太字& \multicolumn{3}{c}{HG明朝E}\\\midrule -\gtfamily ゴシック体細字\\ +\gtfamily ゴシック体中字\\  単ウェイト時 &IPAゴシック&IPAexゴシック&MSゴシック\\  {\tt jis2004}指定時 @@ -1766,16 +1836,15 @@ 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 \Pkg{japanese-otf} package. -If you want to use these functions, load \Pkg{luatexja-otf} package. +supports some of functions in the \Pkg{japanese-otf} package, +as an external package \Pkg{luatexja-otf}. % %<*ja> \subsection{\cs{CID}, \cs{UTF}と\Pkg{otf}パッケージのマクロ} \pLaTeX では,JIS~X~0208にないAdobe-Japan1-6の文字を出力するために, 齋藤修三郎氏による\Pkg{otf}パッケージが用いられていた.このパッケージは 広く用いられているため,\LuaTeX-jaにおいても\Pkg{otf}パッケージの機能の -一部をサポートしている.これらの機能を用いるためには\Pkg{luatexja-otf}パッケージ -を読み込めばよい. +一部を(\Pkg{luatexja-otf}という別のパッケージとして)実装した. % \begin{LTXexample} @@ -1792,7 +1861,7 @@ If you want to use these functions, load \Pkg{luatexja-otf} package. %<*ja> \Pkg{otf}パッケージでは,それぞれ次のようなオプションが存在した: \begin{cslist} -\item[deluxe] 明朝体・ゴシック体各2ウェイトと,丸ゴシック体を扱えるようになる. +\item[deluxe] 明朝体・ゴシック体各3ウェイトと,丸ゴシック体を扱えるようになる. \item[expert] 仮名が横組・縦組専用のものに切り替わり,ルビ用仮名も \ \cs{rubyfamily}\ によって扱えるようになる. \item[bold] ゴシック体を標準で太いウェイトのものに設定する. @@ -1861,11 +1930,11 @@ Ryumin-Light, GothicBBB-Mediumという名前の非埋込フォントを用い % -%\section{Changing Parameters} +%\section{Changing Internal Parameters} %\section{パラメータの変更} %<*en> -There are many parameters in \LuaTeX-ja. And due to the behavior of \LuaTeX, +There are many internal parameters in \LuaTeX-ja. And due to the behavior of \LuaTeX, most of them are not stored as internal register of \TeX, but as an original storage system in \LuaTeX-ja. Hence, to assign or acquire those parameters, you have to use commands \cs{ltjsetparameter} and @@ -1878,8 +1947,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> @@ -2164,11 +2233,11 @@ The block list is indicated in Table~\ref{table-rng7}. \begin{itemize} %<*en> \item Glues/kerns specified in JFM. If \cs{inhibitglue} is issued - around a Japanese character, this glue will not be inserted at the + around a \textbf{JAchar}, this glue will not be inserted at the place. % %<*ja> -\item JFMで指定されたグルー/カーン.もし \cs{inhibitglue} が和文文字の周りで +\item JFMで指定されたグルー/カーン.もし \cs{inhibitglue} が\textbf{JAchar}の周りで 発行されていれば,このグルーは挿入されない. % %<*en> @@ -2387,18 +2456,20 @@ xyz漢字 %<*en> Note that setting positive \Param{yalbaselineshift}~or~\Param{talbaselineshift} -parameters does not increase the depth of one-letter ``syllable'' $p$ of \textbf{Alchar}, if +parameters does not increase the depth of one-letter \emph{syllable} $p$ of \textbf{Alchar}, if its left-protrusion~(\cs{lpcode}) and right-protrusion~(\cs{rpcode}) are both non-zero. This is because \begin{itemize} -\item These two parameters are implemented by setting yoffset field of a +\item These two parameters are implemented by setting \texttt{yoffset} field of a glyph node, and this does not increase the depth of the glyph. \item To cope with the above situation, \LuaTeX-ja automatically supplies -a rule in every ``syllable''. -\item However, we cannot use this ``supplying a rule'' method if \dots +a rule in every syllable. +\item However, we cannot use this ``supplying a rule'' method if a syllable comprises just + one letter whose \cs{lpcode}~and~\cs{rpcode} are both non-zero. \end{itemize} -This problem does not apply for \Param{yjabaselineshift}~nor~\Param{tjabaselineshift}. +This problem does not apply for \Param{yjabaselineshift}~nor~\Param{tjabaselineshift}, +becuse a \emph{JAchar} is encapsulated by a horizontal box if needed. % %<*ja> なお,以下の場合には1文字の\textbf{ALchar}からなる「音節」の深さは増加しないことに注意. @@ -2407,6 +2478,7 @@ This problem does not apply for \Param{yjabaselineshift}~nor~\Param{tjabaselines \item 「音節」を構成する唯一の文字$p$の 左余白への突出量(\cs{lpcode}),右余白への突出量(\cs{rpcode})がどちらも非零である. \end{itemize} +\emph{JAchar}は必要に応じて1文字ずつボックスにカプセル化されるため, \Param{yjabaselineshift},~\Param{tjabaselineshift}パラメータについてはこのような問題は起こらない. % @@ -2462,13 +2534,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. % @@ -2590,7 +2662,7 @@ and \LuaTeX-ja can control these four kinds separately: \begin{itemize} \item \emph{Distinction between \textbf{JAchar} or \textbf{ALchar}} -is controlled by using the character range, see Subsection~\ref{ssec-setrange}. +is controlled by the character range, see Subsection~\ref{ssec-setrange}. \item \emph{Whether the character can be used in a control word} is controlled by setting \cs{catcode} to 11~(enabled) or 12~(disabled), as usual. @@ -2598,7 +2670,7 @@ is controlled by setting \cs{catcode} to 11~(enabled) or 12~(disabled), as usual \emph{Whether \Param{jcharwidowpenalty} can be inserted before the character} is controlled by the lowermost bit of the \Param{kcatcode} parameter. \item -\emph{Ignoring linebreak after a \textbf{JAchar}} is always ignored. +\emph{Linebreak after a \textbf{JAchar}} does not produce a space. \end{itemize} % %<*ja> @@ -2612,25 +2684,26 @@ is controlled by the lowermost bit of the \Param{kcatcode} parameter. \LuaTeX 自身の \cs{catcode} でよい \item[\Param{jcharwidowpenalty}が挿入可か] \Param{kcatcode}パラメータの最下位ビット - \item[直後の改行の無視] -日本語しか想定していないので\textbf{JAchar}については一律有効 + \item[直後の改行] +日本語しか想定していないので,\textbf{JAchar}直後の改行で半角スペースが挿入されることはない. \end{description} % %<*en> -Default setting of \cs{catcode} of \LuaTeX\ can be found -in \texttt{luatex-unicode-letters.tex}, -which is based on \texttt{unicode-letters.tex} (for \XeTeX). +Default setting of \cs{catcode} of Unicode characters are located in +\begin{description} + \item[plain \LuaTeX] \texttt{luatex-unicode-letters.tex}, which is based on \texttt{unicode-letters.tex} +(for \XeTeX). + \item[\LuaLaTeX] now included in \LaTeX\ kernel as~\texttt{unicode-letters.def}. +\end{description} However, the default setting of \cs{catcode} differs between \XeTeX\ and \LuaTeX, by the following reasons: \begin{itemize} - \item \texttt{luatex-unicode-letters.tex} is based on old \texttt{unicode-letters.tex}. - \item The latter half of \texttt{unicode-letters.tex} sets -\cs{catcode} of Kanji and kana characters to 11, -via setting \cs{XeTeXcharclass}. + \item (plain format) \texttt{luatex-unicode-letters.tex} is based on old \texttt{unicode-letters.tex}. + \item The latter half of \texttt{unicode-letters.tex}~and~\texttt{unicode-letters.def} +sets\cs{catcode} of Kanji and kana characters to 11, via setting \cs{XeTeXcharclass}. -However, this latter half is simply omitted in -\texttt{luatex-unicode-letters.tex}, hence +However, this latter half does not exist (plain case), or not executed (\LaTeX~case) in \LuaTeX, hence \cs{catcode} of Kanji and kana characters remains 12 in \LuaTeX. \end{itemize} In other words, Kanji nor kana characters cannot be used in @@ -2645,21 +2718,25 @@ for \LuaTeX, \emph{to match the \cs{catcode} setting with that of \XeTeX.} %<*ja> ネイティブにUnicode全部の文字を扱える\XeTeX や\LuaTeX では, 文字が制御綴内で使用できるかは通常の欧文文字と同じく \cs{catcode} -で指定することとなる.\XeTeX における \cs{catcode} の初期設定は\ -\texttt{unicode-letters.tex} 中に記述されており,\LuaTeX ではそれを +で指定することとなる.plain \XeTeX における \cs{catcode} の初期設定は\ +\texttt{unicode-letters.tex} 中に記述されており,plain \LuaTeX ではそれを 元にした \texttt{luatex-unicode-letters.tex} を用いている. +\LaTeX では \cs{catcode} の設定はカーネルに \texttt{unicode-letters.def} として統合され. +このファイルを\XeLaTeX, \LuaLaTeX の両方が用いている. + だが,\XeTeX における \cs{catcode} の初期設定と \LuaTeX におけるそれは一致していない: \begin{itemize} \item \texttt{luatex-unicode-letters.tex} の元になった\ \texttt{unicode-letters.tex} が古い - \item \texttt{unicode-letters.tex} の後半部では + \item \texttt{unicode-letters.tex} 後半部や \texttt{unicode-letters.def} 後半部では \cs{XeTeXcharclass} の設定を行なっており, それによって漢字や仮名の \cs{catcode} が11に設定されている. しかし,\texttt{luatex-unicode-letters.tex} ではこの「後半部」が -まるごと省略されており,漢字や仮名の \cs{catcode} は12のまま. +まるごと省略されており,また\LuaLaTeX でも \texttt{unicode-letters.def} 後半部は実行されな + い.従って漢字や仮名の \cs{catcode} は12のままになっている. \end{itemize} 言い換えると,\LuaTeX の初期状態では漢字や仮名を制御綴内に 使用することはできない. @@ -2739,8 +2816,6 @@ which can be used in a control word differ in \pTeX, in \upTeX,~and~in \LuaTeX-j Table~\ref{table-kcat-diff} shows the difference. Except for four characters ``・'',~``゛'', ``゜'',~``゠'', \LuaTeX-ja admits more characters in a control word than \upTeX. -\emph{Note that the ideographic space~\texttt{U+3000} can be used -in a control word in \LuaTeX-ja.} Difference becomes larger, if we consider non-kanji JIS~X~0213 characters. @@ -3167,7 +3242,7 @@ The following is an example. \item[\cs{ltjsetwd}=\textrm{, }\cs{ltjsetht}=\textrm{, }% \cs{ltjsetdp}=] -These commands set the dimension of \cs{box}. Unlike \cs{ltjgetwd}, one does not need +These commands set the dimension of \cs{box}. One does not need to group the argument ; four calls of \cs{ltjsetwd} below have the same meaning. \begin{lstlisting} \ltjsetwd42 20pt, \ltjsetwd42=20pt, \ltjsetwd=42 20pt, \ltjsetwd=42=20pt @@ -3240,7 +3315,7 @@ These commands set the dimension of \cs{box}. Unlike \cs{ltjgetwd}, one doe %<*en> \subsection{Getting current direction} The \Param{direction} parameter returns the current direction, and -the \Param{boxdir} parameter (with the argumant ) +the \Param{boxdir} parameter (with the argument ) returns the direction of a box register \cs{box}. The returned value of these parameters are a \emph{string}: \begin{center} @@ -3697,7 +3772,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} @@ -4387,7 +4462,7 @@ The following is the list of imaginary characters: \item['jcharbdd'] %A boundary between \textbf{JAchar} and anything else (such as \textbf{ALchar}, kern, glue,\,\ldots). -%和文文字と「その他のもの」(欧文文字,glue,kern等)との境界. +%\textbf{JAchar}と「その他のもの」(欧文文字,glue,kern等)との境界. \item[$-1$] %The left/right boundary of an inline math formula. @@ -4607,7 +4682,7 @@ For $i\in\omega$, \texttt{char\_type[$i$]} is information of characters whose cl \item \texttt{align} is a number which is determined from \texttt{align}~field in the JFM: \[ \begin{cases} - 0&\text{\texttt{'left'} and the default value}\\0.5&\text{\tt 'middle'}\\1&\text{\tt 'right'} + 0&\text{\texttt{'left'} (default)}\\0.5&\text{\tt 'middle'}\\1&\text{\tt 'right'} \end{cases} \] \item For $j\in \omega$, \texttt{[$j$]} stores a kern or a glue which will be inserted @@ -4667,7 +4742,7 @@ glueであれば,\texttt{[$j$]=\{false, , , \}} で \end{itemize} \item[ascent\textrm{, }descent] …… -\item[chars\_cbcache] +\item[chars\_cbcache] …… \end{cslist} % @@ -4818,8 +4893,7 @@ of \LuaTeX, see Section~\ref{sec-para}. \cs{ltjsetparameter} and \cs{ltjglobalsetparameter} are commands for assigning parameters. These take one argument which is a \texttt{=} list. -The difference between -\cs{ltjsetparameter} and \cs{ltjglobalsetparameter} is only the +The difference between these two commands is the scope of assignment; \cs{ltjsetparameter} does a local assignment and \cs{ltjglobalsetparameter} does a global one. @@ -4828,9 +4902,7 @@ They also obey the value of \cs{globaldefs}, like other assignments. %<*ja> \cs{ltjsetparameter} と \cs{ltjglobalsetparameter} はパラメータを 指定するための命令で,\texttt{=}のリストを -引数としてとる. -\cs{ltjsetparameter} と \cs{ltjglobalsetparameter} の違いはスコープの -違いのみで, +引数としてとる.両者の違いはスコープであり, \cs{ltjsetparameter} はローカルな設定を行うのに対し, \cs{ltjglobalsetparameter} はグローバルな設定を行う. また,他のパラメータ指定と同様に \cs{globaldefs} の値にも従う. @@ -4959,7 +5031,7 @@ to prevent a line ends with this character. \item[\DParam{jaxspmode}\,=\{,\}$^\ast$]\ %<*en> -Setting whether inserting \Param{xkanjiskip} is allowed before/after a \textbf{JAchar} whose character code is . +Set whether inserting \Param{xkanjiskip} is allowed before/after a \textbf{JAchar} whose character code is . The followings are allowed for : % %<*ja> @@ -4987,7 +5059,7 @@ This parameter is similar to the \cs{inhibitxspcode} primitive of \pTeX, but not \item[\DParam{alxspmode}\,=\{,\}$^\ast$] [\cs{xspcode}]\ %<*en> -Setting whether inserting \Param{xkanjiskip} is allowed before/after a +Set whether inserting \Param{xkanjiskip} is allowed before/after a \textbf{ALchar} whose character code is . The followings are allowed for : % @@ -5024,6 +5096,13 @@ Note that parameters \Param{jaxspmode} and \Param{alxspmode} share a common tabl しかし,自然長が \cs{maxdimen} の場合は,例外的に和文フォントのJFM側で指定されている 値を採用(こちらはフォントサイズに比例)することになっている. % +%<*en> +The default glue which inserted between two \textbf{JAchar}s. +Changing current Japanese font does not alter this parameter, as \pTeX. + +If the natural width of this parameter is \cs{maxdimen}, \LuaTeX-ja uses +the value which is specified in the JFM for current Japanese font (See Subsection~\ref{ssec-jfm-str}). +% \item[\DParam{xkanjiskip}\,=$^\ast$] [\cs{xkanjiskip}]\ @@ -5032,6 +5111,14 @@ Note that parameters \Param{jaxspmode} and \Param{alxspmode} share a common tabl \Param{kanjiskip}と同じように,通常ではフォントサイズに比例して変わることはないが, 自然長が \cs{maxdimen} の場合が例外である. % +%<*en> +The default glue which inserted between a \textbf{JAchar} and an + \textbf{ALchar}. +Changing current font does not alter this parameter, as \pTeX. + +As \Param{kanjiskip}, if the natural width of this parameter is \cs{maxdimen}, \LuaTeX-ja uses +the value which is specified in the JFM for current Japanese font (See Subsection~\ref{ssec-jfm-str}). +% \item[\DParam{differentjfm}\,=$^\dagger$]\ @@ -5311,7 +5398,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} @@ -5331,7 +5418,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 @@ -5366,7 +5453,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 単位で保持することから, @@ -5629,18 +5716,18 @@ but on the other hand \cs{zw}~and~\cs{zh} are specified by JFM. \item[\cs{DeclareTateKanjiEncoding}\{\}\{\}\{\}] %<*en> -In NFSS2 under \LuaTeX-ja, distinction between alphabetic font families - and Japanese font families are only made by their - encodings. For example, encodings OT1 and T1 are for - alphabetic font families, and a Japanese font family cannot +In NFSS2 under \LuaTeX-ja, distinction between alphabetic fonts + and Japanese fonts are only made by their + encodings. For example, encodings OT1 and T1 are encodings for + alphabetic fonts, and Japanese fonts cannot have these encodings. These command define a new encoding scheme for Japanese font families. % %<*ja> -\LuaTeX-jaのNFSS2においては,欧文フォントファミリと和文フォントファミリは +\LuaTeX-jaのNFSS2においては,欧文フォントと和文フォントは そのエンコーディングによってのみ区別される. -例えば,OT1とT1のエンコーディングは欧文フォントファミリに対するものであり, -和文フォントファミリはこれらのエンコーディングを持つことはできない. +例えば,OT1とT1のエンコーディングは欧文フォントのエンコーディングであり, +和文フォントはこれらのエンコーディングを持つことはできない. これらコマンドは横組用・縦組用和文フォントのための新しいエンコーディングを それぞれ定義する. % @@ -5657,7 +5744,7 @@ In NFSS2 under \LuaTeX-ja, distinction between alphabetic font families The above 3~commands are just the counterparts for \cs{DeclareFontEncodingDefaults} and~others. % %<*ja> -上記3つのコマンドはちょうど \cs{DeclareFontEncodingDefaults} などに対応するものである. +上記3つのコマンドはちょうどNFSS2 の \cs{DeclareFontEncodingDefaults} などに対応するものである. % \item[\cs{reDeclareMathAlphabet}\{\}\{\}\{\}] @@ -5689,12 +5776,12 @@ The above 3~commands are just the counterparts for \cs{DeclareFontEncodingDefaul \item[\cs{DeclareRelationFont}\{\}\{\}\{\}\{\}\\* \null\hfill\{\}\{\}\{\}\{\}] %<*en> -This command sets the ``accompanied'' alphabetic font family (given by the latter 4~arguments) -with respect to a Japanese font family given by the former 4~arguments. +This command sets the ``accompanied'' alphabetic font (given by the latter 4~arguments) +with respect to a Japanese font given by the former 4~arguments. % %<*ja> -いわゆる「従属欧文」を設定するための命令である.前半の4引数で表される和文フォントファミリに対して, -そのフォントに対応する「従属欧文」のフォントファミリを後半の4引数により与える. +いわゆる「従属欧文」を設定するための命令である.前半の4引数で表される和文フォントに対して, +そのフォントに対応する「従属欧文」のフォントを後半の4引数により与える. % \item[\cs{SetRelationFont}] %<*en> @@ -5717,7 +5804,7 @@ Like \cs{fontfamily}, \cs{selectfont} is required to take an effect. %<*ja> 現在の欧文フォントのエンコーディング/ファミリ/…… を, \cs{DeclareRelationFont} か \cs{SetRelationFont} で指定された -現在の和文フォントファミリに対応する「従属欧文」フォントファミリに変更する. +現在の和文フォントに対応する「従属欧文」フォントに変更する. \cs{fontfamily} のように,有効にするためには \cs{selectfont} が必要である. % @@ -5731,7 +5818,8 @@ to match the vertical center of ``M'' and that of ``あ'' in vertical typesetti + d_{\text{あ}} - d_{\text{M}}, \] where $h_{a}$~and~$d_{a}$ denote the height of ``$a$'' and the depth, respectively. -In \LuaTeX-ja, this \cs{adjustbaseline} does same task. +In \LuaTeX-ja, this \cs{adjustbaseline} does same task, namely setting the + \Param{talbaselineshift} parameter. % %<*ja> \pLaTeXe では,\cs{adjustbaseline} は縦組時に「M」と「あ」の中心線を一致させるために, @@ -5742,73 +5830,154 @@ In \LuaTeX-ja, this \cs{adjustbaseline} does same task. + d_{\text{あ}} - d_{\text{M}}, \] ここで,$h_{a}$,~$d_{a}$はそれぞれ「$a$」の高さ・深さを表す. -\LuaTeX-jaにおいても\cs{adjustbaseline} は同様の処理を行っている. +\LuaTeX-jaにおいても\cs{adjustbaseline} は同様に\Param{talbaselineshift}パラメータの調整処 + 理を行っている. + +同時に,これも\pLaTeXe の \cs{adjustbaseline} で行われていたが, +「漢」の寸法を元に,(本節の最初に述べた,小文字で始まる)\cs{cht}, \cs{cwd} といった長さ変数を設定する. % \item[\cs{fontfamily}\{\}] %<*en> As in \LaTeXe, this command changes current font family (alphabetic, Japanese,~\emph{or both}) -to . Which family will be changed is determined as follows: +to . + +First, Whether Japanese font family will be changed is determined by following conditions. +We use an auxiliary list~$N_{\mathrm{J}}$. % %<*ja> 元々の\LaTeXe におけるものと同様に,このコマンドは現在のフォントファミリ(欧文, 和文,\emph{もしくは両方})をに変更する. -どのファミリが変更されるかは以下のようにして決定される: +まず,和文フォントファミリが変更されるかは以下の順序で決定される. +補助的に「和文フォントファミリではない」ファミリを格納したリスト$N_{\mathrm{J}}$を用いる. % -\begin{itemize} +\begin{enumerate} %<*en> -\item Let current encoding scheme for Japanese fonts be - . Current Japanese font family will be changed to - , if one of the following two conditions is met: +\item If the family~ has been defined already by \cs{DeclareKanjiFamily}, + current Japanese font family will be changed to . + Note that need not be defined under \emph{current} Japanese font encoding. % %<*ja> -\item 現在の和文フォントに対するエンコーディングがであるとしよう. - 現在の和文フォントファミリは,以下の2つの条件のうちの1つが満たされているときに - に変更される: +\item ファミリが既に \cs{DeclareKanjiFamily} によって定義されている場合, + 和文フォントファミリはに変更される. + ここで,は現在の和文フォントエンコーディングで定義されていなくてもよい. % -\begin{itemize} %<*en> -\item The family under the encoding has been already defined by - \cs{DeclareKanijFamily}. +\item If the family~ has been listed in a list~$N_{\mathrm{J}}$, this means + that is not a Japanese font family, hence current Japanese font family + won't be changed. % %<*ja> -\item エンコーディングにおけるファミリが -既に \cs{DeclareKanjiFamily} によって定義されている. +\item ファミリがリスト$N_{\mathrm{J}}$に既に含まれていれば,それは + が和文フォントファミリではないことを意味するので,和文フォントファミリは変更されない. % %<*en> -\item A font definition named \texttt{.fd} (the file name is - all lowercase) exists. +\item If the \Pkg{luatexja-fontspec} package is loaded, we stop here, and current Japanese font family + won't be changed. + + If the \Pkg{luatexja-fontspec} package is \emph{not} loaded, +now \LuaTeX-ja looks whether there exists a Japanese font encoding~ such that + a font definition named \texttt{.fd} (the file name is + all lowercase) exists. If so, current Japanese font family will be changed to + ~(the font definition file won't be loaded here). + If not, current Japanese font family won't be changed, and + is appended to the list~$N_{\mathrm{J}}$. % %<*ja> -\item フォント定義ファイル\texttt{.fd}(ファイル名は全て小文字)が存在する. +\item もし\Pkg{luatexja-fontspec}パッケージが読み込まれていれば,ここで終了であり, +和文フォントファミリは変更されないことになる. + +もし\Pkg{luatexja-fontspec}パッケージが読み込まれていなければ,和文エンコーディングで +フォント定義ファイル\texttt{.fd}(ファイル名は全て小文字)が存在するようなも + のがあるかどうかを調べる. +存在すれば,和文フォントファミリはに変更される(フォント定義ファイルは変更されな + い). +存在しなければ,リスト$N_{\mathrm{J}}$にを追加するだけで,和文フォントファミリは変更されない. + % -\end{itemize} +\end{enumerate} + %<*en> -\item Let current encoding scheme for alphabetic fonts be - . For alphabetic font family, the criterion as above is used. +Next, whether alphabetic font family will be changed is determined by following conditions. +We use an auxiliary lists $F_{\mathrm{A}}$~and~$N_{\mathrm{A}}$, and +patches \cs{DeclareFontEncoding}~and~\cs{DeclareFontFamily} to keep track of alphabetic + font encodings~and~families. % %<*ja> -\item 現在の欧文フォントに対するエンコーディングをとする. - 欧文フォントファミリに対しても,上記の基準が用いられる. +次に,欧文フォントファミリについての判定を述べていく. +補助的に「欧文フォントファミリと判明した」ファミリのリスト$F_{\textrm{A}}$と, +「欧文フォントファミリではない」ファミリを格納したリスト$N_{\mathrm{A}}$を用いる. % + +\begin{enumerate} %<*en> -\item There is a case which none of the above applies, that is, the font - family named doesn't seem to be defined neither under the - encoding , nor under . -In this case, the default family for font substitution is used for - alphabetic and Japanese fonts. Note that current encoding will not - be set to , unlike the original implementation in \LaTeX. +\item If the family~ has been listed in a list~$F_{\mathrm{A}}$, + current alphabetic font family will be changed to . + Note that need not be defined under \emph{current} alphabetic font encoding. % %<*ja> -\item 上記のいずれもが適用されない,つまりがとの - どちらでも定義されないような場合がある. - この場合,代替フォントに用いられるデフォルトのフォントファミリが欧文フォントと - 和文フォントに用いられる.\LaTeX のオリジナルの実装とは異なり, - 現在のエンコーディングはには設定されないことに注意する. +\item ファミリがリスト$F_{\mathrm{A}}$に既に含まれていれば, + 欧文フォントファミリはに変更される. + ここで,は現在の欧文フォントエンコーディングで定義されていなくてもよい. % -\end{itemize}% -%\vspace{-\medskipamount} +%<*en> +\item If the family~ has been listed in a list~$N_{\mathrm{A}}$, this means + that is not a alphabetic font family, hence current alphabetic font family + won't be changed. +% +%<*ja> +\item ファミリがリスト$N_{\mathrm{A}}$に既に含まれていれば,それは + が欧文フォントファミリではないことを意味するので,欧文フォントファミリは変更されない. +% +%<*en> +\item If there exists an alphabetic font encoding such that the family~ has been + defined under it, current alphabetic font family will be changed to , and + is appended to the list~$F_{\mathrm{A}}$. +% +%<*ja> +\item ある欧文フォントエンコーディング下でファミリが定義されていれば, + リスト$F_{\mathrm{A}}$にを追加し,欧文フォントファミリはに変更される. +% +%<*en> +\item Now \LuaTeX-ja looks whether there exists an alphabetic font encoding~ such that + a font definition named \texttt{.fd} (the file name is + all lowercase) exists. If so, current alphabetic font family will be changed to + ~(the font definition file won't be loaded here). + If not, current alphabetic font family won't be changed, and + is appended to the list~$N_{\mathrm{A}}$. +% +%<*ja> +\item 最終段階では,欧文エンコーディングで +フォント定義ファイル\texttt{.fd}(ファイル名は全て小文字)が存在するようなも + のがあるかどうかを調べる. +存在すれば,欧文フォントファミリはに変更される(フォント定義ファイルは変更されな + い). +存在しなければ,リスト$N_{\mathrm{A}}$にを追加するだけで,欧文フォントファミリは変更されない. + +% +\end{enumerate} +%<*en> +Of course, there is a case that ``Japanese font family nor alphabetic font family is changed''. +In this case, \LuaTeX-ja treats ``the argument is wrong'', so +the default family for font substitution is used for alphabetic and Japanese fonts. +%%% Note that current font encoding will not +%%% be set to , unlike the original implementation in \LaTeX. + +Note that the execution of \cs{DeclareFontFamily} \emph{after} loading of \LuaTeX-ja makes +the second argument (family) is appended to the list~$F_{\mathrm{A}}$. +% +%<*ja> +さて,引数によっては,「和文フォントファミリも欧文フォントファミリも変更されませんでした」 +という時代もあり得る. + この場合,引数は不正だった,ということになるので, +代替フォントに用いられるデフォルトのフォントファミリが欧文フォントと + 和文フォントに用いられる. +%%%LaTeX のオリジナルの実装とは異なり, +%%% 現在のエンコーディングはには設定されないことに注意する. +なお,\cs{DeclareFontFamily}を\LuaTeX-jaの読み込み後に実行した場合は, +第2引数(ファミリ名)が自動的に$F_{\mathrm{A}}$に追加される. +% \begin{figure}[!tb] \begin{LTXexample}[pos=b] @@ -5909,9 +6078,8 @@ the following ``font features'' specifications are allowed for the commands of Japanese version: % %<*ja> -\ref{ssec-fontspec}節で述べたように,この追加パッケージは\Pkg{fontspec} +\ref{ssec-fontspec}節で述べたように,この追加パッケージは\Pkg{fontspec}% パッケージで定義されているコマンドに対応する和文フォント用のコマンドを提供する. -\emph{以下に述べる和文版の命令の説明は \Pkg{fontspec}~v2.4 使用時にのみ当てはまる.} \Pkg{fontspec}パッケージで指定可能な各種font featureに加えて,和文版のコマンドには 以下の``font feature''を指定することができる: @@ -5956,14 +6124,14 @@ will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}. % \begin{figure}[!tb] -\begin{LTXexample} +\begin{LTXexample}[width=0.25\textwidth] \jfontspec[ - YokoFeatures={Color=007F00}, - TateFeatures={Color=00007F}, + YokoFeatures={Color=007F00}, TateFeatures={Color=00007F}, TateFont=KozGoPr6N-Regular ]{KozMinPr6N-Regular} -\hbox{\yoko 横組のテスト} -\hbox{\tate 縦組のテスト} +\hbox{\yoko 横組のテスト}\hbox{\tate 縦組のテスト} +\addjfontfeatures{Color=FF0000} +\hbox{\yoko 横組}\hbox{\tate 縦組} \end{LTXexample} %\caption{\texttt{TateFeatures} 等の使用例} %\caption{An example of \texttt{TateFeatures} etc.} @@ -5972,16 +6140,26 @@ 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). +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}. +% %<*ja> 縦組において使用されるフォントや,縦組においてのみ適用されるfeature達を 指定する.使用例は図\ref{fig:yokotate-fontspec}参照. % \item[YokoFeatures=\{\}] -% ... +%<*en> +The \texttt{YokoFeatures} key specifies font features which are only turned~on in +horizontal writing,. +A demonstrarion is shown in Figure~\ref{fig:yokotate-fontspec}. +% %<*ja> -横組においてのみ適用されるfeature達を +同様に,横組においてのみ適用されるfeature達を 指定する.使用例は図\ref{fig:yokotate-fontspec}参照. % @@ -6069,6 +6247,12 @@ BoldFeatures = { On the other hand, \texttt{YokoFeatures}, \texttt{TateFeatures} and \texttt{TateFont} keys can be specified in each list in the \texttt{AltFont} key. Also, one can specify \texttt{AltFont} inside \texttt{YokoFeatures},~\texttt{TateFeatures}. + +Note that features which are specified in \texttt{YokoFeatures}~and~\texttt{TateFeatures} +are always interpreted \emph{after} other ``direction-independent'' features. +This explains why \cs{addjfontfeatures} at~line~6 in~Figure~\ref{fig:yokotate-fontspec} +has no effect, because a color specification is already done in +\texttt{YokoFeatures}~and~\texttt{TateFeatures} keys. % %<*ja> \paragraph{\texttt{AltFont}, \texttt{YokoFeatures}, \texttt{TateFeatures} 等の制限} @@ -6097,6 +6281,12 @@ BoldFeatures = { \ \texttt{YokoFeatures},~\texttt{TateFeatures} 及び \texttt{TateFont} キーを 指定することは可能であり.また\ \texttt{YokoFeatures},~\texttt{TateFeatures} キーの 中身に \texttt{AltFont} を指定することができる. + +また,図\ref{fig:yokotate-fontspec}後半部では6行目の色の指定が効かず, +2行目で指定した\ \texttt{YokoFeatures},~\texttt{TateFeatures}\ による色の指定が有効になっ +たままである.これは\emph{\ \texttt{YokoFeatures},~\texttt{TateFeatures}\ によるfeature指定は +組方向に依存しないfeature指定より後に解釈される}からである. + % @@ -6131,16 +6321,24 @@ but please remind remarks below. % %<*ja> 文字コードが(16進で)の文字を出力する. -このコマンドは \verb+\char"+と似ているが,下の記述に注意すること.%" +このコマンドは \verb+\char"+と似ているが,下の注意を参照すること.%" % \end{cslist} %<*ja> -このパッケージは,\texttt{ajmacros.sty}(\Pkg{otf}パッケージ付属のマクロ集,井上浩一氏作)から -漢字コードをUTF8にしたり,plain \LuaTeX でも利用可能にするという -修正を加えた \texttt{luatexja-ajmacros.sty} も自動的に読み込む. -そのため,\texttt{ajmacros.sty} マクロ集にある \verb+\aj半角+ などのマクロもそのまま使用可能である. +このパッケージは,マクロ集 \texttt{luatexja-ajmacros.sty}\footnote{\Pkg{otf}パッケージ付属の井上浩一氏によるマクロ集 +\texttt{ajmacros.sty} に対して +漢字コードをUTF-8にしたり,plain \LuaTeX でも利用可能にするという +修正を加えたものである.}\ も自動的に読み込む. +\texttt{luatexja-ajmacros.sty} は, +そのため,\Pkg{luatexja-otf} を読みこめば \texttt{ajmacros.sty} マクロ集にある \cs{aj半角} などのマクロもそのまま使うことができる. % +%<*en> +This package automatically loads \texttt{luatexja-ajmacros.sty}, which is slightly +modified version of \texttt{ajmacros.sty}\footnote{Useful macros by iNOUE Koich!, for the +\Pkg{japanese-otf} package.}. +Hence one can use macros which sre defined in \texttt{ajmacros.sty}, such as~\cs{aj半角}. +% %\paragraph{Remarks} %\paragraph{注意} @@ -6570,7 +6768,7 @@ This commands typeset in LR-mode, in direction. If is positive, the width of the box becomes this . In this case, will be aligned \dots -\item[picture\textrm{environment}] +\item[picture\textrm{\ environment}] \item[\cs{rensuji}{[]}\{\}\textrm{, }\cs{rensujiskip}] @@ -6682,10 +6880,11 @@ The font index of current Japanese font for vertical direction. \attr{ltj@charclass} %<*en> -The character class of Japanese \textit{glyph\_node}. +The character class of a \textbf{JAchar}. This attribute is only set on a + \textit{glyph\_node} which contains a \textbf{JAchar}. % %<*ja> -和文文字の\textit{glyph\_node}の文字クラス. +\textbf{JAchar}の文字クラス.\textbf{JAchar}が格納された\textit{glyph\_node}でのみ使われる. % \attr{ltj@yablshift} @@ -7169,7 +7368,7 @@ as in \Pkg{luatexja-adjust}. %<*en> \paragraph{Setting parameters} -Figure~\ref{fig:setpar-def} shows the ``most outer'' definition of +Figure~\ref{fig:setpar-def} shows the \emph{most outer} definition of two commands, \cs{ltjsetparameter} and \cs{ltjglobalsetparameter}. Most important part is the last \cs{setkeys}, @@ -7509,7 +7708,7 @@ emits a space. \texttt{lstlisting}系環境などの日本語対応マクロを書かなくてすませるためのものである. しかしながら,\pTeX と完全に同じ挙動が実現できたわけではない. -次のように,和文文字の範囲を変更したちょうどその行においては挙動が異なる: +次のように,\textbf{JAchar}の範囲を変更したちょうどその行においては挙動が異なる: \begin{LTXexample} \fontspec[Ligatures=TeX]{TeX Gyre Termes} \ltjsetparameter{autoxspacing=false} @@ -7517,7 +7716,7 @@ emits a space. y\ltjsetparameter{jacharrange={+6}}zい u \end{LTXexample} -上ソース中の「あ」は欧文文字扱いであり. +上ソース中の「あ」は\textbf{ALchar}(欧文扱い)であり. ここで使用している欧文フォント\TeX\ Gyre Termesは「あ」を含まない. よって,出力に「あ」は現れないことは不思議ではない. それでも,\pTeX とまったく同じ挙動を示すならば,出力は @@ -7525,14 +7724,14 @@ u 上のように異なる挙動となっているが,それは以下の理由による: \begin{itemize} \item 3行目を \texttt{process\_input\_buffer} で処理する時点では, - 「あ」は和文文字扱いである.よって3行目は和文文字で終わることになり, + 「あ」は\textbf{JAchar}(和文扱い)である.よって3行目は\textbf{JAchar}で終わることになり, コメント文字 \texttt{U+FFFFF} が追加される. よって,直後の改行文字は無視されることになり,空白は入らない. \item 4行目を \texttt{process\_input\_buffer} で処理する時点では, - 「い」は欧文文字扱いである.よって4行目は欧文文字で終わることになり, + 「い」は\textbf{ALchar}である.よって4行目は\textbf{ALchar}で終わることになり, 直後の改行文字は空白に置き換わる. \end{itemize} -このため,トラブルを避けるために,和文文字の範囲を\cs{ltjsetparameter}で編集した場合, +このため,トラブルを避けるために,\textbf{JAchar}の範囲を\cs{ltjsetparameter}で編集した場合, その行はそこで改行するようにした方がいいだろう. % @@ -7697,11 +7896,11 @@ $\mathit{Np}.\mathit{id}$の意味を述べるとともに, 説明用に準備した概念であって,実際のLuaコード中にそのように書かれているわけではないことに注意. \begin{description} -\item[\textit{id\_jglyph}] 和文文字.\\ -$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$は,その和文文字を表している +\item[\textit{id\_jglyph}] \textbf{JAchar}(和文文字).\\ +$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$は,その\textbf{JAchar}を表している \textit{glyph\_node}そのものである. -\item[\textit{id\_glyph}] 和文文字を表していない\textit{glyph\_node}~$p$.\\ -多くの場合,$p$は欧文文字を格納しているが,「ffi」などの合字によって作られた +\item[\textit{id\_glyph}] \textbf{JAchar}(和文文字)以外のものを表す\textit{glyph\_node}~$p$.\\ +多くの場合,$p$は\textbf{ALchar}(欧文文字)を格納しているが,「ffi」などの合字によって作られた \textit{glyph\_node}である可能性もある. 前者の場合,$\mathit{Np}.\mathit{head}$,~$\mathit{Np}.\mathit{tail} = p$である. 一方,後者の場合, @@ -7753,15 +7952,15 @@ $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$の算出は, 空白等の実際の挿入を行うことは前に書いたが,ここでの説明では,問題にしているクラスタ\textit{Np}は「後ろ側」のクラスタである とする.「前側」のクラスタについては,以下の説明で\textit{head}が\textit{last}に置き換わることに注意すること. \begin{description} -\item[和文A] リスト中に直接出現している和文文字. +\item[和文A] リスト中に直接出現している\textbf{JAchar}. \textit{id}が\textit{id\_jglyph}であるか,\\ \textit{id}が\textit{id\_pbox}であって$\mathit{Np}.\mathit{head}$が\textbf{JAchar}であるとき. -\item[和文B] リスト中のhboxの中身の先頭として出現した和文文字.和文Aとの違いは,これの前に +\item[和文B] リスト中のhboxの中身の先頭として出現した\textbf{JAchar}.和文Aとの違いは,これの前に JFMグルーの挿入が行われない(\Param{xkanjiskip},~\Param{kanjiskip}は入り得る)ことである.\\ \textit{id}が\textit{id\_hlist}か\textit{id\_disc}であって$\mathit{Np}.\mathit{head}$が\textbf{JAchar}であるとき. -\item[欧文] リスト中に直接/hboxの中身として出現している欧文文字.次の3つの場合が該当: +\item[欧文] リスト中に直接/hboxの中身として出現している「\textbf{JAchar}以外の文字」.次の3つの場合が該当: \begin{itemize} \item \textit{id}が\textit{id\_glyph}である. \item \textit{id}が\textit{id\_math}である. @@ -7809,7 +8008,7 @@ $g$は「文字コード \texttt{'boxbdd'} の文字」と\textit{Np}の間に 一方.前者(段落)の場合は,リストの末尾は常に \cs{penalty10000} と, \cs{parfillskip} 由来のグルーが存在する.%よって,最後のクラスタ\textit{Np}は %この \cs{parfillskip} 由来のグルーとなり,実質的な中身の最後はその1つ前のクラスタ\textit{Nq}となる. -段落の最後の「通常の和文文字${}+{}$句点」が独立した行となるのを防ぐために, +段落の最後の「通常の\textbf{JAchar}${}+{}$句点」が独立した行となるのを防ぐために, \Param{jcharwidowpenalty}の値の分だけ適切な場所のペナルティを増やす. ペナルティ量を増やす場所は,\textit{head}が\textbf{JAchar}であり, @@ -7844,7 +8043,7 @@ $g$は「文字コード \texttt{'boxbdd'} の文字」と\textit{Np}の間に この場合が全ての場合の基本となる. \paragraph{「右空白」の算出} -まず,「右空白」にあたる量を算出する.通常はこれが,隣り合った2つの和文文字間に入る空白量となる. +まず,「右空白」にあたる量を算出する.通常はこれが,隣り合った2つの\textbf{JAchar}間に入る空白量となる. \begin{description} \item[JFM由来{[M]}] JFMの文字クラス指定によって入る空白を以下によって求める.この段階で空白量が未定義(未指定)だった場合, デフォルト値\Param{kanjiskip}を採用することとなるので,次へ. @@ -7923,14 +8122,14 @@ $q$と$r$の間は(実フォントが同じなのに)\texttt{jfmvar} キー \item[\Param{kanjiskip}~{[K]}] 上の[M]において空白が定まらなかった場合, 以下で定めた量「右空白」として採用する. この段階においては,\cs{inhibitglue} は効力を持たないため, -結果として,2つの和文文字間には常に何らかのグルー/カーンが挿入されることとなる. +結果として,2つの\textbf{JAchar}間には常に何らかのグルー/カーンが挿入されることとなる. \begin{enumerate} \item 両クラスタ(厳密には$\mathit{Nq}.\mathit{tail}$,$\mathit{Np}.\mathit{head}$)の中身の文字コードに対する \Param{autospacing}パラメタが両方ともfalseだった場合は,長さ0のglueとする. \item ユーザ側から見た\Param{kanjiskip}パラメタの自然長が$\cs{maxdimen}=(2^{30}-1)\,{\rm sp}$で なければ,\Param{kanjiskip}パラメタの値を持つglueを採用する. \item 2.でない場合は,\textit{Nq}, \textit{Np}で使われているJFMに指定されている\Param{kanjiskip}の値を用いる. -どちらか片方のクラスタだけが和文文字(\textsf{和文A}・\textsf{和文B})のときは,そちらのクラスタで使われている +どちらか片方のクラスタだけが\textbf{JAchar}(\textsf{和文A}・\textsf{和文B})のときは,そちらのクラスタで使われている JFM由来の値だけを用いる.もし両者で使われているJFMが異なった場合は,上の[M]~3.と同様の方法を用いて調整する. \end{enumerate} \end{description} @@ -8052,7 +8251,7 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K] \item 禁則用ペナルティも,以前述べた\textsf{P-normal~[PN]}と同じである. \end{itemize} \begin{description} -\item[Boundary-B~{[\OB]}] 和文文字と「和文でないもの」との間に入る空白を以下によって求め, +\item[Boundary-B~{[\OB]}] \textbf{JAchar}と「\textbf{JAchar}でないもの」との間に入る空白を以下によって求め, 未定義でなければそれを「右空白」として採用する. \textsf{JFM-origin~[M]}の変種と考えて良い. これによって定まる空白の典型例は,和文の閉じ括弧と欧文文字の間に入る半角アキである. @@ -8092,7 +8291,7 @@ If this attempt fails, \LuaTeX-ja use the method ``\textsf{\Param{kanjiskip}~[K] \item 禁則用ペナルティは,以前述べた\textsf{P-normal~[PN]}と同じである. \end{itemize} \begin{description} -\item[Boundary-A~{[\OA]}] 「和文でないもの」と和文文字との間に入る空白を以下によって求め, +\item[Boundary-A~{[\OA]}] 「\textbf{JAchar}でないもの」と\textbf{JAchar}との間に入る空白を以下によって求め, 未定義でなければそれを「右空白」として採用する. \textsf{JFM-origin~[M]}の変種と考えて良い. これによって定まる空白の典型例は,欧文文字と和文の開き括弧との間に入る半角アキである. @@ -8177,7 +8376,7 @@ $\mathit{Nq}.\mathit{tail}$は無意味なので, \paragraph{和文Aと和文Bの違い} 先に述べたように,\textsf{和文B}はhboxの中身の先頭(or 末尾)として出現している -和文文字である.リスト内に直接ノードとして現れている和文文字(\textsf{和文A})との違いは, +\textbf{JAchar}である.リスト内に直接ノードとして現れている\textbf{JAchar}(\textsf{和文A})との違いは, \begin{itemize} \item \textsf{和文B}に対しては,JFMの文字クラス指定から定まる空白 \textsf{JFM-origin~[M]},\textsf{Boundary-A~[\OA]},\textsf{Boundary-B~[\OB]})の挿入は行われない. @@ -8224,10 +8423,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} が負(グリフを下ける)の場合に深さは増加しな @@ -8269,7 +8468,7 @@ $h = \max(\texttt{height} + \texttt{yoffset}, 0)$, $d=\texttt{depth}$. \end{itemize} という状況で組んだ場合を例にとって説明しよう. -\LuaTeX・\Pkg{luaotfload}によるカーニング・ハイフネーションが終わった段階では, +\LuaTeX・\Pkg{luaotfload}によるカーニング・ハイフネーションが終わった段階では,…… @@ -8369,9 +8568,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 @@ -8399,7 +8598,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. @@ -8736,7 +8935,7 @@ JFM中にある文字クラス$n$の定義の \item \Param{kanjiskip} \end{enumerate} \begin{enumerate} - \item 行末の和文文字を移動したことで$\textit{total}=0$となれば, + \item 行末の\textbf{JAchar}を移動したことで$\textit{total}=0$となれば, 調整の必要はなく,行が格納されているhboxの \texttt{glue\_set}, \texttt{glue\_sign}, \texttt{glue\_order}を再計算すればよい. 以降,$\textit{total}\neq 0$と仮定する. @@ -8909,7 +9108,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} @@ -9112,7 +9311,7 @@ direction whatsitはあくまでも組方向処理のための補助的なノー \[ \xymatrix{ {}\Node{glyph}{`平'}\ar[r]&{}\Node{glyph}{`成'}\ar[r]& - {}\HNode{hlist}{10.00003}{3.02779}{0.0}\ar[r]\ar[d]^{\text{中身}}&{}\Node{glyph}{`年'}\\ + {}\HNode{hbox}{10.00003}{3.02779}{0.0}\ar[r]\ar[d]^{\text{中身}}&{}\Node{glyph}{`年'}\\ &&{}\Node{whatsit}{\cs{tate}}\ar[r]&{}\Node{glyph}{`2'}\ar[r]&{}\Node{glyph}{`6'} } \] @@ -9126,10 +9325,10 @@ direction whatsitはあくまでも組方向処理のための補助的なノー &{}\textcolor{blue}{\Node{penalty}{0}} \ar`r[d] `[l] `[ddll] `[dl] [dl] \\ - &&{}\textcolor{red}{\HNode{hlist}{3.02779}{10.00003}{0.0}}\ar[r]\ar[d]^{\text{中身}} + &&{}\textcolor{red}{\HNode{\textit{dir\_box} (\cs{yoko})}{3.02779}{10.00003}{0.0}}\ar[r]\ar[d]^{\text{中身}} &{}\textcolor{blue}{\Node{penalty}{0}}\ar[r] &{}\Node{glyph}{`年'}\\ - &&{}\HNode{\textit{dir\_box} (\cs{yoko})}{10.00003}{3.02779}{0.0}\ar[d]^{\text{中身}}\\ + &&{}\HNode{hbox}{10.00003}{3.02779}{0.0}\ar[d]^{\text{中身}}\\ &&{}\Node{whatsit}{\cs{tate}}\ar[r]&{}\Node{glyph}{`2'}\ar[r]&{}\Node{glyph}{`6'} } \] @@ -9243,7 +9442,7 @@ direction~whatsit内部のノードリストに,\textit{dir\_box}として格 {}\Node{whatsit}{\cs{dtou}}\ar[r]& {}\Node{glyph}{`a'}\ar[r]& {}\textcolor{red}{\HNode{\textit{dir\_box} (\cs{dtou})}{20.0}{9.0}{0.0}}\ar[d]_{\text{中身}}\\ - &&{}\HNode{hlist}{9.0}{5.0}{2.0}\ar[d]_{\text{中身}}\\ + &&{}\HNode{hbox}{9.0}{5.0}{2.0}\ar[d]_{\text{中身}}\\ &&{}\Node{whatsit}{\cs{yoko}}\ar[r]&{}\Node{rule}{} } \] @@ -9265,7 +9464,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/}%