2 %#! lualatex -shell-escape
4 %<en> \documentclass[a4paper,titlepage]{article}
5 %<ja> \documentclass[a4paper,titlepage]{ltjsarticle}
6 %<zh> \documentclass[a4paper,titlepage]{ltjsarticle}
10 \newif\if@real@append@list
11 \def\@append@newentry#1#2{{%
12 \@real@append@listtrue \def\@tempa{#2}%
13 \let\@pkglist\@append@newentry@pkglist#1%
15 \let\@pkglist=\relax\xdef#1{#1\@pkglist{#2}}%
17 \def\@append@newentry@pkglist#1{%
19 \ifx\@tempa\@tempb\@real@append@listfalse\fi}
20 \def\@addtofilelist#1{\@append@newentry\ltjpkglist{#1}}
25 \usepackage[margin=25mm,footskip=5mm]{geometry}
29 \usepackage[textwidth=45\zw, lines=45, footskip=5mm]{geometry}
30 \advance\leftmargini-1\zw\advance\leftmarginii-1\zw
33 \usepackage[margin=25mm, footskip=5mm]{geometry}
34 \advance\leftmargini-1\zw\advance\leftmarginii-1\zw
36 \DeclareYokoKanjiEncoding{ZH}{}{}
37 \DeclareKanjiEncodingDefaults{}{}
38 \DeclareErrorKanjiFont{ZH}{song}{m}{n}{10}
39 \DeclareKanjiSubstitution{ZH}{song}{m}{n}
40 \newcommand\songdefault{song}
41 \newcommand\heidefault{hei}
42 \newcommand\minchodefault{mincho}
43 \renewcommand\kanjiencodingdefault{ZH}
44 \renewcommand\kanjifamilydefault{\songdefault}
45 \renewcommand\kanjiseriesdefault{\mddefault}
46 \renewcommand\kanjishapedefault{\updefault}
47 \DeclareKanjiFamily{ZH}{song}{}
48 \DeclareFontShape{ZH}{song}{m}{n}{<->name:AdobeSongStd-Light:jfm=jis}{}
49 \DeclareFontShape{ZH}{song}{m}{it}{<->ssub*song/m/n}{}
50 \DeclareFontShape{ZH}{song}{bx}{n}{<->ssub*hei/m/n}{}
51 \DeclareKanjiFamily{ZH}{hei}{}
52 \DeclareFontShape{ZH}{hei}{m}{n}{<->name:SimHei:jfm=jis}{}
53 \DeclareFontShape{ZH}{hei}{bx}{n}{<->ssub*hei/m/n}{}
54 \DeclareKanjiFamily{ZH}{mincho}{}
55 \DeclareFontShape{ZH}{mincho}{m}{n}{<->psft:KozMinPr6N-Regular:cid=Adobe-Japan1-6;jfm=jis}{}
56 \fontencoding{ZH}\selectfont
57 \DeclareTextFontCommand{\textsong}{\songfamily}
58 \DeclareTextFontCommand{\texthei}{\heifamily}
59 \DeclareTextFontCommand{\textmincho}{\minchofamily}
60 \DeclareOldFontCommand{\song}{\normalfont\songfamily}{}
61 \DeclareOldFontCommand{\hei}{\normalfont\heifamily}{}
62 \DeclareOldFontCommand{\mincho}{\normalfont\minchofamily}{}
63 \DeclareSymbolFont{songti}{ZH}{song}{m}{n}
65 \SetSymbolFont{songti}{bold}{ZH}{hei}{m}{n}
66 \DeclareSymbolFontAlphabet{\mathsong}{songti}
67 \DeclareMathAlphabet{\mathhei}{ZH}{hei}{m}{n}
69 \DeclareRobustCommand\songfamily{\not@math@alphabet\songfamily\mathsong\kanjifamily\songdefault\selectfont}
70 \DeclareRobustCommand\heifamily{\not@math@alphabet\heifamily\mathhei\kanjifamily\heidefault\selectfont}
71 \DeclareRobustCommand\minchofamily{\not@math@alphabet\minchofamily\mathhei\kanjifamily\minchodefault\selectfont}
72 \DeclareRobustCommand\rmfamily{\not@math@alphabet\rmfamily\mathrm\romanfamily\rmdefault\kanjifamily\songdefault\selectfont}
73 \DeclareRobustCommand\sffamily{\not@math@alphabet\sffamily\mathsf\romanfamily\sfdefault\kanjifamily\heidefault\selectfont}
77 \usepackage{amsmath,amssymb,tikz,pict2e,multienum,amsthm,float}
78 \usepackage{booktabs,listings,showexpl,multicol,metalogo}
79 \usepackage{luatexja-otf}
80 \usepackage[jis2004]{luatexja-preset}
85 allbordercolors=1 1 1,
88 pdfauthor={The LuaTeX-ja project team},
89 pdftitle={The LuaTeX-ja package}
92 pdfauthor={LuaTeX-jaプロジェクトチーム},
93 pdftitle={LuaTeX-jaパッケージ}
96 pdfauthor={LuaTeX-ja项目团队},
97 pdftitle={LuaTeX-ja宏包}
101 \setmainfont[Ligatures=TeX]{TeX Gyre Termes}
102 \setsansfont[Ligatures=TeX]{TeX Gyre Heros}
105 \def\labelenumii{(\arabic{enumii})}
107 \DeclareRobustCommand\eTeX{\ensuremath{\varepsilon}-\kern-.125em\TeX}
108 \DeclareRobustCommand\LuaTeX{Lua\TeX}
109 \DeclareRobustCommand\pdfTeX{pdf\TeX}
110 \DeclareRobustCommand\pTeX{p\kern-.05em\TeX}
111 \DeclareRobustCommand\upTeX{up\kern-.05em\TeX}
112 \DeclareRobustCommand\pLaTeX{p\kern-.05em\LaTeX}
113 \DeclareRobustCommand\pLaTeXe{p\kern-.05em\LaTeXe}
114 \DeclareRobustCommand\epTeX{\ensuremath{\varepsilon}-\kern-.125em\pTeX}
116 \theoremstyle{definition}
117 %<en>\newtheorem{defn}{Definition}
118 %<ja>\newtheorem{defn}{定義}
119 %<zh>\newtheorem{defn}{定义}
121 \newenvironment{cslist}{%
122 \leftskip2em\parindent=0pt\def\makelabel##1{{\tt\char92##1}}
123 \def\{{\char`\{}\def\}{\char`\}}
125 \def\item[##1]{\par\smallskip\par\hskip-\leftskip\makelabel{##1}\par}
129 \long\def\@makecaption#1#2{%
130 \vskip\abovecaptionskip
131 \sbox\@tempboxa{{\small #1. #2}}%
132 \ifdim \wd\@tempboxa >\hsize
135 \global \@minipagefalse
136 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
138 \vskip\belowcaptionskip}
139 % Suppress output from showexpl to stdout.
143 \def\Node#1#2{\,\vcenter{\hbox{\fboxsep=1pt\fbox{\vbox{\small\halign{\hfil##\hfil\cr
144 #1\mathstrut\cr\noalign{\hrule height.4pt}\strut#2\cr}}}}\,}}
147 \title{The \LuaTeX-ja package}
148 \author{The \LuaTeX-ja project team}
151 \title{\LuaTeX-jaパッケージ}
152 \author{\LuaTeX-jaプロジェクトチーム}
156 \author{\LuaTeX-ja项目团队}
159 basicstyle=\ttfamily\small, pos=r, breaklines=true,
160 numbers=none, rframe={}, basewidth=0.5em
163 \parskip=\smallskipamount
164 \protected\def\Param#1{\textsf{#1}} % parameter name
165 \protected\def\Pkg#1{\underline{\smash{\texttt{#1}}}} % packages/classes
169 \def<#1>{{\normalfont\rm\itshape$\langle$#1$\rangle$}}
176 \textbf{This documentation is far from complete. It may have many
177 grammatical (and contextual) errors.} Also, several parts
178 (especially, Section~\ref{sec-jfmglue}) are written in Japanese only.
181 \textbf{\large 本ドキュメントはまだまだ未完成です.}
184 \textbf{\large 本文档尚未完成。}
188 %<en>\part{User's manual}
189 %<ja>\part{ユーザーズマニュアル}
192 %<en>\section{Introduction}
198 The \LuaTeX-ja package is a macro package for typesetting high-quality
199 Japanese documents when using \LuaTeX.
202 \LuaTeX-jaパッケージは,次世代標準\TeX である\LuaTeX の上で,\pTeX と同等
203 /それ以上の品質の日本語組版を実現させようとするマクロパッケージである.
206 \LuaTeX-ja宏包是应用于下一代标准\TeX 引擎亦即\LuaTeX 引擎上的高质量日语文档排版宏包。
209 %<en>\subsection{Backgrounds}
215 Traditionally, ASCII \pTeX, an extension of \TeX, and its derivatives
216 are used to typeset Japanese documents in \TeX. \pTeX\ is an engine
217 extension of \TeX: so it can produce high-quality Japanese documents
218 without using very complicated macros. But this point is a mixed
219 blessing: \pTeX\ is left behind from other extensions of \TeX,
220 especially \eTeX\ and \pdfTeX, and from changes about
221 Japanese processing in computers (\textit{e.g.}, the UTF-8 encoding).
224 従来,「\TeX を用いて日本語組版を行う」といったとき,エンジンとしては
225 ASCII \pTeX やそれの拡張物が用いられることが一般的であった.\pTeX は\TeX
226 のエンジン拡張であり,(少々仕様上不便な点はあるものの)商業印刷の分野に
227 も用いられるほどの高品質な日本語組版を可能としている.だが,それは弱点に
228 もなってしまった:\pTeX という(組版的に)満足なものがあったため,海外で
229 行われている数々の\TeX の拡張――例えば\eTeX や\pdfTeX ――や,TrueType,
230 OpenType, Unicodeといった計算機で日本語を扱う際の状況の変化に追従すること
234 一般情况下,\TeX 下的日语文档输出,是ASCII \pTeX(\TeX 的一个扩展)及其衍生
235 软件来完成的。\pTeX 作为\TeX 的一个扩展引擎,在生成高质量的日语文档时,规避
236 了繁杂的宏编写。但是在和同时期的引擎相比之下,\pTeX 的处境未免有些尴尬:\pTeX
237 已经远远落后于\eTeX 和pdf\TeX,此外也没有跟上计算机上对日文处理的演进(比如,
238 UTF-8编码,TrueType字体,OpenType字体)。
242 Recently extensions of \pTeX, namely \upTeX\ (Unicode-implementation
243 of \pTeX) and \epTeX\ (merging of \pTeX\ and
244 \eTeX\ extension), have developed to fill those gaps to some
245 extent, but gaps still exist.
248 ここ数年,若干状況は改善されてきた.現在手に入る大半の\pTeX バイナリでは
249 外部UTF-8入力が利用可能となり,さらにUnicode化を推進し,\pTeX の内部処理
250 までUnicode化した\upTeX も開発されている.また,\pTeX に\eTeX 拡張をマー
251 ジした\epTeX も登場し,\TeX\ Live\ 2011では\pLaTeX が\epTeX の上で動作す
252 るようになった.だが,\pdfTeX 拡張(PDF直接出力やmicro-typesetting)を
253 \pTeX に対応させようという動きはなく,海外とのgapは未だにあるのが現状であ
257 最近开发的\pTeX 扩展,即\upTeX(Unicode下的\pTeX 实现)和\epTeX(\pTeX 和
258 \eTeX 的融合版本),虽然在部分情况上弥补了上述的差距,但是差距依然存在。
262 However, the appearance of \LuaTeX\ changed the whole situation. With
263 using Lua `callbacks', users can customize the internal processing of
264 \LuaTeX. So there is no need to modify sources of engines to
265 support Japanese typesetting: to do this, we only have to write Lua
266 scripts for appropriate callbacks.
269 しかし,\LuaTeX の登場で,状況は大きく変わることになった.Luaコードで
270 `callback'を書くことにより,\LuaTeX の内部処理に割り込みをかけることが可
271 能となった.これは,エンジン拡張という真似をしなくても,Luaコードとそれに
272 関する\TeX マクロを書けば,エンジン拡張とほぼ同程度のことができるようになっ
273 たということを意味する.\LuaTeX-jaは,このアプローチによってLuaコード・
274 \TeX マクロによって日本語組版を\LuaTeX の上で実現させようという目的で開発
278 不过,\LuaTeX 的出现改变了整个状况。用户可以通过使用Lua语言的“callback”来
279 调整\LuaTeX 的内部处理机制。所以,没有必要去通过修改引擎的源代码来支持日文
280 排版,相反,我们需要做的仅仅是编写其当处理callback的Lua脚本。
283 %<en>\subsection{Major Changes from \pTeX}
284 %<ja>\subsection{\pTeX からの主な変更点}
285 %<zh>\subsection{与\pTeX 的差异所在}
288 The \LuaTeX-ja package is under much influence of \pTeX\ engine. The initial
289 target of development was to implement features of \pTeX. However,
290 \emph{\LuaTeX-ja is not a just porting of \pTeX; unnatural
291 specifications/behaviors of \pTeX\ were not adopted}.
294 \LuaTeX-jaは,\pTeX に多大な影響を受けている.初期の開発目標は,\pTeX の機
295 能をLuaコードにより実装することであった.しかし,開発が進むにつれ,\pTeX
296 の完全な移植は不可能であり,また\pTeX における実装がいささか不可解になっ
297 ているような状況も発見された.そのため,\textbf{\LuaTeX-jaは,もはや
298 \pTeX の完全な移植は目標とはしない.\pTeX における不自然な仕様・挙動があ
302 \LuaTeX-ja宏包在设计上,受\pTeX 影响很大。最初开发的主要议题是实现\pTeX 的特性。
303 不过,{\bf\LuaTeX-ja不是简简单单的移植\pTeX,很多不自然的特征和现象都被移出了。}
307 The followings are major changes from \pTeX:
310 以下は \pTeX からの主な変更点である.
318 \item A Japanese font is a tuple of a `real' font, a Japanese font
319 metric (\textbf{JFM}, for short), and an optional string called
323 \item 和文フォントは(小塚明朝,IPA明朝などの)実際のフォント,和文フォン
324 トメトリック(JFMと呼ぶ\footnote{混乱を防ぐため,p\TeX の意味での
325 JFM (\texttt{min10.tfm}) などは本ドキュメントでは\textbf{和文用
326 TFM}とよぶことにする.}),そして`variation'と呼ばれる文字列の組で
330 \item 一个日文字体是由三部分构成的元组:实际的字体(如小塚明
331 朝,IPA明朝),日文字体测度(\textbf{JFM})和变体字串。
335 \item In \pTeX, a line break after Japanese character is ignored (and
336 doesn't yield a space), since line breaks (in source files) are
337 permitted almost everywhere in Japanese texts. However, \LuaTeX-ja
338 doesn't have this function completely, because of a specification
342 \item 日本語の文書中では改行はほとんどどこでも許されるので,\pTeX では和文文字
343 直後の改行は無視される(スペースが入らない)ようになっていた.しかし,
344 \LuaTeX-ja では \LuaTeX の仕様のためにこの機能は完全には実装されていない.
347 \item \pTeX 中,日文字符之后的断行并不允许(也不产生空格),其他在源码中的断行
348 是可以随处允许的。不过,因为\LuaTeX 的特殊关系,\LuaTeX-ja并没有这个功能。
352 \item The insertion process of glues/kerns between two Japanese
353 characters and between a Japanese character and other characters
354 (we refer these glues/kerns as \textbf{JAglue}) is rewritten from
358 \item 2つの和文文字の間,和文文字と欧文文字の間に入るグルー/カーン
359 (\textbf{JAglue}と呼ぶ)の挿入処理が0から書き直されている.
362 \item 插在日文字符和其他字符言之间的胶/出格(我们将此称为\textbf{JAglue})是重新实现的。
367 \item As \LuaTeX's internal character handling is `node-based'
368 (\textit{e.g.}, \verb+of{}fice+ doesn't prevent ligatures), the
369 insertion process of \textbf{JAglue} is now `node-based'.
372 \item \LuaTeX の内部での文字の扱いが「ノードベース」になっているように(例えば,
373 \verb+of{}fice+ で合字は抑制されない),\textbf{JAglue}の挿入処理も
377 \item 在\LuaTeX 中,内部的字符处理是“基于node的”(例如:\verb!of{}fice!不会避免合字),
378 \textbf{JAglue}的插入处理,现在也是“基于node的”。
382 \item Furthermore, nodes between two characters which have no effects in
383 line break (\textit{e.g.}, \verb+\special+ node) and kerns from
384 italic correction are ignored in the insertion process.
387 \item さらに,2つの文字の間にある行末では効果を持たないノード(例えば \verb+\special+ ノード)や,
388 イタリック補正に伴い挿入されるカーンは挿入処理中では無視される.
391 \item 此外,两个字符之间的node在断行时不起作用的(例如,\verb!\special!node),还有
392 意大利体校正带来的出格在插入处理中也是被忽略的。
396 \item \emph{Caution: due to above two points, many methods which did for the
397 dividing the process of the insertion of \textbf{JAglue} in \pTeX\ are not
398 effective anymore.} In concrete terms, the following two methods are not effective anymore:
401 \item \textbf{注意:上の2つの変更により,従来\textbf{JAglue}の挿入処理を分断するのに
402 使われていたいくつかの方法は用いることができない.具体的には,次の方法はもはや無効である:}
405 \item \textbf{警告:鉴于以上两点,在\pTeX 中分割\textbf{JAglue}处理的多种方法不再生效。}
412 If you want to do so, please put an empty hbox between it instead:
415 もし同じことをやりたければ,空の水平ボックスを間に挟めばよい:
426 \item In the process, two Japanese fonts which only differ in their `real'
427 fonts are identified.
430 \item 処理中では,2つの和文フォントは,「実際の」フォントのみが異なる場合に同一視
434 \item 处理过程中,两个在“真实”字体上具区别的日文字体可以被识别出来。
439 \item \LuaTeX-jaでは,\pTeX と同様に漢字・仮名を制御綴内に用いることができ,
440 \verb+\西暦+ などが正しく動作するようにしている.
441 但し,制御綴中に使える和文文字が\pTeX・\upTeX と全く同じではないことに注意すること.
445 \item At the present, vertical typesetting (\emph{tategaki}), is not
446 supported in \LuaTeX-ja.
449 \item 現時点では,縦書きは\LuaTeX-jaではサポートされていない.
452 \item 当下,\LuaTeX-ja并不支持直行排版。
458 For detailed information, see Part~\ref{part-imp}.
461 詳細については第\ref{part-imp}部を参照.
464 详细的描述,请参见第\ref{part-imp}编。
467 %<en>\subsection{Notations}
468 %<ja>\subsection{用語と記法}
469 %<zh>\subsection{一些约定}
473 In this document, the following terms and notations are used:
476 本ドキュメントでは,以下の用語と記法を用いる:
484 \item Characters are divided into two types:
494 \item \textbf{JAchar}: standing for Japanese characters such as
495 Hiragana, Katakana, Kanji and other punctuation marks for
499 \item \textbf{JAchar}: ひらがな,カタカナ,漢字,和文用の約物といった和文文字の
503 \item \textbf{JAchar}:表示日文字符,如平假名,片假名,汉字,日文标点。
507 \item \textbf{ALchar}: standing for all other characters like alphabets.
510 \item \textbf{ALchar}: アルファベットを始めとする,その他全ての文字を指す.
513 \item \textbf{ALchar}:代表其他字母字符。
518 We say `alphabetic fonts' for fonts used in \textbf{ALchar}, and `Japanese fonts' for fonts used in \textbf{JAchar}.
521 そして,\textbf{ALchar}の出力に用いられるフォントを「欧文フォント」と呼び,
522 \textbf{JAchar}の出力に用いられるフォントを「和文フォント」と呼ぶ.
525 我们将用于\textbf{ALchar}的字体称为“字母字体”,用于\textbf{JAchar}的字体称为“日文字体”。
529 \item A word in a sans-serif font (like \Param{prebreakpenalty})
530 means an internal parameter for Japanese typesetting, and it
531 is used as a key in \verb+\ltjsetparameter+ command.
534 \item サンセリフ体で書かれた語(例:\Param{prebreakpenalty})は日本語組版用の
535 パラメータを表し,これらは \verb+\ltjsetparameter+ コマンドのキーとして
539 \item 用无衬线字体表示的词(如:\Param{prebreakpenalty})表示
540 日文排版中的内部便利iang,并用做\verb!\ltjsetparameter!命令一个键。
544 \item A word in typewriter font with underline (like \Pkg{fontspec})
545 means a package or a class of \LaTeX.
548 \item 下線付きのタイプライタ体で書かれた語(例:\Pkg{fontspec})は\LaTeX の
552 \item 用下划线表示的词(如:\Pkg{fontspec})表示\LaTeX 的宏包或者文档类。
556 \item The word `primitive' is used not only for primitives in \LuaTeX,
557 but also for control sequences that defined in the core module of
561 \item 「プリミティブ」という語を,\LuaTeX のプリミティブだけではなく \LuaTeX-ja
562 のコアモジュールで定義されたコントロールシーケンスに対しても用いる.
565 \item “primitive”,该词在本文档中不仅表示\LuaTeX 的基本控制命令,也包括\LuaTeX-ja的相关的基本控制命令
569 \item In this document, natural numbers start from~0.
572 \item 本ドキュメントでは,自然数は0から始まる.
579 %<en>\subsection{About the project}
580 %<ja>\subsection{プロジェクトについて}
581 %<zh>\subsection{关于本项目}
584 \paragraph{Project Wiki} Project Wiki is under construction.
587 \paragraph{プロジェクトWiki} プロジェクトWikiは構築中である.
590 \paragraph{项目wiki} 本项目wiki正在编写中。
595 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29} (English)
596 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage} (Japanese)
597 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28zh%29} (Chinese)
602 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage}(日本語)
603 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29}(英語)
604 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28zh%29}(中国語)
609 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage}(日语)
610 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28en%29}(英语)
611 \item \url{http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage%28zh%29}(汉语)
615 This project is hosted by SourceForge.JP.
618 本プロジェクトはSourceForge.JPのサービスを用いて運営されている.
621 本项目由SourceForge.JP托管。
624 %<en>\paragraph{Members}\
625 %<ja>\paragraph{開発メンバー}\
626 %<zh>\paragraph{开发者}\
629 \begin{multienumerate}
630 \def\labelenumi{$\bullet$}
631 \mitemxxx{Hironori KITAGAWA}{Kazuki MAEDA}{Takayuki YATO}
632 \mitemxxx{Yusuke KUROKI}{Noriyuki ABE}{Munehiro YAMAMOTO}
633 \mitemxxx{Tomoaki HONDA}{Shuzaburo SAITO}{MA Qiyuan}
637 \begin{multienumerate}
638 \def\labelenumi{$\bullet$}
639 \mitemxxx{北川 弘典}{前田 一貴}{八登 崇之}
640 \mitemxxx{黒木 裕介}{阿部 紀行}{山本 宗宏}
641 \mitemxxx{本田 知亮}{齋藤 修三郎}{馬 起園}
645 \begin{multienumerate}
646 \def\labelenumi{$\bullet$}
647 \mitemxxx{北川 弘典}{前田 一贵}{八登 崇之}
648 \mitemxxx{黒木 裕介}{阿部 纪行}{山本 宗宏}
649 \mitemxxx{本田 知亮}{斋藤 修三郎}{马 起园}
653 % \paragraph{Acknowledgments} -- 挿入するならここ
656 %<en>\section{Getting Started}
659 %<en>\subsection{Installation}
660 %<ja>\subsection{インストール}
664 To install the \LuaTeX-ja\ package, you will need:
667 \LuaTeX-jaパッケージのインストールには,次のものが必要である.
674 \item \LuaTeX\ (version 0.65.0-beta or later) and its supporting packages.\\
675 If you are using \TeX~Live~2011 or current W32\TeX, you don't have to worry.
678 \item \LuaTeX(バージョン 0.65.0-beta 以降)とその支援パッケージ.
679 \TeX~Live~2011やW32\TeX の最新版ならば問題ない.
682 \item \LuaTeX(版本号为大于0.65)和相关支持宏包。\\
683 如果用户使用的是\TeX Live2011以及最新版本的W32\TeX,可不考虑此项。
686 \item The source archive of \LuaTeX-ja, of course\texttt{:)}
689 \item \LuaTeX-jaのソースアーカイブ(もちろん\texttt{:)}).
692 \item \LuaTeX-ja的源码(当然喽\texttt{:)})。
695 \item The \Pkg{xunicode} package, which version is \emph{just v0.981 (2011/09/09)}.\\
696 If you have the \Pkg{fontspec} package, this \Pkg{xunicode} package must be exist.
697 But be careful about the version; other versions may not work correctly with \LuaTeX-ja.
700 \item \Pkg{xunicode}パッケージ(\textbf{2011/09/09,~v0.981}).\\
701 \Pkg{fontspec}パッケージが導入されていればこのパッケージも導入されているはずであるが,
702 このv0.981以外のバージョンでは\LuaTeX-ja上で正しく動作しない危険性がある.
705 \Pkg{xunicode}宏包,当前版本必须为\textit{v0.981(2011/09/09)}。\\
706 如果你使用\Pkg{fontspec}宏包,\Pkg{xunicode}就必须存在。但是请注意该包的
712 The installation methods are as follows:
722 \item Download the source archive, by one of the following method.
723 At the present, \LuaTeX-ja has no \emph{stable} release.
726 \item Copy the Git repository:
728 $ git clone git://git.sourceforge.jp/gitroot/luatex-ja/luatexja.git
730 \item Download the \texttt{tar.gz} archive of HEAD in the \texttt{master} branch from
732 \url{http://git.sourceforge.jp/view?p=luatex-ja/luatexja.git;a=snapshot;h=HEAD;sf=tgz}.
734 \item Now \LuaTeX-ja is available from the following archive and distributions:
736 \item CTAN (in the \texttt{macros/luatex/generic/luatexja} directory)
737 \item MiK\TeX\ (in \texttt{luatexja.tar.lzma})
738 \item \TeX\ Live (in \texttt{texmf-dist/tex/luatex/luatexja})
739 \item W32\TeX\ (in \texttt{luatexja.tar.xz})
741 These are based on the \texttt{master} branch.
744 Note that the \texttt{master} branch, and hence the archive in CTAN, are not updated frequently;
745 the forefront of development is not the \texttt{master} branch.
748 \item ソースアーカイブを以下のいずれかの方法で取得する.現在公開されているのはあくまでも
752 \item Gitリポジトリの内容をコピーする:
754 $ git clone git://git.sourceforge.jp/gitroot/luatex-ja/luatexja.git
756 \item \texttt{master}ブランチのスナップショット(\texttt{tar.gz}形式)をダウンロードする.
758 \url{http://git.sourceforge.jp/view?p=luatex-ja/luatexja.git;a=snapshot;h=HEAD;sf=tgz}.
760 \item 今や,\LuaTeX-jaは以下のアーカイブ,およびディストリビューションにも収録されている:
762 \item CTAN (\texttt{macros/luatex/generic/luatexja})
763 \item MiK\TeX\ (\texttt{luatexja.tar.lzma})
764 \item \TeX\ Live (\texttt{texmf-dist/tex/luatex/luatexja})
765 \item W32\TeX\ (\texttt{luatexja.tar.xz})
767 これらは\texttt{master}ブランチの内容を元にしている.
770 \texttt{master}ブランチ(従って,CTAN内のアーカイブも)はたまにしか更新されないことに注意.
771 主な開発は\texttt{master}の外で行われ,比較的まとまってきたらそれを\texttt{master}に
775 \item 按照如下方法下载源码归档。现在,\LuaTeX-ja没有稳定版本。
780 $ git clone git://git.sourceforge.jp/gitroot/luatex-ja/luatexja.git
782 \item 下载\texttt{master} HEAD版本的\texttt{tar.gz}归档:
784 \url{http://git.sourceforge.jp/view?p=luatex-ja/luatexja.git;a=snapshot;h=HEAD;sf=tgz}.
786 \item 现在\LuaTeX-ja可以在下列仓库和发行版中获取::
788 \item CTAN ( \texttt{macros/luatex/generic/luatexja})
789 \item MiK\TeX\ (\texttt{luatexja.tar.lzma})
790 \item \TeX\ Live (\texttt{texmf-dist/tex/luatex/luatexja})
791 \item W32\TeX\ (\texttt{luatexja.tar.xz})
793 这些版本都基于\texttt{master}分支。
796 注意\texttt{master}分支和CTAN仓库中的版本,升级并不频繁。
797 前段开发并未在\texttt{master}分支。
801 \item Extract the archive. You will see \texttt{src/} and several other sub-directories.
802 But only the contents in \texttt{src/} are needed to work \LuaTeX-ja.
805 \item 「Gitリポジトリをコピー」以外の方法でアーカイブを取得したならば,それを展開する.
806 \texttt{src/}をはじめとしたいくつかのディレクトリができるが,
807 動作には\texttt{src/}以下の内容だけで十分.
810 \item 解压归档。你会看到\texttt{src/}和其他相关文件夹。
811 但是只有\texttt{src/}文件夹下的相关文件是\LuaTeX-ja运行所必须的。
815 \item Copy all the contents of \texttt{src/} into one of your \texttt{TEXMF} tree.
816 \texttt{TEXMF/tex/luatex/luatexja/} is an example location.
817 If you cloned entire Git repository, making a symbolic link of \texttt{src/}
818 instead copying is also good.
821 \item \texttt{src/}の中身を自分の\texttt{TEXMF}ツリーにコピーする.
822 場所の例としては,例えば\texttt{TEXMF/tex/luatex/luatexja/}がある.
823 シンボリックリンクが利用できる環境で,かつリポジトリを直接取得したのであれば,
824 (更新を容易にするために)コピーではなくリンクを貼ることを勧める.
827 \item 复制\texttt{src/}文件夹下内容至\texttt{TEXMF}数下。
828 \texttt{TEXMF/tex/luatex/luatexja/}为例。
829 如果你复制了整个Git仓库,为\texttt{src/}制作软链接来替代复制也是可以的。
833 \item If \texttt{mktexlsr} is needed to update the file name database, make it so.
836 \item 必要があれば,\texttt{mktexlsr}を実行する.
839 \item 如有必要,执行\texttt{mktexlsr}。
843 %<en>\subsection{Cautions}
844 %<ja>\subsection{注意点}
850 \item The encoding of your source file must be UTF-8. No other
851 encodings, such as EUC-JP or Shift-JIS, are not supported.
854 \item 原稿のソースファイルの文字コードはUTF-8固定である.
855 従来日本語の文字コードとして用いられてきたEUC-JPやShift-JISは使用できない.
858 \item 源文档编码必须是UTF-8。其他的编码,如EUC-JP和Shift-JIS都不被支持。
862 %<en>\subsection{Using in plain \TeX}
863 %<ja>\subsection{plain \TeX で使う}
864 %<zh>\subsection{plain \TeX 下使用}
868 To use \LuaTeX-ja in plain \TeX, simply put the following at the beginning of the document:
871 \LuaTeX-jaを plain \TeX で使うためには,単に次の行をソースファイルの冒頭に追加すればよい:
874 在plain \TeX 下使用\LuaTeX-ja相当简易,在文档开头放置一行:
880 This does minimal settings (like \texttt{ptex.tex}) for typesetting Japanese documents:
883 これで(\texttt{ptex.tex}のように)日本語組版のための最低限の設定がなされる:
886 这里做出了做小的日文文档排版设定(如\texttt{ptex.tex}):
891 \item The following 6~Japanese fonts are preloaded:
893 \begin{tabular}{ccccc}
895 \textbf{classification}&\textbf{font name}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
896 \emph{mincho}&Ryumin-Light &\verb+\tenmin+&\verb+\sevenmin+&\verb+\fivemin+\\
897 \emph{gothic}&GothicBBB-Medium&\verb+\tengt+ &\verb+\sevengt+ &\verb+\fivegt+\\
903 \item 以下の6つの和文フォントが定義される:
905 \begin{tabular}{ccccc}
907 \textbf{字体}&\textbf{フォント名}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
908 明朝体&Ryumin-Light &\verb+\tenmin+&\verb+\sevenmin+&\verb+\fivemin+\\
909 ゴシック体&GothicBBB-Medium&\verb+\tengt+ &\verb+\sevengt+ &\verb+\fivegt+\\
915 \item 提前加载了六种日文字体,如下:
917 \begin{tabular}{ccccc}
919 \textbf{字体}&\textbf{字体名}&\bf `10\,pt'&\bf`7\,pt'&\bf`5\,pt'\\\midrule
920 明朝体&Ryumin-Light &\verb+\tenmin+&\verb+\sevenmin+&\verb+\fivemin+\\
921 哥特体&GothicBBB-Medium&\verb+\tengt+ &\verb+\sevengt+ &\verb+\fivegt+\\
928 \item It is widely accepted that the font `Ryumin-Light' and
929 `GothicBBB-Medium' aren't embedded into PDF files, and PDF reader
930 substitute them by some external Japanese fonts (\textit{e.g.},
931 Kozuka Mincho is used for Ryumin-Light in Adobe Reader). We adopt this custom to
935 \item `Ryumin-Light'と`GothicBBB-Medium'はPDFファイルに埋め込まずに
936 名前参照のみで用いることが広く受け入れられており,この場合PDFリーダーが
937 適切な外部フォントで代用する(例えば,Adobe ReaderではRyumin-Lightは
938 小塚明朝で代替される).そこで,これらを引き続きデフォルトのフォントと
942 \item 广为接受的“Ryumin-Light”和“GothicBBB-Medium”字体不嵌入PDF文件,
943 而PDF阅读器则会使用外部日文字体替代(例如,在Adobe Reader中使用
944 Kozuka Mincho字体替代Ryumin-Light)。我们使用默认设定。
948 \item A character in an alphabetic font is generally smaller than a
949 Japanese font in the same size. So actual size specification of
950 these Japanese fonts is in fact smaller than that of alphabetic
951 fonts, namely scaled by 0.962216.
954 \item 欧文フォントの文字は和文フォントの文字よりも,同じ文字サイズでも
955 一般に小さくデザインされている.そこで,標準ではこれらの和文フォントの実際のサイズは指定された値よりも
956 小さくなるように設定されており,具体的には指定の0.962216倍にスケールされる.
957 この0.962216という数値も,\pTeX におけるスケーリングを踏襲した値である.
960 \item 一般情况下,相同大小日文字体比西文字体要大一下。所以实际的日文字体尺寸需哟小于西文字
966 \item The amount of glue that are inserted between a \textbf{JAchar} and
967 an \textbf{ALchar} (the parameter \Param{xkanjiskip}) is set to
970 \item \textbf{JAchar}と\textbf{ALchar}の間に入るグルー(\Param{xkanjiskip})の
974 \item 在\textbf{JAchar}和\textbf{ALchar}之间插入的胶(\textsf{xkanjiskip}参数)大小为:
977 (0.25\cdot 0.962216\cdot 10\,\mathrm{pt})^{+1\,\text{pt}}_{-1\,\text{pt}}
978 = 2.40554\,\mathrm{pt}^{+1\,\text{pt}}_{-1\,\text{pt}}.
982 %<en>\subsection{Using in \LaTeX}
983 %<ja>\subsection{\LaTeX で使う}
984 %<zh>\subsection{\LaTeX 下使用}
990 Using in \LaTeXe\ is basically same. To set up the minimal environment
991 for Japanese, you only have to load \texttt{luatexja.sty}:
994 \LaTeXe を用いる場合も基本的には同じである.日本語組版のための最低限の環境を
995 設定するためには,\texttt{luatexja.sty}を読み込むだけでよい:
998 在\LaTeXe 下使用基本相同。设定日文的最小环境,你只需加载\texttt{luatexja.sty}:
1001 \usepackage{luatexja}
1004 It also does minimal settings (counterparts in \pLaTeX\ are \texttt{
1005 plfonts.dtx} and \texttt{pldefs.ltx}):
1008 これで\pLaTeX の\texttt{plfonts.dtx}と\texttt{pldefs.ltx}に相当する最低限の設定が
1012 这些做了最小的设定(作用相当于\pLaTeX 中的\texttt{plfonts.dtx}和\texttt{pldefs.ltx}):
1017 \item \texttt{JY3} is the font encoding for Japanese fonts (in horizontal direction).\\
1018 When vertical typesetting is supported by \LuaTeX-ja in the future, \texttt{JT3} will be used for vertical fonts.
1021 \item \texttt{JY3}は和文フォント用のフォントエンコーディングである(横書き用).\\
1022 将来的に,\LuaTeX-jaで縦書きがサポートされる際には,\texttt{JT3}を縦書き用として
1026 \item \texttt{JY3}是日文字体编码(在水平方向)。\\
1027 在将来\LuaTeX-ja要支持直行排版的时候,\texttt{JT3}会用于直行字体。
1031 \item Two font families \texttt{mc} and \texttt{gt} are defined:
1032 \begin{center}\small
1033 \begin{tabular}{ccccc}
1035 \textbf{classification}&\textbf{family}&\verb+\mdseries+&\verb+\bfseries+&\textbf{scale}\\\midrule
1036 \emph{mincho}&\tt mc&Ryumin-Light &GothicBBB-Medium&0.962216\\
1037 \emph{gothic}&\tt gt&GothicBBB-Medium&GothicBBB-Medium&0.962216\\
1041 Remark that the bold series in both family are same as the medium series of \emph{gothic} family.
1042 This is a convention in \pLaTeX. This is a trace that there were only 2~fonts (these are Ryumin-Light
1043 and GothicBBB-Medium) in early years of DTP.
1046 \item 2つのフォントファミリ\texttt{mc}と\texttt{gt}が定義されている:
1047 \begin{center}\small
1048 \begin{tabular}{ccccc}
1050 \textbf{字体}&\textbf{ファミリ}&\verb+\mdseries+&\verb+\bfseries+&\textbf{スケール}\\\midrule
1051 明朝体&\tt mc&Ryumin-Light &GothicBBB-Medium&0.962216\\
1052 ゴシック体&\tt gt&GothicBBB-Medium&GothicBBB-Medium&0.962216\\
1056 どちらのファミリにおいても,そのboldシリーズはゴシック体のmediumシリーズで
1057 あることに注意.これは初期のDTPにおいて和文フォントが2つ(それがちょうど\
1058 Ryumin-Light, GothicBBB-Mediumだった)しか利用できなかった時の名残であり,\pLaTeX{}
1062 \item 定义了两个字体族:\texttt{mc}!和\texttt{gt}:\\
1063 \begin{center}\small
1064 \begin{tabular}{ccccc}
1066 \textbf{字体}&\textbf{字体族}&\verb!\mdseries!&\verb!\bfseries!&缩放率\\
1068 \textit{mincho}&\verb!mc!&Ryumin-Light&GothicBBB-Medium&0.962216\\
1069 \textit{gothic}&\verb!gt!&GothicBBB-Medium&GothicBBB-Medium&0.962216\\
1073 注意的是两个字体族的粗体系列同为中等系列的\textbf{哥特}族。这\pLaTeX 中的规定。在近些年
1074 中的DTP实务中有仅使用2个字体的趋向(是为Ryumin-Light和GothicBBB-Medium)。
1078 \item Japanese characters in math mode are typeset by the font family \texttt{mc}.
1081 \item 数式モード中の和文文字は\texttt{mc}ファミリで出力される.
1084 \item 在数学模式下,日文字符使用\verb!mc!字体族来排印。
1089 However, above settings are not sufficient for Japanese-based
1090 documents. To typeset Japanese-based documents, you are better to use
1091 class files other than \texttt{article.cls}, \texttt{book.cls}, and so on. At
1092 the present, we have the counterparts of \Pkg{jclasses} (standard
1093 classes in \pLaTeX) and \Pkg{jsclasses} (classes by Haruhiko
1094 Okumura), namely, \Pkg{ltjclasses} and \Pkg{ltjsclasses}.
1097 しかしながら,上記の設定は日本語の文書にとって十分とは言えない.
1098 日本語文書を組版するためには,\texttt{article.cls}, \texttt{book.cls}といった
1099 欧文用のクラスファイルではなく,和文用のクラスファイルを用いた方がよい.
1100 現時点では,\Pkg{jclasses}(\pLaTeX の標準クラス)と\Pkg{jsclasses}
1101 (奥村晴彦氏によるクラスファイル)に対応するものとして,\Pkg{ltjclasses},
1102 \Pkg{ltjsclasses}がそれぞれ用意されている.
1105 不过,上述设定并不能满足排版基于日文的文档。为了排印基于日文的文
1106 档,你最好不要使用\texttt{article.cls},\texttt{book.cls}等文档类文件。
1107 现在,我们有相当于\Pkg{jclasses}(\pLaTeX 标准文档类)和\Pkg{jsclasses}
1108 (奥村晴彦)的文档类,即\Pkg{ltjclasses}和\Pkg{ltjsclasses}。
1111 %<en>\section{Changing Fonts}
1112 %<ja>\section{フォントの変更}
1115 \subsection{plain \TeX~and~\LaTeXe}
1118 \paragraph{plain \TeX}
1120 To change Japanese fonts in plain \TeX, you must use the primitive
1121 \verb+\jfont+. So please see Subsection~\ref{ssec-jfont}.
1124 plain \TeX で和文フォントを変更するためには,\verb+\jfont+ プリミティブを直接用いる.
1125 \ref{ssec-jfont}節を参照.
1128 在plain \TeX 下改变日文字体,你必须使用基本语句\verb!\jfont!。请参见\ref{ssec-jfont}。
1131 \paragraph{\LaTeXe\ (NFSS2)}
1133 For \LaTeXe, \LuaTeX-ja adopted most of the font selection system of \pLaTeXe\ (in \texttt{plfonts.dtx}).
1136 \LaTeXe については,\LuaTeX-jaではフォント選択システムを\pLaTeXe\ (\texttt{plfonts.dtx})
1140 对于\LaTeXe,\LuaTeX-ja采用了\pLaTeXe 中(即\texttt{plfonts.dtx})大部分字体选择系统。
1144 \item Two control sequences \verb+\mcdefault+ and \verb+\gtdefault+ are
1145 used to specify the default font families for \emph{mincho} and
1146 \emph{gothic}, respectively. Default values: \texttt{mc} for
1147 \verb+\mcdefault+ and \texttt{gt} for \verb+\gtdefault+.
1150 \item 2つのコントロールシーケンス \verb+\mcdefault+ と \verb+\gtdefault+ がそれぞ
1151 れ明朝体とゴシック体のデフォルトのフォントファミリを指定するために用いられる.
1152 初期値:\verb+\mcdefault+ は\texttt{mc},\verb+\gtdefault+ は\texttt{gt}.
1155 \item \verb!\mcdefault!和\verb!\gtdefault!控制语句用来分别控制默认的\textit{mincho}和\textit{gothic}字体族。
1156 默认值:\texttt{mc}用于\verb!\mcdefault!,\texttt{gt}用于\verb!\gtdefault!。
1159 \item Commands \verb+\fontfamily+, \verb+\fontseries+,
1160 \verb+\fontshape+ and \verb+\selectfont+ can be used to change
1161 attributes of Japanese fonts.
1164 \item \verb+\fontfamily+, \verb+\fontseries+, \verb+\fontshape+, そして
1165 \verb+\selectfont+ が和文フォントの属性を変更するために使用できる.
1168 \item 命令\verb!\fontfamily!,\verb!\fontseries!,\verb!\fontshape!个\verb!\selectfont!用来改变日文字体属性。
1172 \begin{center}\small
1173 \begin{tabular}{cccccc}
1175 &\textbf{encoding}&\textbf{family}&\textbf{series}&\textbf{shape}&\textbf{selection}\\\midrule
1177 &\verb+\romanencoding+&\verb+\romanfamily+&\verb+\romanseries+&\verb+\romanshape+
1180 &\verb+\kanjiencoding+&\verb+\kanjifamily+&\verb+\kanjiseries+&\verb+\kanjishape+
1182 both&---&--&\verb+\fontseries+&\verb+\fontshape+&---\\
1183 auto select&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
1189 \begin{center}\small
1190 \begin{tabular}{cccccc}
1192 &\textbf{エンコーディング}&\textbf{ファミリ}&\textbf{シリーズ}&\textbf{シェープ}&\textbf{選択}\\\midrule
1194 &\verb+\romanencoding+&\verb+\romanfamily+&\verb+\romanseries+&\verb+\romanshape+
1197 &\verb+\kanjiencoding+&\verb+\kanjifamily+&\verb+\kanjiseries+&\verb+\kanjishape+
1199 両方&---&--&\verb+\fontseries+&\verb+\fontshape+&---\\
1200 自動選択&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
1206 \begin{center}\small
1207 \begin{tabular}{cccccc}
1209 &\textbf{编码}&\textbf{族}&\textbf{系列}&\textbf{形状}&\textbf{选择}\\\midrule
1211 &\verb+\romanencoding+&\verb+\romanfamily+&\verb+\romanseries+&\verb+\romanshape+
1214 &\verb+\kanjiencoding+&\verb+\kanjifamily+&\verb+\kanjiseries+&\verb+\kanjishape+
1216 两者&---&--&\verb+\fontseries+&\verb+\fontshape+&---\\
1217 自动选择&\verb+\fontencoding+&\verb+\fontfamily+&---&---&\verb+\usefont+\\
1224 \verb+\fontencoding{<encoding>}+ changes the encoding of alphabetic fonts
1225 or Japanese fonts depending on the argument. For example,
1226 \verb+\fontencoding{JY3}+ changes the encoding of Japanese fonts to
1227 \texttt{JY3} and \verb+\fontencoding{T1}+ changes the encoding of
1228 alphabetic fonts to \texttt{T1}.
1229 \verb+\fontfamily+ also changes the family of Japanese fonts, alphabetic
1230 fonts, \emph{or both}. For detail, see Subsection~\ref{ssub-nfsspat}.
1233 ここで,\verb+\fontencoding{<encoding>}+ は,引数により和文側か欧文
1234 側かのどちらかのエンコーディングを変更する.例えば,
1235 \verb+\fontencoding{JY3}+ は和文フォントのエンコーディングを
1236 \texttt{JY3}に変更し,\verb+\fontencoding{T1}+ は欧文フォント側を
1237 \texttt{T1}へと変更する.\verb+\fontfamily+ も引数により和文側,欧文
1238 側,\textbf{あるいは両方}のフォントファミリを変更する.詳細は
1239 \ref{ssub-nfsspat}節を参照すること.
1242 \verb!\fontencoding{<encoding>}!依赖于参数以改变西文字体或者日文字体。
1243 例如,\verb!\fontencoding{JY3}!改变当前日文字体至\texttt{JY3},
1244 \verb!\fontencoding{T1}!改变西文字体至\texttt{T1}。
1245 \verb!\fontfamily!也会改变日文字体或西文字体的族,抑或二者。
1246 细节详见\ref{ssub-nfsspat}。
1250 \item For defining a Japanese font family, use
1251 \verb+\DeclareKanjiFamily+ instead of
1252 \verb+\DeclareFontFamily+. However, in the present implementation,
1253 using \verb+\DeclareFontFamily+ doesn't cause any problem.
1256 \item 和文フォントファミリの定義には \verb+\DeclareFontFamily+ の
1257 代わりに \verb+\DeclareKanjiFamily+ を用いる.しかし,現在の
1258 実装では \verb+\DeclareFontFamily+ を用いても問題は生じない.
1261 \item 对于定义日文字体族,使用\verb!\DeclareKanjiFamily!代替\verb!\DeclareFontFamily!。
1262 不过,在现在的实现中,使用\verb!\DeclareFontFamily!不会引起任何问题。
1267 \paragraph{Remark: Japanese Characters in Math Mode}
1268 Since \pTeX\ supports Japanese characters in math mode, there are
1269 sources like the following:
1272 \paragraph{注意:数式モード中の和文文字}
1273 \pTeX では,特に何もしないでも数式中に和文文字を記述することができた.そのため,
1277 \paragraph{注记:数学模式下的日文字符}
1278 \pTeX 支持在数学模式下的日文字符,如以下源码:
1282 $f_{高温}$~($f_{\text{high temperature}}$).
1283 \[ y=(x-1)^2+2\quad よって\quad y>0 \]
1284 $5\in 素:=\{\,p\in\mathbb N:\text{$p$ is a prime}\,\}$.
1287 We (the project members of \LuaTeX-ja) think that using
1288 Japanese characters in math mode are allowed if and only if these are used as identifiers.
1289 In this point of view,
1292 \LuaTeX-jaプロジェクトでは,数式モード中での和文文字はそれらが識別子として用いられる
1297 我们(\LuaTeX-ja项目成员)认为在数学模式下使用日文字符,只有在这些字符充当标识符时才是正确的。在这点下:
1301 \item The lines 1~and~2 above are not correct, since `高温' in above is used as a textual label, and
1302 `よって' is used as a conjunction.
1305 \item 上記数式のうち1, 2行目は正しくない.なぜならば`高温'が意味のあるラベルと
1306 して,`よって'が接続詞として用いられているからである.
1309 \item 第1行和第2行是不正确的,因为“高温”的作用为文本标签,“よって”用作为连词。
1312 \item However, the line~3 is correct, since `素' is used as an identifier.
1315 \item しかしながら,3行目は`素'が識別子として用いられているので正しい.
1318 \item 不过,第3行是正确的,因为“素”是作为标识符的。
1322 Hence, in our opinion, the above input should be corrected as:
1325 したがって,\LuaTeX-jaプロジェクトの意見としては,上記の入力は次のように直されるべき
1329 那么,根据我们的观点,上述输入应当校正为:
1333 ($f_{\text{high temperature}}$).
1335 \mathrel{\text{よって}}\quad y>0 \]
1336 $5\in 素:=\{\,p\in\mathbb N:\text{$p$ is a prime}\,\}$.
1338 %BUG?: \{\}がなければ「素」がでない.上の段落の「よって」もでてない.
1340 We also believe that using Japanese characters as identifiers is rare,
1341 hence we don't describe how to change Japanese fonts in math mode in
1342 this chapter. For the method, please see Subsection~\ref{ssec-math}.
1345 また\LuaTeX-jaプロジェクトでは,和文文字が識別子として用いられることはほとんどない
1346 と考えており,したがってこの節では数式モード中の和文フォントを変更する方法については
1347 記述しない.この方法については\ref{ssec-math}節を参照のこと.
1350 我们也认为使用日文字符作为标识符的情况极为少见,所以我们不在此章节描述如何在数学模式下改变日文字体。
1351 关于此方法,请参见\ref{ssec-math}。
1354 \subsection{fontspec}
1355 \label{ssec-fontspec}
1357 To coexist with the \Pkg{fontspec} package, it is needed to load
1358 \Pkg{luatexja-fontspec} package in the preamble. This additional
1359 package automatically loads \Pkg{luatexja} and \Pkg{fontspec}
1363 \Pkg{fontspec}パッケージと同様の機能を和文フォントに対しても用いるためには,
1364 \Pkg{luatexja-fontspec}パッケージをプリアンブルで読み込む必要がある.このパッケージ
1365 は必要ならば自動で\Pkg{luatexja}パッケージと\Pkg{fontspec}パッケージを読み込む.
1368 为与\Pkg{fontspec}宏包共存,需要在导言区中使用\Pkg{luatexja-fontspec}宏包。
1369 这个附加宏包会自动加载\Pkg{luatexja}和\Pkg{fontspec}。
1373 In \Pkg{luatexja-fontspec} package, the following 7~commands are defined as
1374 counterparts of original commands in the \Pkg{fontspec} package:
1377 \Pkg{luatexja-fontspec}パッケージでは,以下の7つのコマンドを\Pkg{fontspec}
1378 パッケージの元のコマンドに対応するものとして定義している:
1381 在\Pkg{luatexja-fontspec}中,定义了如下七条命令,这些命令和\Pkg{fontspec}的相关命令对比如下:
1384 \begin{center}\small
1385 \begin{tabular}{ccccc}
1388 &\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\newjfontfamily+\\
1390 &\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+&\verb+\newfontfamily+\\
1393 &\verb+\newjfontface+&\verb+\defaultjfontfeatures+&\verb+\addjfontfeatures+\\
1395 &\verb+\newfontface+&\verb+\defaultfontfeatures+&\verb+\addfontfeatures+\\
1401 \begin{center}\small
1402 \begin{tabular}{cccc}
1405 &\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+\\
1407 &\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+\\
1410 &\verb+\newjfontfamily+&\verb+\newjfontface+&\verb+\defaultjfontfeatures+\\
1412 &\verb+\newfontfamily+&\verb+\newfontface+&\verb+\defaultfontfeatures+\\
1415 &\verb+\addjfontfeatures+\\
1417 &\verb+\addfontfeatures+\\
1423 \begin{center}\small
1424 \begin{tabular}{ccccc}
1426 日文字体&\verb+\jfontspec+&\verb+\setmainjfont+&\verb+\setsansjfont+&\verb+\newjfontfamily+\\
1427 西文字体&\verb+\fontspec+&\verb+\setmainfont+&\verb+\setsansfont+&\verb+\newfontfamily+\\
1429 日文字体&\verb+\newjfontface+&\verb+\defaultjfontfeatures+&\verb+\addjfontfeatures+&\\
1430 西文字体&\verb+\newfontface+&\verb+\defaultfontfeatures+&\verb+\addfontfeatures+&\\
1437 \fontspec[Numbers=OldStyle]{LMSans10-Regular}
1438 \jfontspec{IPAexMincho}
1441 \addjfontfeatures{CJKShape=JIS1990}
1446 Note that there is no command named \verb+\setmonojfont+, since it is
1447 popular for Japanese fonts that nearly all Japanese glyphs have same
1448 widths. Also note that the kerning feature is set off by default in
1449 these 7~commands, since this feature and \textbf{JAglue} will clash (see
1453 和文フォントについては全ての和文文字のグリフがほぼ等幅であるのが普通であるため,
1454 \verb+\setmonojfont+ コマンドは存在しないことに注意.また,これらの和文用の7つのコマ
1455 ンドではKerning featureはデフォルトではoffとなっている.これはこの
1456 featureが\textbf{JAglue}と衝突するためである(\ref{para-kern}節を参照).
1459 请注意并没有\verb!\setmonofont!命令,因为流行的日文字体几乎全部是等宽的。
1460 另注意,出格特性在这7个命令中默认关闭,因为此特性会与\textbf{JAglue}冲突(参见\ref{para-kern})。
1463 %<en>\subsection{Preset}
1464 %<ja>\subsection{プリセット設定}
1468 To use standard Japanese font settings easily, one can load \Pkg{luatexja-preset}
1469 package with several options. This package provides functions in a part of
1470 \Pkg{otf} package and a part of \Pkg{PXchfon} package by Takayuki Yato,
1471 and loads \Pkg{luatexja-fontspec} internally.
1474 よく使われている和文フォント設定を一行で指定できるようにしたのが
1475 \Pkg{luatexja-preset}パッケージである.このパッケージは,
1476 \Pkg{otf}パッケージの一部機能と八登崇之氏による\Pkg{PXchfon}パッケージの一部機能とを
1477 合わせたような格好をしており,内部で\Pkg{luatexja-fontspec}を読み込んでいる.
1480 %<en>\paragraph{General options}
1481 %<ja>\paragraph{一般的なオプション}
1482 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
1485 Specifying this option enables us to use mincho with two weights,
1486 gothic with three weights, and round gothic
1487 (\verb+\mgfamily+, because round gothic is called \textit{maru gothic} in Japanese).
1488 Gothic has the weights regular, bold and heavy, and one can use the heavy gothic
1489 by changing family (\verb+\gtebfamily+).
1490 Since \Pkg{fontspec} package can handle only regular (\verb+\mdseries+) and
1491 bold (\verb+\bfseries+), this incomplete implementation is provided.
1494 明朝体2ウェイト・ゴシック体3ウェイトと,
1495 丸ゴシック体 (\verb+\mgfamily+) を使用可能とする.
1496 ゴシック体は細字・太字・極太の3ウェイトがあるが,極太ゴシック体はファミリの切り替え (\verb+\gtebfamily+) %
1497 で実現している.\Pkg{fontspec}では通常 (\verb+\mdseries+) と太字 (\verb+\bfseries+) しか扱えないために
1502 Use horizontal kana characters and define \verb+\rubyfamily+ to use kana
1503 characters designed for ruby.
1506 横組専用仮名を用いる.また,\verb+\rubyfamily+ でルビ用仮名が使用可能となる.
1510 Use bold gothic as bold mincho.
1517 Use 90JIS glyphs if possible.
1524 Use JIS2004 glyphs if possible.
1531 Use JFM of \texttt{jfm-jis.lua}. When not specifying this option,
1532 standard \texttt{jfm-ujis.lua} is used.
1535 用いるJFMを\texttt{jfm-jis.lua}とする.このオプションがない時は
1536 \LuaTeX-ja標準の\texttt{jfm-ujis.lua}が用いられる.
1540 %<en>\paragraph{Kozuka fonts}
1541 %<ja>\paragraph{小塚フォント}
1543 When using single weight, we specify Kozuka Gothic M as gothic
1544 because Kozuka Gothic R looks thin.
1545 There is not Kozuka Round Gothic, therefore Kozuka Gothic H is alternatively
1546 specified as round gothic.
1549 まず,小塚フォントを用いる設定を述べる.
1550 単ウェイト時のゴシック体は小塚ゴシックRでは細いように感じるので,
1552 さらに,丸ゴシック体はないので便宜上小塚ゴシックHで代用している.
1554 \begin{center}\small
1555 \begin{tabular}{llll}
1557 &\tt kozuka4&\tt kozuka6&\tt kozuka6n\\
1560 \bf mincho regular&Kozuka Mincho Pro R&Kozuka Mincho ProVI R&Kozuka Mincho Pr6N R\\
1561 \bf mincho bold&Kozuka Mincho Pro B&Kozuka Mincho ProVI B&Kozuka Mincho Pr6N B\\
1563 \bf gothic regular\\
1565 &Kozuka Gothic Pro M&Kozuka Gothic ProVI M&Kozuka Gothic Pr6N M\\
1567 &Kozuka Gothic Pro R&Kozuka Gothic ProVI R&Kozuka Gothic Pr6N R\\
1570 &Kozuka Gothic Pro B&Kozuka Gothic ProVI B&Kozuka Gothic Pr6N B\\
1572 &Kozuka Gothic Pro H&Kozuka Gothic ProVI H&Kozuka Gothic Pr6N H\\
1574 &Kozuka Gothic Pro H&Kozuka Gothic ProVI H&Kozuka Gothic Pr6N H\\
1577 \gt 明朝体細字&小塚明朝Pro~R&小塚明朝ProVI~R&小塚明朝Pr6N~R\\
1578 \gt 明朝体太字&小塚明朝Pro~B&小塚明朝ProVI~B&小塚明朝Pr6N~B\\
1582 &小塚ゴシックPro~M&小塚ゴシックProVI~M&小塚ゴシックPr6N~M\\
1584 &小塚ゴシックPro~R&小塚ゴシックProVI~R&小塚ゴシックPr6N~R\\
1587 &小塚ゴシックPro~B&小塚ゴシックProVI~B&小塚ゴシックPr6N~B\\
1589 &小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\
1590 \inhibitglue(丸ゴシック体)\inhibitglue
1591 &小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\
1597 %<en>\paragraph{Hiragino and Morisawa}
1598 %<ja>\paragraph{ヒラギノ・モリサワ}
1600 Settings for Hiragino fonts:
1603 モリサワ・ヒラギノ用の設定はそのようなことは行っていない.
1606 % これらは持っているわけではないので,フォント名が
1607 % 異なっているかもしれません.確認お願いします.
1608 \begin{center}\small
1609 \begin{tabular}{lll}
1611 &\tt hiragino&\tt hiraginon\\
1615 Hiragino Mincho Pro W3&Hiragino Mincho Pr6N W3\\
1617 Hiragino Mincho Pro W6&Hiragino Mincho Pr6N W6\\
1619 Hiragino Kaku Gothic Pro W3&Hiragino Kaku Gothic ProN W3\\
1621 Hiragino Kaku Gothic Pro W6&Hiragino Kaku Gothic ProN W6\\
1623 Hiragino Kaku Gothic Std W8&Hiragino Kaku Gothic StdN W8\\
1625 Hiragino Maru Gothic Pro W4&Hiragino Maru Gothic ProN W4\\
1629 ヒラギノ明朝体Pro~W3&ヒラギノ明朝体Pr6N~W3\\
1631 ヒラギノ明朝体Pro~W6&ヒラギノ明朝体Pr6N~W6\\
1633 ヒラギノ角ゴPro~W3&ヒラギノ角ゴProN~W3\\
1635 ヒラギノ角ゴPro~W6&ヒラギノ角ゴProN~W6\\
1637 ヒラギノ角ゴStd~W8&ヒラギノ角ゴStdN~W8\\
1639 ヒラギノ丸ゴPro~W4&ヒラギノ丸ゴProN~W4\\
1645 Settings for Morisawa fonts:
1648 次はモリサワフォントを用いる設定である:
1650 \begin{center}\small
1651 \begin{tabular}{lll}
1653 &\tt morisawa4&\tt morisawa6n\\
1657 Ryumin Pro L-KL&Ryumin Pr6N L-KL\\
1659 Futo Min A101 Pro Bold&Futo Min A101 Pr6N Bold\\
1661 Chu Gothic BBB Pro Med&Chu Gothic BBB Pr6N Med\\
1663 Futo Go B101 Pro Bold&Futo Go B101 Pr6N Bold\\
1665 Midashi Go Pro MB31&Midashi Go Pr6N MB31\\
1667 Jun Pro 101&Jun Pr6N 101\\
1671 リュウミンPro~L-KL&リュウミンPr6N~L-KL\\
1673 太ミンA101~Pro~Bold&太ミンA101~Pr6N~Bold\\
1675 中ゴシックBBB~Pro~Med&中ゴシックBBB~Pr6N~Med\\
1677 太ゴB101~Pro~Bold&太ゴB101~Pr6N~Bold\\
1679 見出ゴPro~MB31&見出ゴPr6N~MB31\\
1681 じゅんPro 101&じゅんPr6N 101\\
1687 %<en>\paragraph{Settings for single weight}
1688 %<ja>\paragraph{単ウェイト用設定}
1690 Next, we describe settings for single weight.
1691 These four settings use a same font for regular and bold fonts,
1692 and gothic font is also used for round gothic font.
1695 次に,単ウェイト用の設定を述べる.この4設定では「細字」「太字」の区別はない.
1696 また,丸ゴシック体はゴシック体と同じフォントを用いる.
1698 \begin{center}\small
1699 \begin{tabular}{lllll}
1701 &\tt noembed&\tt ipa&\tt ipaex&\tt ms\\
1704 \bf mincho&Ryumin-Light (non-embedded)
1705 &IPAMincho&IPAexMincho&MS Mincho\\
1706 \bf gothic&GothicBBB-Medium (non-embedded)
1707 &IPAGothic&IPAexGothic&MS Gothic\\
1710 \gt 明朝体&Ryumin-Light(非埋込)
1711 &IPA明朝&IPAex明朝&MS明朝\\
1712 \gt ゴシック体&GothicBBB-Medium(非埋込)
1713 &IPAゴシック&IPAexゴシック&MSゴシック\\
1719 %<en>\paragraph{Use HG fonts}
1720 %<ja>\paragraph{HGフォントの利用}
1722 In addition to the above, HG fonts bundled with Microsoft Office are also available.
1725 すぐ前に書いた単ウェイト用設定を,Microsoft Office等に付属するHGフォントを使って
1728 \begin{center}\small
1729 \begin{tabular}{llll}
1731 &\tt ipa-dx&\tt ipaex-dx&\tt ms-dx\\
1735 &IPAMincho&IPAexMincho&MS Mincho\\\midrule
1737 \multicolumn{3}{c}{HG Mincho E}\\\midrule
1738 \bf Gothic regular\\
1740 &IPAGothic&IPAexGothic&MS Gothic\\
1742 &IPAGothic&IPAexGothic&MS Gothic\\
1745 \multicolumn{3}{c}{HG Gothic M}\\\midrule
1747 \multicolumn{3}{c}{HG Gothic E}\\\midrule
1749 \multicolumn{3}{c}{HG Soei Kaku Gothic UB}\\\midrule
1751 \multicolumn{3}{c}{HG Maru Gothic PRO}\\
1755 &IPA明朝&IPAex明朝&MS明朝\\\midrule
1757 \multicolumn{3}{c}{HG明朝E}\\\midrule
1760 &IPAゴシック&IPAexゴシック&MSゴシック\\
1762 &IPAゴシック&IPAexゴシック&MSゴシック\\
1765 \multicolumn{3}{c}{HGゴシックM}\\\midrule
1767 \multicolumn{3}{c}{HGゴシックE}\\\midrule
1769 \multicolumn{3}{c}{HG創英角ゴシックUB}\\\midrule
1771 \multicolumn{3}{c}{HG丸ゴシック体PRO}\\
1777 Note that HG Mincho E, HG Gothic E, HG Soei Kaku Gothic UB and HG Maru Gothic PRO
1778 are internally specified by
1780 \item[default] font name (\texttt{HGMinchoE}, etc.),
1781 \item[{\tt 90jis}] file name (\texttt{hgrme.ttc}, \texttt{hgrge.ttc}, \texttt{hgrsgu.ttc}, \texttt{hgrsmp.ttf}),
1782 \item[{\tt jis2004}] file name (\texttt{hgrme04.ttc}, \texttt{hgrge04.ttc}, \texttt{hgrsgu04.ttc}, \texttt{hgrsmp04.ttf}),
1787 なお,HG明朝E・HGゴシックE・HG創英角ゴシックUB・HG丸ゴシック体PROの4つについては,内部で
1789 \item[標準] フォント名(\texttt{HGMinchoE} など)
1790 \item[{\tt 90jis}指定時] ファイル名 (%
1791 \texttt{hgrme.ttc}, \texttt{hgrge.ttc}, \texttt{hgrsgu.ttc}, \texttt{hgrsmp.ttf})
1792 \item[{\tt jis2004}指定時] ファイル名 (%
1793 \texttt{hgrme04.ttc}, \texttt{hgrge04.ttc}, \texttt{hgrsgu04.ttc}, \texttt{hgrsmp04.ttf})
1795 として指定を行っているので注意すること.
1800 \subsection{\texttt{\char92 CID}, \texttt{\char92 UTF} and macros in \Pkg{otf} package}
1801 Under \pLaTeX, \Pkg{otf} package (developed by Shuzaburo Saito) is
1802 used for typesetting characters which is in Adobe-Japan1-6 CID but not
1803 in JIS~X~0208. Since this package is widely used, \LuaTeX-ja
1804 supports some of functions in \Pkg{otf} package.
1805 If you want to use these functions, load \Pkg{luatexja-otf} package.
1808 \subsection{\texttt{\char92 CID}, \texttt{\char92 UTF}と\Pkg{otf}パッケージのマクロ}
1809 \pLaTeX では,JIS~X~0208にないAdobe-Japan1-6の文字を出力するために,
1810 齋藤修三郎氏による\Pkg{otf}パッケージが用いられていた.このパッケージは
1811 広く用いられているため,\LuaTeX-jaにおいても\Pkg{otf}パッケージの機能の
1812 一部をサポートしている.これらの機能を用いるためには\Pkg{luatexja-otf}パッケージ
1816 \subsection{\Pkg{otf}包中的\texttt{\char92CID},\texttt{\char92UTF}及其他宏}
1817 \pLaTeX 下,\underline{\texttt{otf}}宏包(斋藤修三郎开发)是用来排印存在
1818 于Adobe-Japan1-6但不存在于JIS X 0208中的字符。
1819 该包已经广泛使用,\LuaTeX-ja支持部分\Pkg{otf}包中的部分功能。
1820 如果你想使用这些功能,加载\Pkg{luatexja-otf}宏包。
1822 \fontencoding{JY3}\selectfont
1826 森\UTF{9DD7}外と内田百\UTF{9592}とが\UTF{9AD9}島屋に行く。
1828 \CID{7652}飾区の\CID{13706}野家,
1836 \Pkg{otf}パッケージでは,それぞれ次のようなオプションが存在した:
1838 \item[\texttt{deluxe}] 明朝体・ゴシック体各2ウェイトと,丸ゴシック体を扱えるようになる.
1839 \item[\texttt{expert}] 仮名が横組・縦組専用のものに切り替わり,ルビ用仮名も扱えるようになる.
1840 \item[\texttt{bold}] ゴシック体を標準で太いウェイトのものに設定する.
1842 これらは,\Pkg{otf}パッケージが文書中で使用する
1843 和文用TFMを自前の物に置き換えていることで可能になっている.
1845 一方,\Pkg{luatexja-otf}パッケージでは,文書中で使用する和文用JFMを置き換えることはしない.
1846 そのため,上に述べた3つのオプションと同等のことを実現するには,\ref{ssub-chgfnt}節 (NFSS2) や
1847 \ref{ssec-fontspec}節 (\Pkg{fontspec}) によって\textbf{事前に}設定しておかなければならない.
1850 %<en>\section{Changing Parameters}
1851 %<ja>\section{パラメータの変更}
1855 There are many parameters in \LuaTeX-ja. And due to the behavior of \LuaTeX,
1856 most of them are not stored as internal register of \TeX, but as an
1857 original storage system in \LuaTeX-ja. Hence, to assign or acquire those
1858 parameters, you have to use commands \verb+\ltjsetparameter+ and
1859 \verb+\ltjgetparameter+.
1862 \LuaTeX-jaには多くのパラメータが存在する.そして\LuaTeX の仕様のために,
1863 その多くは\TeX のレジスタにではなく,\LuaTeX-ja独自の方法で保持されている.
1864 そのため,これらのパラメータを設定・取得するためには \verb+\ltjsetparameter+ と \verb+\ltjgetparameter+ を
1868 \LuaTeX-ja包含大量的参数,以控制排版细节。
1869 设定这些参数需要使用命令:\verb!\ltjsetparameter!和\verb!\ltjgetparameter!命令。
1872 %<en>\subsection{Editing the range of \textbf{JAchar}s}
1873 %<ja>\subsection{\textbf{JAchar}の範囲の設定}
1874 %<zh>\subsection{\textbf{JAchar}范围设定}
1878 To edit the range of \textbf{JAchar}s, you have to assign a non-zero
1879 natural number which is less than 217 to the character range first. This
1880 can be done by using \verb+\ltjdefcharrange+ primitive. For example, the
1881 next line assigns whole characters in Supplementary Ideographic Plane
1882 and the character `漢' to the range number~100.
1885 \textbf{JAchar}の範囲を設定するためには,まず各文字に0より大きく217より小さいindexを
1886 割り当てる必要がある.これには \verb+\ltjdefcharrange+ プリミティブを用いる.
1887 例えば,次のように書くことで追加漢字面(SIP)にある全ての文字と`漢'が
1888 「100番の文字範囲」に属するように設定される.
1891 在设定\textbf{JAchar}之前,需要分配一个小于217的自然数。
1892 这个可以由\verb!\ltjdefcharrange!基本语句来完成。例如,
1893 下面就分配了整个表意文字补充平面和汉字“漢”为100。
1896 \ltjdefcharrange{100}{"10000-"1FFFF,`漢}
1899 This assignment of numbers to ranges are always global, so you should
1900 not do this in the middle of a document.
1903 この文字範囲の割り当ては常にグローバルであり,したがって文書の途中で
1907 范围数的分配是全局的,故你不可在文档中使用。
1911 If some character has been belonged to some non-zero numbered range,
1912 this will be overwritten by the new setting. For example, whole SIP
1913 belong to the range~4 in the default setting of \LuaTeX-ja, and if you
1914 specify the above line, then SIP will belong to the range~100 and be
1915 removed from the range~4.
1918 もし指定されたある文字がある非零番号の範囲に属していたならば,これは新しい設定で
1919 上書きされる.例えば,SIPは全て\LuaTeX-jaのデフォルトでは4番の文字範囲に
1920 属しているが,上記の指定を行えばSIPは100番に属すようになり,4番からは除かれる.
1923 如果某些字符被改变为新的非零数范围,将会被新设定重写。
1924 例如,整个SIP在\LuaTeX-ja默认设定中属于范围4,如果你使用如上设定,
1925 SIP将会被设定为范围100,且从范围4种移除。
1929 After assigning numbers to ranges, the \textsf{jacharrange} parameter can
1930 be used to customize which character range will be treated as ranges of
1931 \textbf{JAchar}s, as the following line (this is just the default
1932 setting of \LuaTeX-ja):
1935 文字範囲に番号を割り当てた後は,\textsf{jacharrange}パラメータが\textbf{JAchar}と
1936 して扱われる文字の範囲を設定するために用いられる.例えば,以下は\LuaTeX-jaの
1940 分配了范围数之后,\textsf{jacharrange}参数将用于设定字符范围为\textbf{JAchar},
1941 如下(为\LuaTeX-ja默认设定):
1944 \ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, +8}}
1947 The argument to \textsf{jacharrange} parameter is a list of integer.
1948 Negative integer $-n$ in the list means that `the characters that belong to
1949 range~$n$ are treated as \textbf{ALchar}', and positive integer $+n$ means
1950 that `the characters that belong to range~$n$ are treated as \textbf{JAchar}'.
1953 \textsf{jacharrange}パラメータには整数のリストを与える.
1954 リスト中の負の整数$-n$は「文字範囲$n$に属する文字は\textbf{ALchar}として
1955 扱われる」ことを意味し,正の整数$+n$は\textbf{JAchar}として扱うことを意味する.
1958 \textsf{jacharrange}参数的变量未整数数组。
1959 负数$-n$在数组中表示“字符范围$n$中的字符被视作\textbf{ALchar}”,
1960 正数$+n$则表示“字符范围$n$被视作\textbf{JAchar}”。
1964 \paragraph{Default Setting}
1965 \LuaTeX-ja predefines eight character ranges for convenience. They are
1966 determined from the following data:
1970 \LuaTeX-jaでは8つの文字範囲を設定している.これらは以下のデータに基づいて決定して
1975 \LuaTeX-ja默认设定了8个字符范围。如下设定:
1979 \item Blocks in Unicode~6.0.
1982 \item Unicode~6.0のブロック.
1988 \item The \texttt{Adobe-Japan1-UCS2} mapping between a CID Adobe-Japan1-6 and Unicode.
1991 \item \texttt{Adobe-Japan1-UCS2}によるAdobe-Japan1-6のCIDとUnicodeの間の
1995 \item 在CID Adobe-Japan1-6和Unicode之间的映射\texttt{Adobe-Japan1-UCS2}。
1998 \item The \Pkg{PXbase} bundle for \upTeX\ by Takayuki Yato.
2001 \item 八登崇之氏による\upTeX 用の\Pkg{PXbase}バンドル.
2004 \item 八登崇之的\Pkg{PXbase}宏包(\upTeX 下使用)。
2009 Now we describe these eight ranges. The alphabet `J' or `A' after the
2010 number shows whether characters in the range is treated as
2011 \textbf{JAchar}s or not by default. These settings are similar to the
2012 \texttt{prefercjk} settings defined in \texttt{PXbase} bundle.
2015 以下ではこれら8つの文字範囲について記述する.番号のあとのアルファベット`J'と`A'
2016 はデフォルトで\textbf{JAchar}か\textbf{ALchar}かを表している.これらの設定は
2017 \texttt{PXbase}バンドルで定義されている\texttt{prefercjk}と類似のものである.
2020 现在我们描述8个字符范围。在数字后的“J”和“A”表明代表\textbf{JAchar}或者未跟随默认设定。
2021 这些设定类似于\texttt{PXbase}中的\texttt{prefercjk}设定。
2025 \item[Range~8${}^{\text{J}}$] Symbols in the intersection of the upper half of ISO~8859-1
2026 (Latin-1 Supplement) and JIS~X~0208 (a basic character set for Japanese). This character range
2027 consists of the following characters:
2030 \item[範囲8${}^{\text{J}}$] ISO~8859-1の上位領域(ラテン1補助)と
2031 JIS~X~0208の共通部分にある記号.この文字範囲は
2035 \item[范围8${}^\text{J}$] ISO 8859-1(Latin-1补充)的上半部和JIS X 0208(日文基本字符集)的重叠部分,包含下列字符:
2037 \begin{multicols}{2}
2039 \def\ch#1#2{\item \char"#1\ (\texttt{U+00#1}, #2)}%"
2041 \ch{A7}{Section Sign}
2043 \ch{B0}{Degree sign}
2044 \ch{B1}{Plus-minus sign}
2045 \ch{B4}{Spacing acute}
2046 \ch{B6}{Paragraph sign}
2047 \ch{D7}{Multiplication sign}
2048 \ch{F7}{Division Sign}
2055 \ch{B4}{アキュート・アクセント}
2074 \item[Range~1${}^{\text{A}}$] Latin characters that some of them are included in Adobe-Japan1-6.
2075 This range consist of the following Unicode ranges, \emph{except characters in the range~8 above}:
2078 \item[範囲1${}^{\text{A}}$] ラテン文字.一部はAdobe-Japan1-6にも含まれている.
2079 この範囲は以下のUnicodeのブロックから構成されている.
2080 \textbf{ただし,範囲8は除く.}
2083 \item[范围1${}^\text{A}$] 包含于Adobe-Japan1-6中的拉丁字符,此范围包含下列
2084 Unicode区域,但\textbf{不包括上述提到过的范围8}:
2086 \begin{multicols}{2}
2089 \item \texttt{U+0080}--\texttt{U+00FF}: Latin-1 Supplement
2090 \item \texttt{U+0100}--\texttt{U+017F}: Latin Extended-A
2091 \item \texttt{U+0180}--\texttt{U+024F}: Latin Extended-B
2092 \item \texttt{U+0250}--\texttt{U+02AF}: IPA Extensions
2093 \item \texttt{U+02B0}--\texttt{U+02FF}: Spacing Modifier Letters
2094 \item \texttt{U+0300}--\texttt{U+036F}: Combining Diacritical Marks
2095 \item \texttt{U+1E00}--\texttt{U+1EFF}: Latin Extended Additional
2098 \item \texttt{U+0080}--\texttt{U+00FF}: ラテン1補助
2099 \item \texttt{U+0100}--\texttt{U+017F}: ラテン文字拡張A
2100 \item \texttt{U+0180}--\texttt{U+024F}: ラテン文字拡張B
2101 \item \texttt{U+0250}--\texttt{U+02AF}: IPA拡張(国際音声記号)
2102 \item \texttt{U+02B0}--\texttt{U+02FF}: 前進を伴う修飾文字
2103 \item \texttt{U+0300}--\texttt{U+036F}: ダイアクリティカルマーク(合成可能)
2104 \item \texttt{U+1E00}--\texttt{U+1EFF}: ラテン文字拡張追加
2107 \item \texttt{U+0080}--\texttt{U+00FF}: 拉丁字母补充-1
2108 \item \texttt{U+0100}--\texttt{U+017F}: 拉丁字母扩充-A
2109 \item \texttt{U+0180}--\texttt{U+024F}: 拉丁字母扩充-B
2110 \item \texttt{U+0250}--\texttt{U+02AF}: 国际音标扩充
2111 \item \texttt{U+02B0}--\texttt{U+02FF}: 进格修饰符元
2112 \item \texttt{U+0300}--\texttt{U+036F}: 组合音标附加符号
2113 \item \texttt{U+1E00}--\texttt{U+1EFF}: 拉丁字母扩充附加
2119 \item[Range~2${}^{\text{J}}$] Greek and Cyrillic letters. JIS~X~0208 (hence most of Japanese
2120 fonts) has some of these characters.
2123 \item[範囲2${}^{\text{J}}$] ギリシャ文字とキリル文字.JIS~X~0208(したがって多くの
2127 \item[范围2${}^\text{J}$] 希腊文和西里尔字母,使用JIS X 0208的大部分日文字体包含这些字符:
2129 \begin{multicols}{2}
2132 \item \texttt{U+0370}--\texttt{U+03FF}: Greek and Coptic
2133 \item \texttt{U+0400}--\texttt{U+04FF}: Cyrillic
2134 \item \texttt{U+1F00}--\texttt{U+1FFF}: Greek Extended
2137 \item \texttt{U+0370}--\texttt{U+03FF}: ギリシア文字及びコプト文字
2138 \item \texttt{U+0400}--\texttt{U+04FF}: キリル文字
2139 \item \texttt{U+1F00}--\texttt{U+1FFF}: キリル文字補助
2142 \item \texttt{U+0370}--\texttt{U+03FF}: 希腊字母
2143 \item \texttt{U+0400}--\texttt{U+04FF}: 西里尔字母
2144 \item \texttt{U+1F00}--\texttt{U+1FFF}: 希腊文扩充
2150 \item[Range~3${}^{\text{J}}$] Punctuations and Miscellaneous symbols. The block list is
2151 indicated in Table~\ref{table-rng3}.
2154 \item[範囲3${}^{\text{J}}$] 句読点と記号類.ブロックのリストは表\ref{table-rng3}%
2158 \item[范围3${}^\text{J}$] 标点以及杂项符号,参见表\ref{table-rng3}。
2162 \caption{Unicode blocks in predefined character range~3.}
2165 \caption{文字範囲3に指定されているUnicodeブロック.}
2168 \caption{字符范围3定义的Unicode范围}
2171 \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
2172 \begin{center}\small
2173 \begin{tabular}{llll}
2175 "2000--"206F&General Punctuation&
2176 "2070--"209F&Superscripts and Subscripts\\
2177 "20A0--"20CF&Currency Symbols&
2178 "20D0--"20FF&Comb.\ Diacritical Marks for Symbols\\
2179 "2100--"214F&Letterlike Symbols&
2180 "2150--"218F&Number Forms\\
2181 "2190--"21FF&Arrows&
2182 "2200--"22FF&Mathematical Operators\\
2183 "2300--"23FF&Miscellaneous Technical&
2184 "2400--"243F&Control Pictures\\
2185 "2500--"257F&Box Drawing&
2186 "2580--"259F&Block Elements\\
2187 "25A0--"25FF&Geometric Shapes&
2188 "2600--"26FF&Miscellaneous Symbols\\
2189 "2700--"27BF&Dingbats&
2190 "2900--"297F&Supplemental Arrows-B\\
2191 "2980--"29FF&Misc.\ Mathematical Symbols-B&
2192 "2B00--"2BFF&Miscellaneous Symbols and Arrows\\
2193 "E000--"F8FF&Private Use Area&
2197 "2070--"209F&上付き・下付き\\
2199 "20D0--"20FF&記号用ダイアクリティカルマーク(合成可能)\\
2201 "2150--"218F&数字に準じるもの\\
2203 "2200--"22FF&数学記号(演算子)\\
2204 "2300--"23FF&その他の技術用記号&
2205 "2400--"243F&制御機能用記号\\
2207 "2580--"259F&ブロック要素\\
2209 "2600--"26FF&その他の記号\\
2211 "2900--"297F&補助矢印B\\
2212 "2980--"29FF&その他の数学記号B&
2213 "2B00--"2BFF&その他の記号及び矢印\\
2214 "E000--"F8FF&私用領域(外字領域)&
2217 "2000--"206F&一般标点符号&
2218 "2070--"209F&上标及下标\\
2220 "20D0--"20FF& 符号用组合附加符号\\
2224 "2200--"22FF&数学运算符号\\
2225 "2300--"23FF&杂项技术符号&
2232 "2900--"297F&补充性箭头-B\\
2233 "2980--"29FF&混合数学符号-B&
2234 "2B00--"2BFF&杂项符号和箭头符号\\
2241 \item[Range~4${}^{\text{A}}$] Characters usually not in Japanese fonts. This range consists
2242 of almost all Unicode blocks which are not in other
2243 predefined ranges. Hence, instead of showing the block list,
2244 we put the definition of this range itself:
2247 \item[範囲4${}^{\text{A}}$] 通常和文フォントには含まれていない文字.
2248 この範囲は他の範囲にないほとんど全てのUnicodeブロック
2249 で構成されている.したがって,ブロックのリストを示す
2253 \item[范围4${}^\text{A}$] 通常情况下不包含于日文字体的部分。本范围包含有其他
2254 范围尚未涵盖部分。故,我们直接给出定义:
2257 \ltjdefcharrange{4}{%
2258 "500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF,
2259 "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A82F, "A840-"ABFF, "FB50-"FE0F,
2260 "FE20-"FE2F, "FE70-"FEFF, "FB00-"FB4F, "10000-"1FFFF} % non-Japanese
2263 \item[Range~5${}^{\text{A}}$] Surrogates and Supplementary Private Use Areas.
2266 \item[範囲5${}^{\text{A}}$] 代用符号と補助私用領域.
2269 \item[范围5${}^\text{A}$] 代替以及补充私有使用区域。
2272 \item[Range~6${}^{\text{J}}$] Characters used in Japanese. The block list is indicated in Table~\ref{table-rng6}.
2275 \item[範囲6${}^{\text{J}}$] 日本語で用いられる文字.ブロックのリストは
2276 表\ref{table-rng6}に示す.
2279 \item[范围6${}^\text{J}$] 日文字符。
2283 \caption{Unicode blocks in predefined character range~6.}
2286 \caption{文字範囲6に指定されているUnicodeブロック.}
2289 \caption{字符范围6定义的Unicode范围}
2292 \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
2293 \begin{center}\small
2294 \begin{tabular}{llll}
2296 "2460--"24FF&Enclosed Alphanumerics&
2297 "2E80--"2EFF&CJK Radicals Supplement\\
2298 "3000--"303F&CJK Symbols and Punctuation&
2299 "3040--"309F&Hiragana\\
2300 "30A0--"30FF&Katakana&
2301 "3190--"319F&Kanbun\\
2302 "31F0--"31FF&Katakana Phonetic Extensions&
2303 "3200--"32FF&Enclosed CJK Letters and Months\\
2304 "3300--"33FF&CJK Compatibility&
2305 "3400--"4DBF&CJK Unified Ideographs Extension A\\
2306 "4E00--"9FFF&CJK Unified Ideographs&
2307 "F900--"FAFF&CJK Compatibility Ideographs\\
2308 "FE10--"FE1F&Vertical Forms&
2309 "FE30--"FE4F&CJK Compatibility Forms\\
2310 "FE50--"FE6F&Small Form Variants&
2311 "{20}000--"{2F}FFF&(Supplementary Ideographic Plane)
2315 "2E80--"2EFF&CJK部首補助\\
2316 "3000--"303F&CJKの記号及び句読点&
2319 "3190--"319F&漢文用記号(返り点)\\
2321 "3200--"32FF&囲みCJK文字・月\\
2322 "3300--"33FF&CJK互換用文字&
2323 "3400--"4DBF&CJK統合漢字拡張A\\
2324 "4E00--"9FFF&CJK統合漢字&
2325 "F900--"FAFF&CJK互換漢字\\
2327 "FE30--"FE4F&CJK互換形\\
2329 "{20}000--"{2F}FFF&(追加漢字面)
2332 "2460--"24FF&圈状字母数字&
2333 "2E80--"2EFF&CJK部首补充\\
2334 "3000--"303F&CJK标点符号&
2337 "3190--"319F&汉文标注号\\
2338 "31F0--"31FF&片假名音标补充&
2339 "3200--"32FF&圈状CJK字母及月份\\
2341 "3400--"4DBF&CJK统一表意文字扩充A\\
2342 "4E00--"9FFF&CJK统一表意文字&
2343 "F900--"FAFF&CJK兼容表意文字\\
2345 "FE30--"FE4F&CJK兼容形式\\
2347 "{20}000--"{2F}FFF&(补充字符)
2353 \item[Range~7${}^{\text{J}}$] Characters used in CJK languages, but not included in Adobe-Japan1-6.
2354 The block list is indicated in Table~\ref{table-rng7}.
2357 \item[範囲7${}^{\text{J}}$] CJK言語で用いられる文字のうち,Adobe-Japan1-6に
2359 ブロックのリストは表\ref{table-rng7}に示す.
2362 \item[范围7${}^\text{J}$] 不包含于Adobe-Japan1-6的CJK字符,参见表\ref{table-rng7}。
2366 \caption{Unicode blocks in predefined character range~7.}
2369 \caption{文字範囲7に指定されているUnicodeブロック.}
2372 \caption{字符范围7定义的Unicode范围}
2375 \catcode`\"=13\def"#1#2#3#4{\texttt{U+#1#2#3#4}}%"
2376 \begin{center}\small
2377 \begin{tabular}{llll}
2379 "1100--"11FF&Hangul Jamo&
2380 "2F00--"2FDF&Kangxi Radicals\\
2381 "2FF0--"2FFF&Ideographic Description Characters&
2382 "3100--"312F&Bopomofo\\
2383 "3130--"318F&Hangul Compatibility Jamo&
2384 "31A0--"31BF&Bopomofo Extended\\
2385 "31C0--"31EF&CJK Strokes&
2386 "A000--"A48F&Yi Syllables\\
2387 "A490--"A4CF&Yi Radicals&
2388 "A830--"A83F&Common Indic Number Forms\\
2389 "AC00--"D7AF&Hangul Syllables&
2390 "D7B0--"D7FF&Hangul Jamo Extended-B
2393 "1100--"11FF&ハングル字母&
2395 "2FF0--"2FFF&漢字構成記述文字&
2396 "3100--"312F&注音字母 (注音符号)\\
2397 "3130--"318F&ハングル互換字母&
2398 "31A0--"31BF&注音字母拡張\\
2399 "31C0--"31EF&CJKの筆画&
2402 "A830--"A83F&共通インド数字に準じるもの\\
2403 "AC00--"D7AF&ハングル音節文字&
2404 "D7B0--"D7FF&ハングル字母拡張B
2409 "2FF0--"2FFF&汉字结构描述字符&
2411 "3130--"318F&谚文兼容字母&
2412 "31A0--"31BF&注音字母扩充\\
2416 "A830--"A83F&一般印度数字\\
2418 "D7B0--"D7FF&谚文字母扩充-B
2426 %<en>\subsection{\Param{kanjiskip} and \Param{xkanjiskip}}
2427 %<ja>\subsection{\Param{kanjiskip}と\Param{xkanjiskip}}
2428 %<zh>\subsection{\Param{kanjiskip}和\Param{xkanjiskip}}
2432 \textbf{JAglue} is divided into the following three categories:
2435 \textbf{JAglue}は以下の3つのカテゴリに分類される:
2438 \textbf{JAglue}分为以下三个范畴:
2442 \item Glues/kerns specified in JFM. If \verb+\inhibitglue+ is issued
2443 around a Japanese character, this glue will not be inserted at the
2447 \item JFMで指定されたグルー/カーン.もし \verb+\inhibitglue+ が和文文字の周りで
2448 発行されていれば,このグルーは挿入されない.
2451 \item JFM设定的胶或出格值。如果在一个日文字符附近使用\verb!\inhibitglue!,则胶便不会插入。
2454 \item The default glue which inserted between two \textbf{JAchar}s (\Param{%
2458 \item デフォルトで2つの\textbf{JAchar}の間に挿入されるグルー(\Param{kanjiskip}).
2461 \item 两个\textbf{JAchar}之间默认插入的胶(\Param{kanjiskip})。
2464 \item The default glue which inserted between a \textbf{JAchar} and an
2465 \textbf{ALchar} (\Param{xkanjiskip}).
2468 \item デフォルトで\textbf{JAchar}と\textbf{ALchar}の間に挿入されるグルー(\Param{xkanjiskip}).
2471 \item \textbf{JAchar}和\textbf{ALchar}之间默认插入的胶(\Param{xkanjiskip})。
2475 The value (a skip) of \Param{kanjiskip} or \Param{xkanjiskip} can be
2476 changed as the following.
2479 \Param{kanjiskip}や\Param{xkanjiskip}の値は以下のようにして変更可能である.
2482 \Param{kanjiskip}和\Param{xkanjiskip}的设定如下所示:
2485 \ltjsetparameter{kanjiskip={0pt plus 0.4pt minus 0.4pt},
2486 xkanjiskip={0.25\zw plus 1pt minus 1pt}}
2490 It may occur that JFM contains the data of `ideal width of \Param{kanjiskip}'
2491 and/or `ideal width of \Param{xkanjiskip}'.
2492 To use these data from JFM, set the value of \Param{kanjiskip} or
2493 \Param{xkanjiskip} to \verb+\maxdimen+.
2496 JFMは「望ましい\Param{kanjiskip}の値」や「望ましい\Param{xkanjiskip}の値」を
2498 これらのデータを使うためには,\Param{kanjiskip}や\Param{xkanjiskip}の
2499 値を \verb+\maxdimen+ の値に設定すればよい.
2502 当JFM包含“\Param{kanjiskip}理想宽度”和/或“\Param{xkanjiskip}理想宽度”数据时,
2503 上述设定产生作用。如果想用JFM中的数据,请设定\Param{kanjiskip}或\textsf{xkanjiskip}为\verb!\maxdimen!。
2506 %<en>\subsection{Insertion Setting of \Param{xkanjiskip}}
2507 %<ja>\subsection{\Param{xkanjiskip} の設定の挿入}
2508 %<zh>\subsection{\Param{xkanjiskip}插入设定}
2511 It is not desirable that \Param{xkanjiskip} is inserted into every
2512 boundary between \textbf{JAchar}s and \textbf{ALchar}s. For example,
2513 \Param{xkanjiskip} should not be inserted after opening parenthesis
2514 (\textit{e.g.}, compare `(あ' and `(\hskip\ltjgetparameter{xkanjiskip}あ').
2515 \LuaTeX-ja can control whether \Param{xkanjiskip} can be inserted
2516 before/after a character, by changing \Param{jaxspmode} for \textbf{JAchar}s and
2517 \Param{alxspmode} parameters \textbf{ALchar}s respectively.
2520 \Param{xkanjiskip}がすべての\textbf{JAchar}と\textbf{ALchar}の境界に
2521 挿入されるのは望ましいことではない.例えば,\Param{xkanjiskip}は開き括弧の
2522 後には挿入されるべきではない(`(あ'と`(\hskip\ltjgetparameter{xkanjiskip}あ'を
2524 \LuaTeX-jaでは\Param{xkanjiskip}をある文字の前/後に挿入するかどうかを,
2525 \textbf{JAchar}に対しては\Param{jaxspmode}を,\textbf{ALchar}に対しては
2526 \Param{alxspmode}をそれぞれ変えることで制御することができる.
2529 并不是在所有的\textbf{JAchar}和\textbf{ALchar}周围插入\textsf{xkanjiskip}都是合适的。
2530 比如,在开标点之后插入\Param{xkanjiskip}并不合适[如,比较“(あ”和“(\hskip\ltjgetparameter{xkanjiskip}あ”]。
2531 \LuaTeX-ja可以通过设定\textbf{JAchar}的\Param{jaxspmode}以及\textbf{ALchar}的\Param{alxspmode}来控制
2532 \Param{xkanjiskip}在字符前后的插入。
2535 \ltjsetparameter{jaxspmode={`あ,preonly}, alxspmode={`\!,postonly}}
2540 The second argument \texttt{preonly} means `the insertion of
2541 \Param{xkanjiskip} is allowed before this character, but not after'.
2542 the other possible values are \texttt{postonly}, \texttt{allow} and \texttt{
2546 2つ目の引数の \texttt{preonly}は「\Param{xkanjiskip}の挿入はこの文字の
2547 前でのみ許され,後では許さない」ことを意味する.他に指定可能な値は
2548 \texttt{postonly}, \texttt{allow}, \texttt{inhibit}である.
2551 第二个参数\textsf{preonly}表示的含义为“允许在该字符前插入\textsf{xkanjiskip},但不允许在该字符之后插入”。
2552 其他参数还有\textsf{postonly},\textsf{allow}和\textsf{inhibit}。
2556 \Param{jaxspmode} and \Param{alxspmode} use a same table to store the parameters
2557 on the current version. Therefore, line 1 in the code above can be rewritten
2562 仕様では,\Param{jaxspmode}, \Param{alxspmode}はテーブルを共有しており,
2563 上のコードの1行目を次のように変えても同じことになる:
2566 当前版本的\Param{jaxspmode}和\Param{alxspmode}使用相同的的表保存参数。
2570 \ltjsetparameter{alxspmode={`あ,preonly}, jaxspmode={`\!,postonly}}
2573 One can use also numbers to specify these two parameters (see Subsection~\ref{ssec-param}).
2576 また,これら2パラメータには数値で値を指定することもできる(\ref{ssec-param}節を参照).
2579 你也可以使用数字来定义两个参数(参见\ref{ssec-param})。
2583 If you want to enable/disable all insertions of \Param{kanjiskip} and
2584 \Param{xkanjiskip}, set \Param{autospacing} and \Param{autoxspacing}
2585 parameters to \texttt{true}/\texttt{false}, respectively.
2588 もし全ての\Param{kanjiskip}と\Param{xkanjiskip}の挿入を有効化/無効化
2589 したければ,それぞれ\Param{autospacing}と\Param{autoxspacing}を
2590 \texttt{true}/\texttt{false}に設定すればよい.
2593 如果你想要启用/屏蔽所有的\Param{kanjiskip}和\Param{xkanjiskip}插入,设定
2594 \Param{autospacing}和\Param{autoxspcing}为\texttt{ture}/\texttt{false}即可。
2597 %<en>\subsection{Shifting Baseline}
2598 %<ja>\subsection{ベースラインの移動}
2599 %<zh>\subsection{基线浮动}
2601 To make a match between a Japanese font and an alphabetic font, sometimes
2602 shifting of the baseline of one of the pair is needed. In \pTeX, this is achieved
2603 by setting \verb+\ybaselineshift+ to a non-zero length (the
2604 baseline of alphabetic fonts is shifted below). However, for documents
2605 whose main language is not Japanese, it is good to shift the baseline of
2606 Japanese fonts, but not that of alphabetic fonts.
2607 Because of this, \LuaTeX-ja can independently set the shifting amount
2608 of the baseline of alphabetic fonts (\Param{yalbaselineshift}
2609 parameter) and that of Japanese fonts (\Param{yjabaselineshift}
2613 和文フォントと欧文フォントを合わせるためには,時々どちらかのベースラインの移動が
2614 必要になる.\pTeX ではこれは \verb+\ybaselineshift+ を非零の長さに設定することで
2615 なされていた(欧文フォントのベースラインが下がる).しかし,日本語が主ではない
2616 文書に対しては,欧文フォントではなく和文フォントのベースラインを移動した方がよい.
2617 このため,\LuaTeX-jaでは欧文フォントのベースラインのシフト量
2618 (\Param{yalbaselineshift}パラメータ)と和文フォントのベースラインのシフト量
2619 (\Param{yjabaselineshift}パラメータ)を独立に設定できるようになっている.
2622 为了确保日文字体和西文字体能够对其,有时需要浮动其中一者的基线。
2623 在\pTeX 中,此项设定由设定\verb!\yabaselineshift!为非零长度(西文字体基线应向下浮动)。
2624 不过,如果文档的中主要语言不是日文,那么最好上浮日文字体的基线,西文字体不变。
2625 如上所述,\LuaTeX-ja可以独立设定西文字体的基线(\Param{yabaselineshift}参数)和日文字体的基线(\Param{yjabaselineshift}参数)。
2629 \vrule width 150pt height 0.4pt depth 0pt\hskip-120pt
2630 \ltjsetparameter{yjabaselineshift=0pt, yalbaselineshift=0pt}abcあいう
2631 \ltjsetparameter{yjabaselineshift=5pt, yalbaselineshift=2pt}abcあいう
2634 Here the horizontal line in above is the baseline of a line.
2637 上の例において引かれている水平線がベースラインである.
2644 There is an interesting side-effect: characters in different size can be
2645 vertically aligned center in a line, by setting two parameters appropriately.
2646 The following is an example (beware the value is not well tuned):
2649 この機能には面白い使い方がある:2つのパラメータを適切に設定することで,サイズの
2650 異なる文字を中心線に揃えることができるのだ.
2651 以下は一つの例である(値はあまり調整されていないことに注意):
2654 这里还有一个有趣的副作用:不同大小的字符可以通过适当调整这两个参数而在一行中垂直居中。
2655 下面是一个例子(注意,参数值并没有刻意调整):
2660 \ltjsetparameter{yjabaselineshift=-1pt,
2661 yalbaselineshift=-1pt}
2667 %<en>\subsection{Cropmark}
2668 %<ja>\subsection{トンボ}
2669 %<zh>\subsection{裁剪框标记}
2672 Cropmark is a mark for indicating 4~corners and horizontal/vertical
2673 center of the paper. In Japanese, we call cropmark as tombo(w).
2674 \pLaTeX\ and this \LuaTeX-ja support `tombow' by their kernel.
2675 The following steps are needed to typeset cropmark:
2678 トンボは用紙の四つ角と水平/垂直方向の中心を表す印である.
2679 \pLaTeX と \LuaTeX-jaではトンボの出力をサポートしている.
2680 トンボを出力するためには以下の手順が必要である:
2683 裁剪框标记是在一页的四角和水平/垂直中央放置的标记。在日文中,裁剪框被称为“トンボ”。
2684 \pLaTeX 和\LuaTeX-ja均在底层支持裁剪框标记。需要下列步骤来实现:
2689 \item First, define the banner which will be printed at the upper left
2690 of the paper. This is done by assigning a token list to
2691 \verb+\@bannertoken+.
2693 For example, the following sets banner as `\texttt{filename (YYYY-MM-DD hh:mm)}':
2696 \item まず,用紙の左上に印刷されるバナーを定義する.これは \verb+\@bannertoken+
2697 にトークンリストを与えることでなされる.
2699 例えば,以下はバナーとして`\texttt{filename (YYYY-MM-DD hh:mm)}'を設定する:
2702 \item 首先,首先定义页面左上角将会出现的注记。这由向\verb!@bannertoken!分配一个token列完成。\\
2703 例如,下列所示将会设定注记为“\textsf{filename (YYYY-MM-DD hh:mm)}”:
2709 \hour\time \divide\hour by 60 \@tempcnta\hour \multiply\@tempcnta 60\relax
2710 \minute\time \advance\minute-\@tempcnta
2712 \jobname\space(\number\year-\two@digits\month-\two@digits\day
2713 \space\two@digits\hour:\two@digits\minute)}%
2720 %<en>\part{Reference}
2724 %<en>\section{Font Metric and Japanese Font}
2725 %<ja>\section{フォントメトリックと和文フォント}
2726 %<zh>\section{字体测度和日文字体}
2727 %<en>\subsection{\texttt{\char92jfont} primitive}
2728 %<ja>\subsection{\texttt{\char92jfont}プリミティブ}
2729 %<zh>\subsection{\texttt{\char92jfont}基本语句}
2733 To load a font as a Japanese font, you must use the
2734 \verb+\jfont+ primitive instead of~\verb+\font+, while
2735 \verb+\jfont+ admits the same syntax used in~\verb+\font+.
2736 \LuaTeX-ja automatically loads \Pkg{luaotfload} package,
2737 so TrueType/OpenType fonts with features can be used for Japanese fonts:
2740 フォントを和文フォントとして読み込むためには,\verb+\jfont+ プリミティブを
2741 \verb+\font+ プリミティブの代わりに用いる.
2742 \verb+\jfont+ プリミティブの文法は \verb+\font+ と同じである.
2743 \LuaTeX-jaは\Pkg{luaotfload}パッケージを自動的に読み込むので,
2744 TrueType/OpenTypeフォントにfeatureを指定したものを和文フォントとして用いる
2748 为了加载日文字体,需要使用\verb!\jfont!基本语句替代\verb!\font!,前者支持后者所有相同句法。
2749 \LuaTeX-ja自动加载\Pkg{luaotfload}宏包,故TrueType/OpenType字体的特性可以使用于日文字体:
2752 \jfont\tradgt={file:ipaexg.ttf:script=latn;%
2753 +trad;-kern;jfm=ujis} at 14pt
2758 Note that the defined control sequence
2759 (\verb+\tradgt+ in the example above) using \verb+\jfont+ is not a
2760 \textit{font\_def} token, hence the input like \verb+\fontname\tradgt+
2761 causes a error. We denote control sequences which are defined in
2762 \verb+\jfont+ by <jfont\_cs>.
2765 なお,\verb+\jfont+ で定義されたコントロールシーケンス(上の例だと \verb+\tradgt+)
2766 は\textit{font\_def}トークンではないので,\verb+\fontname\tradgt+ のような
2767 入力はエラーとなることに注意する.以下では \verb+\jfont+ で定義された
2768 コントロールシーケンスを<jfont\_cs>で表す.
2771 注意定义的控制序列(上例中的\verb!\tradgt!)使用的\verb!\jfont!并不是一个\textit{font\_def}标记,
2772 故类似\verb!\fontname\tradgt!输入会引起错误。
2773 我们将定义\verb!\jfont!采用<jfont\_cs>。
2778 As noted in Introduction, a JFM has measurements of characters and
2779 glues/kerns that are automatically inserted for Japanese
2780 typesetting. The structure of JFM will be described in the next
2781 subsection. At the calling of \verb+\jfont+ primitive, you must specify
2782 which JFM will be used for this font by the following keys:
2785 「はじめに」の節で述べたように,JFMは文字と和文組版で自動的に挿入される
2786 グルー/カーンの寸法情報を持っている.JFMの構造は次の小節で述べる.
2787 \verb+\jfont+ プリミティブの呼び出しの際には,どのJFMを用いるのかを以下のキーで
2791 在引言中已提及此项,所谓JFM是字符亮度和日文排版中自动插入的胶/出格。
2792 JFM的结构将在下节进行描述。在使用\verb!\jfont!基本语句时,必须设定JFM如下两个键:
2795 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
2798 Specify the name of JFM. If specified JFM has not been loaded, \LuaTeX-ja search and load
2799 a file named \texttt{jfm-<name>.lua}.
2801 The following JFMs are shipped with \LuaTeX-ja:
2804 JFMの名前を指定する.もし以前に指定されたJFMが読み込まれていなければ,
2805 \texttt{jfm-<name>.lua}を読み込む.
2807 以下のJFMが\LuaTeX-jaには同梱されている:
2810 设定JFM名称。设定的JFM如未加载,\LuaTeX-ja会搜寻并加载一个命名为\texttt{jfm-}<\textit{name}>\texttt{.lua}的文件。
2816 \item[\tt jfm-ujis.lua] A standard JFM in \LuaTeX-ja. This JFM is
2817 based on \verb+upnmlminr-h.tfm+, a metric for UTF/OTF package that
2818 is used in \upTeX. When you use the \Pkg{luatexja-otf} package, you should use this JFM.
2821 \item[\tt jfm-ujis.lua] \LuaTeX-jaの標準JFMである.このJFMは\upTeX で
2822 用いられるUTF/OTFパッケージ用の和文用TFMである \verb+upnmlminr-h.tfm+ を
2823 元にしている.\Pkg{luatexja-otf}パッケージを使うときはこのJFMを指定するべきである.
2826 \item[\tt jfm-ujis.lua] \LuaTeX-ja标准JFM。次JFM基于\upTeX 使用的UTF/OTF宏包的\verb!upnmlminr-h.tfm!。
2827 如果你使用\Pkg{luatexja-otf}宏包,你将会用到此JFM。
2830 \item[\tt jfm-jis.lua] A counterpart for \verb+jis.tfm+, `JIS font
2831 metric' which is widely used in \pTeX. A major difference of
2832 \texttt{jfm-ujis.lua} and this \texttt{jfm-jis.lua} is that
2833 most characters under \texttt{jfm-ujis.lua} are square-shaped,
2834 while that under \texttt{jfm-jis.lua} are horizontal
2838 \item[\tt jfm-jis.lua] \pTeX で広く用いられている「JISフォントメトリック」
2839 \verb+jis.tfm+ に相当するJFMである.\texttt{jfm-ujis.lua}とこの
2840 \texttt{jfm-jis.lua}の主な違いは,\texttt{jfm-ujis.lua}ではほとんどの文字が
2841 正方形状であるのに対し,\texttt{jfm-jis.lua}では横長の長方形状である.
2844 \item[\tt jfm-jis.lua] 相当于\pTeX 使用的\verb!jis.tfm!(“JIS font metric”)。
2845 \texttt{jfm-ujis.lua}和\texttt{jfm-jis.lua}主要区别是:
2846 \texttt{jfm-ujis.lua}下的大部分字符是方形,
2847 \texttt{jfm-jis.lua}下则为长方形。
2850 \item[\tt jfm-min.lua] A counterpart for \verb+min10.tfm+, which is one
2851 of the default Japanese font metric shipped with \pTeX. There
2852 are notable difference between this JFM and other 2~JFMs, as
2853 shown in Table~\ref{tab-difjfm}.
2856 \item[\tt jfm-min.lua] \pTeX に同梱されているデフォルトの和文用TFM
2857 である \verb+min10.tfm+ に相当するJFMである.このJFMと他の2つのJFMの間には
2858 表\ref{tab-difjfm}に示すような特筆すべき違いがある.
2861 \item[\tt jfm-min.lua] 相当于\pTeX 中默认的\verb!min10.tfm!。
2862 这个JFM与其他2个JFM的区别如表\ref{tab-difjfm}所示。
2866 \item[jfmvar=<string>] Sometimes there is a need that \ldots.
2870 %<en>\caption{Differences between JFMs shipped with \LuaTeX-ja}
2871 %<ja>\caption{\LuaTeX-ja に同梱されている JFM の違い}
2872 %<zh>\caption{\LuaTeX-ja下不同JFM表现}
2874 \ltjsetparameter{jacharrange={+3}}
2875 \begin{center}\small
2876 \def\r#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g
2877 \setbox0=\vtop{\hsize=7\zw\noindent ◆◆◆◆◆◆◆
2878 ある日モモちゃんがお使いで迷子になって泣きました.}\copy0
2879 \vrule height 0pt depth \dp0}}
2880 \def\s#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g
2881 \setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}}
2882 \def\t#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 19.24432pt \g
2884 \vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0
2885 \kern-\wd0\vrule width\wd0height .2pt depth .2pt
2886 \kern-\wd0\raise\ht0\hbox{\vrule width\wd0height .2pt depth .2pt}%
2887 \kern-\wd0\lower\dp0\hbox{\vrule width\wd0height .2pt depth .2pt}%
2888 \kern-.2pt\vrule width 0.4pt height\ht0 depth \dp0}}
2889 \begin{tabular}{rccc}
2891 &\tt jfm-ujis.lua&\tt jfm-jis.lua&\tt jfm-min.lua\\
2893 %<en>Example~1\footnotemark
2894 %<ja>例1\footnotemark
2895 %<zh>例1\footnotemark
2896 &\r{ujis}&\r{jis}&\r{min}\\
2900 &\s{ujis}&\s{jis}&\s{min}\\
2901 Bounding Box&\t{ujis}&\t{jis}&\t{min}\\
2905 \ltjsetparameter{jacharrange={-3}}
2907 \footnotetext{from: 乙部厳己, min10フォントについて.
2908 \texttt{http://argent.shinshu-u.ac.jp/\~{\ }otobe/tex/files/min10.pdf}.}
2910 %<en>\paragraph{Note: kern feature}
2911 %<ja>\paragraph{注意:kern feature}
2912 %<zh>\paragraph{注意:kern feature}
2915 Some fonts have information for inter-glyph spacing. However, this
2916 information is not well-compatible with \LuaTeX-ja. More concretely,
2917 this kerning space from this information are inserted \emph{before} the
2918 insertion process of \textbf{JAglue}, and this causes incorrect spacing
2919 between two characters when both a glue/kern from the data in the font
2920 and it from JFM are present.
2923 いくつかのフォントはグリフ間のスペースについての情報を持っている.しかし,
2924 この情報は\LuaTeX-ja とはあまり相性がよくない.具体的には,この情報に基づいて挿入
2925 されるカーニングスペースは\textbf{JAglue}の挿入過程の\textbf{前に}挿入され,
2926 JFMに基づくグルー/カーンも挿入される場合には2文字間の意図しないスペースの原因と
2930 一些字体具有内部字形间距信息。但是,这些信息在\LuaTeX-ja下并不良好兼容。
2931 仔细些说,出格间距是在\textbf{JAglue}插入\textbf{之前}而先行插入的,
2932 这就造成了字体数据中和JFM中的胶/出格在两个字符间插入出错。
2936 \item You should specify \texttt{-kern} in
2937 \verb+jfont+ primitive, when you want to use other font features,
2938 such as \texttt{script=...}\,.
2941 \item \texttt{script=...}といったfeatureを使いたい場合には,\verb+\jfont+
2942 プリミティブに\texttt{-kern}を指定するべきである.
2945 \item 当你想使用其他字体特性如\texttt{script=...}的时候,可以在\verb!jfont!基本语句中设置\texttt{-kern}
2948 \item If you want to use Japanese fonts in proportional width, and use
2949 information from this font, use \texttt{jfm-prop.lua} for its JFM, and\ldots.
2952 \item もしプロポーショナル幅の和文フォントをそのフォントの情報に基づいて使いたい
2953 ならば,\texttt{jfm-prop.lua}をJFMとして指定し,……
2956 \item 如果你想使用比例宽度的日文字体,并且使用此字体信息,使用\texttt{jfm-prop.lua}为其JFM,……
2962 %<en>\subsection{Prefix \texttt{psft}}
2963 %<ja>\subsection{\texttt{psft}プリフィックス}
2964 %<zh>\subsection{\texttt{psft}前缀}
2967 Besides \texttt{file:}\ and \texttt{name:}\ prefixes, one can use \texttt{psft:}\
2968 prefix in \verb+\jfont+ (and~\verb+\font+) primitive,
2969 to specify a `name-only' Japanese font which
2970 will not be embedded to PDF. Typical use of this prefix is to specify
2971 the `standard' Japanese fonts, namely, `Ryumin-Light' and
2975 \texttt{file:}と\texttt{name:}のプリフィックスに加えて,
2976 \verb+\jfont+ プリミティブ(と \verb+\font+ プリミティブ)では
2977 \texttt{psft:}プリフィックスを用いることができる.
2978 このプリフィックスを用いることで,PDFには埋め込まれない「名前だけの」
2979 和文フォントを指定することができる.「標準的な」和文フォント,
2980 つまり`Ryumin-Light'と`GothicBBB-Medium'の指定でこのプリフィックスが使われる.
2983 除使用\texttt{file:}和\texttt{name:}外,我们还可以在\verb!\jfont!(以及\verb!\font!)
2984 中使用\texttt{psft:}来设定一个“名义上”的并不嵌入PDF中的日文字体。
2985 此前缀的典型使用是定义“标准”日文字体,即“Ryumin-Light”和“GothicBBB-Medium”。
2986 \paragraph{\texttt{cid}键} 默认使用\texttt{psft:}前缀定义的字体是为Adobe-Japan1-6 CID字体。
2987 也可以使用\texttt{cid}键来使用其他的CID字体,如中文和韩文。
2990 %<en>\paragraph{\texttt{cid} key}
2991 %<ja>\paragraph{\texttt{cid}キー}
2995 The default font defined by using \texttt{psft:} prefix is for Japanese typesetting;
2996 it is Adobe-Japan1-6 CID-keyed font.
2997 One can specify \texttt{cid} key to use other CID-keyed non-embedded fonts
2998 for Chinese or Korean typesetting.
2999 \begin{lstlisting}[numbers=left]
3000 \jfont\testJ={psft:Ryumin-Light:cid=Adobe-Japan1-6;jfm=jis} % Japanese
3001 \jfont\testD={psft:Ryumin-Light:jfm=jis} % default value is Adobe-Japan1-6
3002 \jfont\testC={psft:AdobeMingStd-Light:cid=Adobe-CNS1-5;jfm=jis} % Traditional Chinese
3003 \jfont\testG={psft:SimSun:cid=Adobe-GB1-5;jfm=jis} % Simplified Chinese
3004 \jfont\testK={psft:Batang:cid=Adobe-Korea1-2;jfm=jis} % Korean
3006 Note that the code above specifies \texttt{jfm-jis.lua}, which is for Japanese fonts,
3007 as JFM for Chinese and Korean fonts.
3010 標準で\texttt{psft:}プリフィックスで定義されるフォントは日本語用のもので
3011 あり,Adobe-Japan1-6のCIDに対応したものとなる.しかし,\LuaTeX-jaは中国語
3012 の組版にも威力を発揮することが分かり,日本語フォントでない非埋込フォント
3013 の対応も必要となった.そのために追加されたのが\texttt{cid}キーである.
3015 \texttt{cid}キーに値を指定すると,そのCIDを持った非埋込フォントを定義することができる:
3016 \begin{lstlisting}[numbers=left]
3017 \jfont\testJ={psft:Ryumin-Light:cid=Adobe-Japan1-6;jfm=jis} % 日本語
3018 \jfont\testD={psft:Ryumin-Light:jfm=jis} % 無指定時は Adobe-Japan1-6
3019 \jfont\testC={psft:AdobeMingStd-Light:cid=Adobe-CNS1-5;jfm=jis} % 中国語繁体字
3020 \jfont\testG={psft:SimSun:cid=Adobe-GB1-5;jfm=jis} % 中国語簡体字
3021 \jfont\testK={psft:Batang:cid=Adobe-Korea1-2;jfm=jis} % 韓国語
3023 上のコードでは中国語・韓国語用フォントに対してもJFMに
3024 日本語用の\texttt{jfm-jis.lua}を指定しているので注意されたい.
3028 At present, \LuaTeX-ja supports only 4 values written in the sample code above.
3029 Specifying other values, e.g.,
3032 今のところ,\LuaTeX-jaは上のサンプルコード中に書いた4つの値しかサポートしていない.
3035 \jfont\test={psft:Ryumin-Light:cid=Adobe-Japan2;jfm=jis}
3038 occurs the following error:
3043 \begin{lstlisting}[numbers=left]
3044 ! Package luatexja Error: bad cid key `Adobe-Japan2'.
3046 See the luatexja package documentation for explanation.
3047 Type H <return> for immediate help.
3053 I couldn't find any non-embedded font information for the CID
3054 `Adobe-Japan2'. For now, I'll use `Adobe-Japan1-6'.
3055 Please contact the LuaTeX-ja project team.
3062 %<en>\subsection{Structure of JFM file}
3063 %<ja>\subsection{JFMファイルの構造}
3064 %<zh>\subsection{JFM结构}
3067 A JFM file is a Lua script which has only one function call:
3070 JFMファイルはただ一つの関数呼び出しを含むLuaスクリプトである:
3076 luatexja.jfont.define_jfm { ... }
3079 Real data are stored in the table which indicated above by
3080 \verb+{ ... }+. So, the rest of this subsection are devoted to describe the
3081 structure of this table. Note that all lengths in a JFM file are
3082 floating-point numbers in design-size unit.
3085 実際のデータは上で \verb+{ ... }+ で示されたテーブルの中に格納されている.
3086 以下ではこのテーブルの構造について記す.
3087 なお,JFMファイル中の長さは全てdesign-sizeを単位とする浮動小数点数であることに
3091 实际的数据保存在表中,即如上的\verb!{ ... }!。
3093 请注意,在JFM中的所有长度都是按照以design-size为单位的浮点数。
3096 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
3098 \item[dir=<direction>]
3103 %<en>The direction of JFM. At the present, only \texttt{'yoko'} is supported.
3104 %<ja>JFMの書字方向.現時点では\texttt{'yoko'}のみがサポートされる.
3105 %<zh>JFM的方向,现在只支持\texttt{yoko}(水平)。
3112 %<en>The amount of the length of the `full-width'.
3121 %<en>The amount of the length of the `full-height' (height + depth).
3122 %<ja>「全角高さ」(height + depth)の長さ.
3123 %<zh>“全角高度”(height + depth)长度。
3125 \item[kanjiskip=\{<natural>, <stretch>, <shrink>\}]
3131 This field specifies the `ideal' amount of \Param{kanjiskip}. As noted
3132 in Subsection~\ref{subs-kskip}, if the parameter
3133 \Param{kanjiskip} is \verb+\maxdimen+, the value specified
3134 in this field is actually used (if this field is not specified in
3135 JFM, it is regarded as 0\,pt). Note that <stretch> and <shrink>
3136 fields are in design-size unit too.
3139 「理想的な」\Param{kanjiskip}の量を指定する.\ref{subs-kskip}節で述べたように,
3140 もし\Param{kanjiskip}が \verb+\maxdimen+ の値ならば,このフィールドで指定された
3141 値が実際には用いられる(もしこのフィールドがJFMで指定されていなければ,
3142 0\,ptであるものとして扱われる).<stretch>と<shrink>のフィールドもdesign-size
3146 这部分为“理想长度”\Param{kanjiskip}。\ref{subs-kskip}节有详述,如果参数\Param{kanjiskip}
3147 为\verb!\maxdimen!,则值设定将会被使用(若再JFM中未设定,则被视为0\,pt)。
3148 请注意,<stretch>和<shrink>的长度均为design-size单位。
3151 \item[xkanjiskip=\{<natural>, <stretch>, <shrink>\}]
3157 Like the \Param{kanjiskip} field, this field specifies the `ideal'
3158 amount of \Param{xkanjiskip}.
3161 \Param{kanjiskip}フィールドと同様に,\Param{xkanjiskip}の「理想的な」量を
3165 和\Param{kanjiskip}类似,此部分设定\Param{xkanjiskip}的“理想长度”。
3170 Besides from above fields, a JFM file have several sub-tables those
3171 indices are natural numbers. The table indexed by~$i\in\omega$ stores
3172 information of `character class'~$i$. At least, the character class~0 is
3173 always present, so each JFM file must have a sub-table whose index is
3174 \texttt{[0]}. Each sub-table (its numerical index is denoted by $i$) has
3175 the following fields:
3178 上記のフィールドに加えて,JFMファイルはそのインデックスが自然数であるいくつかの
3179 サブテーブルを持つ.インデックスが$i\in\omega$であるテーブルは「文字クラス」$i$の
3180 情報を格納する.少なくとも,文字クラス0は常に存在するので,JFMファイルはインデックス
3181 が\texttt{[0]}のサブテーブルを持たなければならない.それぞれのサブテーブル
3182 (そのインデックスを$i$で表わす)は以下のフィールドを持つ:
3185 除了上面涉及到的内容,JFM文件中还有几个以自然数进行声明的次级表。
3186 这些表依靠满足$i\in\omega$的“字符类”$i$来索引。
3187 一般,最少需要的是字符类0,故每一个JFM文件必须有次级表索引为\texttt{[0]}。
3190 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
3191 \item[chars=\{<character>, ...\}]
3192 %<en>(required except character class~0)
3197 This field is a list of characters which are in this character
3198 type~$i$. This field is not required if $i=0$, since all
3199 \textbf{JAchar} which are not in any character class other
3200 than 0 are in the character class 0
3201 (hence, the character class~0 contains most of
3202 \textbf{JAchar}s). In the list, a character can be
3203 specified by its code number, or by the character itself
3204 (as a string of length~1). Moreover, there are `imaginary
3205 characters' which specified in the list. We will describe these later.
3208 このフィールドは文字クラス$i$に属する文字のリストである.このフィールドは$i=0$の
3209 場合には必須ではない.なぜならば,文字クラス0には,0以外の文字クラスに属するものを
3210 除いた全ての\textbf{JAchar}が属するからである(よって,文字クラス0はほとんどの
3211 \textbf{JAchar}を含む).このリストでは,文字はその文字コードを用いて,もしくは
3212 文字それ自体(長さ1の文字列)によって指定される.さらに,このリストで指定される
3213 「仮想的な文字」も存在する.これらについては後に記す.
3216 这部分为字符集$i$的字符列表。当$i=0$时不需要设定此部分,因为不在字符集0种的\textbf{JAchar}
3217 字符都包含在字符集0中(也就是字符集0包含大多数的\textbf{JAchar})。在这个字符列表中,每一个
3218 字符据可以使用其编码,或者字符本身(长度为1的字符串)。另外还有部分“假想字符”可在此列表中
3222 \item[width=<length>, height=<length>, depth=<length>, italic=<length>]
3228 Specify width of characters in character class~$i$, height, depth and
3229 the amount of italic correction. All characters in character class~$i$ are regarded that its width, height and depth are
3230 as values of these fields.
3231 But there is one exception: if \texttt{'prop'} is specified in \texttt{width} field, width of a character becomes that of its `real' glyph
3234 文字クラス$i$に属する文字の幅,高さ,深さ,イタリック補正の量を指定する.
3235 文字クラス$i$に属する全ての文字は,その幅,高さ,深さがこのフィールドで指定した
3237 しかし,例外が一つある:もし\texttt{'prop'}が\texttt{width}フィールドに
3238 指定された場合,文字の幅はその「実際の」グリフの幅となる.
3241 设定字符类$i$的宽度,高度和深度以及意大利体校正。在字符集$i$中,所有字符的宽度,高度
3242 和深度的值为上述设定之值。不过还有例外,如果\texttt{'prop'}设定了\texttt{width}部分,那么
3246 \item[left=<length>, down=<length>, align=<align>]\
3249 These fields are for adjusting the position of the `real' glyph. Legal
3250 values of \texttt{align} field are \texttt{'left'},
3251 \texttt{'middle'} and \texttt{'right'}. If one of these
3252 3~fields are omitted, \texttt{left} and \texttt{down} are
3253 treated as~0, and \texttt{align} field is treated as
3255 The effects of these 3~fields are indicated in Figure~\ref{fig-pos}.
3258 これらのフィールドは「実際の」グリフの位置を調整するためにある.
3259 \texttt{align}フィールドに指定できる値は\texttt{'left'}, \texttt{'middle'},
3260 \texttt{'right'}のいずれかである.もしこれら3つのフィールドのうちの1つが省かれた
3261 場合,\texttt{left}と\texttt{down}は0,\texttt{align}フィールドは
3262 \texttt{'left'}であるものとして扱われる.
3263 これら3つのフィールドの意味については図\ref{fig-pos}で説明する.
3266 此部分为“真实”字形对齐位置。\texttt{align}的合法值为\texttt{'left'},
3267 \texttt{'middle'}和\texttt{'right'}。如此三项被省略,则\texttt{left}和
3268 \texttt{down}被视作0,\texttt{align}被视作\texttt{'left'}。
3269 此部分三个域的作用,请参见图\ref{fig-pos}。
3273 In most cases, \texttt{left} and \texttt{down} fields are~0, while
3274 it is not uncommon that the \texttt{align} field is \texttt{'middle'} or \texttt{'right'}.
3275 For example, setting the \texttt{align} field to \texttt{'right'} is practically needed
3276 when the current character class is the class for opening delimiters'.
3279 多くの場合,\texttt{left}と\texttt{down}は0である一方,
3280 \texttt{align}フィールドが\texttt{'middle'}や\texttt{'right'}であることは
3282 例えば,\texttt{align}フィールドを\texttt{'right'}に指定することは,
3283 文字クラスが開き括弧類であるときに実際必要である.
3286 在大多数情况下,\texttt{left}和\texttt{down}域为0,但是在\texttt{align}域为
3287 \texttt{'middle'}或者\texttt{'right'}时则是不正常的。例如,必须设定\texttt{align}
3288 为\texttt{'right'}时,则当前字符类必须为开定界符。
3291 \begin{minipage}{0.4\textwidth}%
3292 \begin{center}\unitlength=10pt\small
3293 \begin{picture}(15,12)(-1,-4)
3294 \color{black!10!white}% real glyph :step1
3295 \put(0,0){\vrule width 12\unitlength height 8\unitlength depth 3\unitlength}
3297 \color{red!20!white}% real glyph :step1
3298 \put(-1,-1.5){\vrule width 6\unitlength height 7\unitlength depth 2.5\unitlength}
3300 \color{red}% real glyph
3302 \put(-1,-1.5){\vector(0,1){7}\vector(0,-1){2.5}\vector(1,0){6}}
3303 \put(5,-1.5){\line(0,1){7}\line(0,-1){2.5}}
3304 \put(-1,5.5){\line(1,0){6}}
3305 \put(-1,-4){\line(1,0){6}}
3307 \color{green!20!white}% real glyph :step1
3308 \put(3,0){\vrule width 6\unitlength height 7\unitlength depth 2.5\unitlength}
3310 \color{black}% real glyph :step1
3312 \put(0,0){\vector(0,1){8}\line(0,-1){3}\vector(1,0){12}}
3313 \put(12,0){\line(0,1){8}\vector(0,-1){3}}
3314 \put(0,8){\line(1,0){12}}
3315 \put(0,-3){\line(1,0){12}}
3316 \put(0.2,4){\makebox(0,0)[l]{\texttt{height}}}
3317 \put(12.2,-1.5){\makebox(0,0)[l]{\texttt{depth}}}
3318 \put(6,0.2){\makebox(0,0)[b]{\texttt{width}}}
3320 \color{green!50!black}% real glyph :step1
3322 \put(3,0){\vector(0,1){7}\vector(0,-1){2.5}\vector(1,0){6}}
3323 \put(9,0){\line(0,1){7}\line(0,-1){2.5}}
3324 \put(3,7){\line(1,0){6}}
3325 \put(3,-2.5){\line(1,0){6}}
3326 \newsavebox{\eqdist}
3327 \savebox{\eqdist}(0,0)[b]{%
3329 \put(-0.08,0.2){\line(0,-1){0.4}}%
3330 \put(0.08,0.2){\line(0,-1){0.4}}}
3331 \put(1.5,0){\usebox{\eqdist}}
3332 \put(10.5,0){\usebox{\eqdist}}
3334 \color{blue}% shifted
3336 \put(3,-1.5){\vector(-1,0){4}}
3337 \put(1,-1.7){\makebox(0,0)[t]{\texttt{left}}}
3338 \put(3,0){\vector(0,-1){1.5}}
3339 \put(3.2,-0.75){\makebox(0,0)[l]{\texttt{down}}}
3343 \begin{minipage}{0.6\textwidth}%
3345 Consider a node containing Japanese character whose value of the \texttt{align}
3346 field is \texttt{'middle'}.
3349 \texttt{align}フィールドの値が\texttt{'middle'}である和文文字を含むノードを
3353 假定一个node包含日语字符,且其值为\texttt{align}的\texttt{'middle'}。
3358 The black rectangle is a frame of the node.
3359 Its width, height and depth are specified by JFM.
3363 その幅,高さ,深さはJFMによって指定される.
3366 黑色长方形为node框。其宽度,高度,深度均为JFM所设定。
3370 Since the \texttt{align} field is \texttt{'middle'},
3371 the `real' glyph is centered horizontally (the green rectangle).
3374 \texttt{align}フィールドは\texttt{middle}なので,「実際の」グリフは
3375 水平方向の中心に配置される(緑色の長方形).
3378 因\texttt{align}被设定为\texttt{middle},故“真实”字形为水平居中(绿长方形中)。
3382 Furthermore, the glyph is shifted according to values of fields
3383 \texttt{left} and \texttt{down}. The ultimate position of the real
3384 glyph is indicated by the red rectangle.
3387 さらに,グリフは\texttt{left}と\texttt{down}の値に従ってシフトされる.
3388 最終的な実際のグリフの位置は赤色の長方形で示された位置になる.
3391 此外,字形移位由\texttt{left}和\texttt{down}决定。最终字形位置为红长方形所示。
3398 %<en>The position of the `real' glyph.
3405 \item[kern={\{[$j$]=<kern>, ...\}}]
3407 \item[glue={\{[$j$]=\{<width>, <stretch>, <shrink>\}, ...\}}]
3411 As described before, you can specify several `imaginary characters' in
3412 \texttt{chars} field. The most of these characters are regarded as the
3413 characters of class 0 in \pTeX.
3414 As a result, \LuaTeX-ja can control typesetting finer than \pTeX.
3415 The following is the list of `imaginary characters':
3418 上で説明した通り,\texttt{chars}フィールド中にはいくつかの「特殊文字」も
3419 指定可能である.これらは,大半が\pTeX のJFMグルーの挿入処理ではみな「文字
3420 クラス0の文字」として扱われていた文字であり,その結果として\pTeX より細か
3421 い組版調整ができるようになっている.以下でその一覧を述べる:
3424 如上所述,你可以在\texttt{chars}中设定多个“假想字符”。这些字符中的多数字符在
3425 \pTeX 中式被视作字符集0中字符。故此,\LuaTeX-ja可以比\pTeX 做得更好。
3428 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
3430 %<en>An ending of a line.
3435 %<en>Used at a boundary between two \textbf{JAchar}s whose JFM or size is different.
3436 %<ja>JFMやサイズが異なる2つの\textbf{JAchar}の間の境界として用いられる.
3437 %<zh>用于两个不同大小或不同JFM的两个\textbf{JAchar}间边界。
3440 %<en>The beginning/ending of a horizontal box, and the beginning of a noindented paragraph.
3441 %<ja>水平ボックスの先頭と末尾,及びインデントされていない(\verb+\noindent+ で開始された)段落の先頭を表す.
3442 %<zh>水平合字结束或结尾,以及未缩进段落开头。
3445 %<en>The beginning of an (indented) paragraph.
3446 %<ja>通常の(\verb+\noindent+ で開始されていない)段落の先頭.
3450 %<en>A boundary between \textbf{JAchar} and anything else (such as \textbf{ALchar}, kern, glue,\,\ldots).
3451 %<ja>和文文字と「その他のもの」(欧文文字,glue,kern等)との境界.
3452 %<zh>日文字符和其他(如\textbf{ALchar},胶,出格等)边界。
3455 %<en>The left/right boundary of an inline math formula.
3460 %<en>\paragraph{Porting JFM from \pTeX}
3461 %<ja>\paragraph{\pTeX 用和文用TFMの移植}
3462 %<zh>\paragraph{\pTeX 下使用的TFM移植}
3464 % ToDo: English version.
3471 以下に,\pTeX 用に作られた和文用TFMを\LuaTeX-ja用に移植する場合の注意点を挙げておく.
3473 \item 実際に出力される和文フォントのサイズがdesign sizeとなる.
3474 このため,例えば$1\,\textrm{zw}$がdesign sizeの0.962216倍であるJISフォン
3477 \item JFM中の全ての数値を$1/0.962216$倍しておく.
3478 \item \TeX ソース中で使用するところで,サイズ指定を0.962216倍にする.
3479 \LaTeX でのフォント宣言なら,例えば次のように:
3481 \DeclareFontShape{JY3}{mc}{m}{n}{<-> s*[0.962216] psft:Ryumin-Light:jfm=jis}{}
3484 \item 上に述べた特殊文字は,\texttt{'boxbdd'}を除き文字クラスを全部0とする
3486 \item \texttt{'boxbdd'}については,それのみで一つの文字クラスを形成し,その
3487 文字クラスに関してはグルー/カーンの設定はしない.
3490 水平ボックスの先頭・末尾とインデントされていない(\verb+\noindent+ で開始さ
3491 れた)段落の先頭にはJFMグルーは入らないという仕様を実現させるためである.
3492 \item \pTeX の組版を再現させようというのが目的であれば以上の注意を守れば十分である.
3494 ところで,\pTeX では通常の段落の先頭にJFMグルーが残るという仕様があるので,
3495 段落先頭の開き括弧は全角二分下がりになる.全角下がりを実現させるに
3496 は,段落の最初に手動で \verb+\inhibitglue+ を追加するか,あるいは
3497 \ \verb+\everypar+ のハックを行い,それを自動化させるしかなかった.
3499 一方,\LuaTeX-jaでは,\texttt{'parbdd'}によって,それがJFM側で調整できるよ
3500 うになった.例えば,\LuaTeX-ja同梱のJFMのように,\texttt{'boxbdd'}と同じ文字クラスに
3501 \texttt{'parbdd'}を入れれば全角下がりとなる.
3504 \jfont\g=psft:Ryumin-Light:jfm=test \g
3505 \parindent1\zw\noindent{}◆◆◆◆◆
3512 但し,\verb+\everypar+ を利用している場合にはこの仕組みは正しく動かない.
3513 そのような例としては箇条書き中の \verb+\item+ で始まる段落があり,\Pkg{ltjsclasses}では
3514 人工的に「\texttt{'parbdd'}の意味を持つ」whatsitノードを作ることによって対処している%
3515 \footnote{\texttt{no\_runtime/ltjsclasses.dtx} を参照されたい.
3516 JFM側で一部の対処ができることにより,\Pkg{jsclasses}のようにif文の判定はしていない.}
3519 下面,给出用于\pTeX 使用的JFM移植到\LuaTeX-ja过程中需要注意的几点。
3523 %<en>\subsection{Math Font Family}
3524 %<ja>\subsection{数式フォントファミリ}
3525 %<zh>\subsection{数学字体族}
3529 \TeX\ handles fonts in math formulas by 16~font families\footnote{Omega,
3530 Aleph, \LuaTeX~and $\varepsilon$-\kern-.125em(u)\pTeX\ can handles 256~families, but
3531 an external package is needed to support this in plain \TeX\ and
3532 \LaTeX.}, and each family has three fonts:
3533 \verb+\textfont+, \verb+\scriptfont+ and \verb+\scriptscriptfont+.
3536 \TeX\ は数式フォントを16のファミリ\footnote{Omega, Aleph, \LuaTeX,そして
3537 $\varepsilon$-\kern-.125em(u)\pTeX\ では256の数式ファミリを扱うことができるが,
3538 これをサポートするためにplain \TeX と\LaTeX では外部パッケージを読み込む必要が
3539 ある.}で管理し,それぞれのファミリは3つのフォントを持っている:\verb+\textfont+, \verb+\scriptfont+ そして \verb+\scriptscriptfont+ である.
3543 \LuaTeX-ja's handling of Japanese fonts in math formulas is similar;
3544 Table~\ref{tab-math} shows counterparts to \TeX's primitives for math
3545 font families. There is no relation between the value of
3546 \verb+\fam+ and that of \verb+\jfam+; with appropriate settings,
3547 you can set both \verb+\fam+ and \verb+\jfam+ to the same value.
3550 \LuaTeX-jaの数式中での和文フォントの扱いも同様である.
3551 表\ref{tab-math}は数式フォントファミリに対する \TeX のプリミティブと対応する
3552 ものを示している.\verb+\fam+ と \verb+\jfam+ の値の間には関係はなく,
3553 適切な設定の下では \verb+\fam+ と \verb+\jfam+ の両方に同じ値を設定することができる.
3557 %<en>\caption{Primitives for Japanese math fonts.}
3558 %<ja>\caption{和文数式フォントに対するプリミティブ.}
3559 %<zh>\caption{日语数学字体基本语句}
3562 \def\{{\char`\{}\def\}{\char`\}}\small
3565 %<en>\bf Japanese fonts&\bf alphabetic fonts\\
3566 %<ja>\bf 和文フォント&\bf 欧文フォント\\
3567 %<zh>\bf 日文字体&\bf 西文字体\\
3569 \verb+\jfam+${}\in [0,256)$&\verb+\fam+\\
3570 \tt\Param{jatextfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\textfont+<fam>=<font\_cs>\\
3571 \tt\Param{jascriptfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\scriptfont+<fam>=<font\_cs>\\
3572 \tt\Param{jascriptscriptfont}\,=\{<jfam>,<jfont\_cs>\}&\tt\verb+\scriptscriptfont+<fam>=<font\_cs>\\
3578 %<en>\subsection{Callbacks}
3579 %<ja>\subsection{コールバック}
3580 %<zh>\subsection{回调}
3583 Like \LuaTeX\ itself, \LuaTeX-ja also has callbacks. These callbacks can
3584 be accessed via \verb+luatexbase.add_to_callback+ function and so on, as other callbacks.
3587 \LuaTeX 自体のものに加えて,\LuaTeX-jaもコールバックを持っている.
3588 これらのコールバックには,他のコールバックと同様に \verb+luatexbase.add_to_callback+
3589 関数などを用いることでアクセスすることができる.
3592 {\def\makelabel#1{\bfseries#1}}
3593 %<en>\item[\texttt{luatexja.load\_jfm} callback]
3594 %<ja>\item[\texttt{luatexja.load\_jfm}コールバック]
3595 %<zh>\item[\texttt{luatexja.load\_jfm}回调]
3597 With this callback you can overwrite JFMs.
3598 This callback is called when a new JFM is loaded.
3601 このコールバックを用いることでJFMを上書きすることができる.
3602 このコールバックは新しいJFMが読み込まれるときに呼び出される.
3605 \begin{lstlisting}[numbers=left]
3606 function (<table> jfm_info, <string> jfm_name)
3607 return <table> new_jfm_info
3612 The argument \verb+jfm_info+ contains a table similar to the table in a JFM file, except
3613 this argument has \texttt{chars} field which contains character codes
3614 whose character class is not~0.
3617 引数 \verb+jfm_info+ はJFMファイルのテーブルと似たものが格納されるが,
3618 クラス0を除いた文字のコードを含んだ\texttt{chars}フィールドを持つ点が異なる.
3622 An example of this callback is the \texttt{ltjarticle} class, with
3623 forcefully assigning character class~0 to \texttt{'parbdd'}
3624 in the JFM \texttt{jfm-min.lua}. This callback doesn't
3625 replace any code of \LuaTeX-ja.
3628 このコールバックの使用例は\texttt{ltjarticle}クラスにあり,
3629 \texttt{jfm-min.lua}中の\texttt{'parbdd'}を強制的にクラス0に割り当てている.
3630 このコールバックは\LuaTeX-jaのコードを書き換えない.
3633 %<en>\item[\texttt{luatexja.define\_font} callback]
3634 %<ja>\item[\texttt{luatexja.define\_font}コールバック]
3635 %<zh>\item[\texttt{luatexja.define\_font}回调]
3637 This callback and the next callback form a pair, and you can assign letters which don't have
3638 fixed code points in Unicode to non-zero character classes.
3639 This \texttt{luatexja.define\_font} callback is called just when new Japanese font is loaded.
3642 このコールバックと次のコールバックは組をなしており,Unicode中に固定された文字コード
3643 番号を持たない文字を非零の文字クラスに割り当てることができる.
3644 このコールバックは新しい和文フォントが読み込まれたときに呼び出される.
3647 \begin{lstlisting}[numbers=left]
3648 function (<table> jfont_info, <number> font_number)
3649 return <table> new_jfont_info
3654 You may assume that \verb+jfont_info+ has the following fields:
3657 \verb+jfont_info+ は以下のフィールドを持つ:
3661 %<en>The index number of JFM.
3666 %<en>Font size in a scaled point (${}=2^{-16}\,\textrm{pt}$).
3667 %<ja>スケールド・ポイント(${}=2^{-16}\,\textrm{pt}$)を単位としたフォントのサイズ.
3668 %<zh>以参照点(${}=2^{-16}\,\textrm{pt}$)为点位的字体大小。
3671 %<en>The value specified in \texttt{jfmvar=...} at a call of \verb+\jfont+.
3672 %<ja>\verb+\jfont+ の呼び出しの際に\texttt{jfmvar=...}で指定された値.
3673 %<zh>\verb!\jfont!调用的\texttt{jfmvar=...}值。
3677 The returned table \verb+new_jfont_info+ also should include these three fields.
3678 The \verb+font_number+ is a font number.
3681 戻り値の \verb+new_jfont_info+ テーブルもこれら3つのフィールドを含まなければならない.
3682 \verb+font_number+ はフォント番号である.
3686 A good example of this and the next callbacks is the \Pkg{luatexja-otf}
3687 package, supporting \verb+"AJ1-xxx"+ form for Adobe-Japan1
3688 CID characters in a JFM. This callback doesn't replace any
3692 これと次のコールバックの良い使用例は\Pkg{luatexja-otf}パッケージであり,
3693 JFM中でAdobe-Japan1 CIDの文字を \verb+"AJ1-xxx"+ の形で指定するために
3695 このコールバックは\LuaTeX-jaのコードを書き換えない.
3698 %<en>\item[\texttt{luatexja.find\_char\_class} callback]
3699 %<ja>\item[\texttt{luatexja.find\_char\_class}コールバック]
3700 %<zh>\item[\texttt{luatexja.find\_char\_class}回调]
3702 This callback is called just when \LuaTeX-ja is trying to determine which
3703 character class a character \verb+chr_code+ belongs.
3704 A function used in this callback should be in the following form:
3707 このコールバックは\LuaTeX-jaが \verb+chr_code+ の文字がどの文字クラスに
3708 属するかを決定しようとする際に呼び出される.
3709 このコールバックで呼び出される関数は次の形をしていなければならない:
3711 \begin{lstlisting}[numbers=left]
3712 function (<number> char_class, <table> jfont_info, <number> chr_code)
3713 if char_class~=0 then return char_class
3716 return (<number> new_char_class or 0)
3722 The argument \verb+char_class+ is the result of \LuaTeX-ja's default
3723 routine or previous function calls in this callback, hence
3724 this argument may not be 0. Moreover, the returned
3725 \verb+new_char_class+ should be as same as \verb+char_class+ when \verb+char_class+
3726 is not~0, otherwise you will overwrite the \LuaTeX-ja's
3730 引数 \verb+char_class+ は\LuaTeX-jaのデフォルトルーチンか,このコールバックの
3731 直前の関数呼び出しの結果を含んでおり,したがってこの値は0ではないかもしれない.
3732 さらに,戻り値の \verb+new_char_class+ は \verb+char_class+ が非零のときには
3733 \verb+char_class+ の値と同じであるべきで,そうでないときは\LuaTeX-jaの
3734 デフォルトルーチンを書き換えることになる.
3738 This callback doesn't replace any code of \LuaTeX-ja.
3741 このコールバックは\LuaTeX-jaのコードを書き換えない.
3744 此回调不会替换\LuaTeX-ja中任何代码。
3747 %<en>\item[\texttt{luatexja.set\_width} callback]
3748 %<ja>\item[\texttt{luatexja.set\_width}コールバック]
3749 %<zh>\item[\texttt{luatexja.set\_width}回调]
3751 This callback is called when \LuaTeX-ja is trying to encapsule a
3752 \textbf{JAchar} \textit{glyph\_node}, to adjust its
3753 dimension and position.
3756 このコールバックは\LuaTeX-jaが\textbf{JAchar}の寸法と位置を調節するために
3757 その\textit{glyph\_node}をカプセル化しようとする際に呼び出される.
3759 \begin{lstlisting}[numbers=left]
3760 function (<table> shift_info, <table> jfont_info, <number> char_class)
3761 return <table> new_shift_info
3766 The argument \verb+shift_info+ and the returned \verb+new_shift_info+ have
3767 \texttt{down} and \texttt{left} fields, which are the amount of shifting
3768 down/left the character in a scaled-point.
3771 引数 \verb+shift_info+ と戻り値の \verb+new_shift_info+ は
3772 \texttt{down}と\texttt{left}のフィールドを持ち,これらの値は
3773 文字の下/左へのシフト量(スケールド・ポイント単位)である.
3777 A good example is \Pkg{test/valign.lua}.
3778 After loading this file, the vertical position of glyphs is automatically
3779 adjusted; the ratio $(\hbox{height}:\hbox{depth})$ of glyphs is adjusted
3780 to be that of letters in the character class~0. For example, suppose that
3782 \item The setting of the JFM: $(\hbox{height})=88x$, $(\hbox{depth})=12x$
3783 (the standard values of Japanese OpenType fonts);
3784 \item The value of the real font: $(\hbox{height})=28y$, $(\hbox{depth})=5y$
3785 (the standard values of Japanese TrueType fonts).
3787 Then, the position of glyphs is shifted up by
3789 \frac{88x}{88x+12x} (28y+5y) - 28y = \frac{26}{25}y= 1.04y.
3793 良い例が\Pkg{test/valign.lua}である.このファイルが読み込まれた状態では,
3794 JFM内で規定された文字クラス0の文字における$(\hbox{高
3795 さ}):(\hbox{深さ})$の比になるように,実際のフォントの出力上
3798 \item JFM側の設定:$(\hbox{高さ})=88x$, $(\hbox{深さ})=12x$%
3799 (和文OpenTypeフォントの標準値)
3800 \item 実フォント側の数値:$(\hbox{高さ})=28y$, $(\hbox{深さ})=5y$(和文TrueTypeフォントの標準値)
3802 となっていたとする.すると,実際の文字の出力位置は,
3804 \frac{88x}{88x+12x} (28y+5y) - 28y = \frac{26}{25}y= 1.04y.
3812 %<en>\section{Parameters}
3813 %<ja>\section{パラメータ}
3815 %<en>\subsection{\texttt{\char92 ltjsetparameter} primitive}
3816 %<ja>\subsection{\texttt{\char92 ltjsetparameter}プリミティブ}
3817 %<zh>\subsection{\texttt{\char92 ltjsetparameter}基本参数}
3820 As noted before, \verb+\ltjsetparameter+ and \verb+\ltjgetparameter+ are
3821 primitives for accessing most parameters of \LuaTeX-ja. One of the main
3822 reason that \LuaTeX-ja didn't adopted the syntax similar to that of \pTeX\
3823 (\textit{e.g.},~\verb+\prebreakpenalty`)=10000+)
3824 is the position of \verb+hpack_filter+ callback in the source
3825 of \LuaTeX, see Section~\ref{sec-para}.
3828 先に述べたように,\verb+\ltjsetparameter+ と \verb+\ltjgetparameter+ は
3829 \LuaTeX-jaのほとんどのパラメータにアクセスするためのプリミティブである.
3830 \LuaTeX-jaが\pTeX のような文法(例えば,\verb+\prebreakpenalty`)=10000+)を
3831 採用しない理由の一つは,\LuaTeX のソースにおける \verb+hpack_filter+
3832 コールバックの位置にある.\ref{sec-para}節を参照.
3836 \verb+\ltjsetparameter+ and \verb+\ltjglobalsetparameter+ are primitives
3837 for assigning parameters. These take one argument which is a
3838 \texttt{<key>=<value>} list. Allowed keys are described in the next
3840 The difference between
3841 \verb+\ltjsetparameter+ and \verb+\ltjglobalsetparameter+ is only the
3842 scope of assignment;
3843 \verb+\ltjsetparameter+ does a local assignment and
3844 \verb+\ltjglobalsetparameter+ does a global one.
3845 They also obey the value of \verb+\globaldefs+,
3846 like other assignment.
3849 \verb+\ltjsetparameter+ と \verb+\ltjglobalsetparameter+ はパラメータを
3850 指定するためのプリミティブである.これらは\texttt{<key>=<value>}のリストを
3851 引数としてとる.許されるキーは次の節に記述する.
3852 \verb+\ltjsetparameter+ と \verb+\ltjglobalsetparameter+ の違いはスコープの
3854 \verb+\ltjsetparameter+ はローカルな指定,\verb+\ltjglobalsetparameter+ は
3856 これらは他のパラメータ指定と同様に \verb+\globaldefs+ の値に従う.
3860 \verb+\ltjgetparameter+ is the primitive for acquiring parameters. It
3861 always takes a parameter name as first argument, and also takes the
3862 additional argument---a character code, for example---in some cases.
3865 \verb+\ltjgetparameter+ はパラメータの値を取得するためのプリミティブであり,
3867 そして,いくつかの場合には加えてさらに引数(例えば文字コード)をとる.
3870 \ltjgetparameter{differentjfm},
3871 \ltjgetparameter{autospacing},
3872 \ltjgetparameter{prebreakpenalty}{`)}.
3875 \emph{The return value of\/ {\normalfont\tt\char92ltjgetparameter} is
3876 always a string}. This is outputted by \texttt{tex.write()}, so any
3877 character other than space~`\texttt{\char32}'~(U+0020) has the category code
3878 12~(other), while the space has 10~(space).
3881 \textbf{{\normalfont\tt\char92ltjgetparameter}の戻り値は常に文字列である.}
3882 これは\texttt{tex.write()}によって出力しているためで,スペース`\texttt{\char32}'~(U+0020)を除いた文字のカテゴリーコードは全て12~(other)となる.
3883 一方,スペースのカテゴリーコードは10~(space)である.
3886 %<en>\subsection{List of Parameters}
3887 %<ja>\subsection{パラメータ一覧}
3888 %<zh>\subsection{参数一览}
3892 The following is the list of parameters which can be specified by the
3893 \verb+\ltjsetparameter+ command. [\verb+\cs+] indicates the counterpart
3894 in \pTeX, and symbols beside each parameter has the following meaning:
3897 以下は \verb+\ltjsetparameter+ に指定することができるパラメータの一覧である.
3898 [\verb+\cs+]は\pTeX における対応物を示す.
3899 また,それぞれのパラメータの右上にある記号には次の意味がある:
3903 \item % avoiding from error ``Something's wrong--perhaps a missing \item.''.
3906 \item No mark: values at the end of the paragraph or the hbox are
3907 adopted in the whole paragraph/hbox.
3910 \item 記号なし:段落や水平ボックスの終端での値がその段落/水平ボックス全体で用いられる.
3913 \item `\ast' : local parameters, which can change everywhere inside a paragraph/hbox.
3916 \item `\ast':ローカルなパラメータであり,段落/水平ボックス内のどこででも値を変えることができる.
3919 \item `\dagger': assignments are always global.
3922 \item `\dagger':指定は常にグローバルになる.
3926 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
3927 \item[\Param{jcharwidowpenalty}\,=<penalty>] [\verb+\jcharwidowpenalty+]
3929 Penalty value for suppressing orphans. This penalty is inserted just
3930 after the last \textbf{JAchar} which is not regarded as a
3931 (Japanese) punctuation mark.
3934 パラグラフの最後の字が孤立して改行されるのを防ぐためのペナルティの値.
3935 このペナルティは(日本語の)句読点として扱われない最後の\textbf{JAchar}の直後に
3939 \item[\Param{kcatcode}\,=\{<chr\_code>,<natural number>\}]\
3941 An additional attributes which each character whose character code is <chr\_code> has.
3942 At the present version, the lowermost bit of <natural number> indicates
3943 whether the character is considered as a punctuation mark
3944 (see the description of \Param{jcharwidowpenalty} above).
3947 文字コードが<chr\_code>の文字が持つ付加的な属性値(attribute).
3948 現在のバージョンでは,<natural number>の最下位ビットが,その文字が句読点と
3949 みなされるかどうかを表している(上の\Param{jcharwidowpenalty}の記述を参照).
3952 \item[\Param{prebreakpenalty}\,=\{<chr\_code>,<penalty>\}] [\verb+\prebreakpenalty+]\
3954 文字コード<chr\_code>の\textbf{JAchar}が行頭にくることを抑止するために,
3955 この文字の前に挿入/追加されるペナルティの量を指定する.
3957 例えば閉じ括弧「〗」は絶対に行頭にきてはならないので,標準で読み込まれる
3958 \texttt{luatexja-kinsoku.tex}において
3960 \ltjsetparameter{prebreakpenalty={`〙,10000}}
3962 と,最大値の10000が指定されている.他にも,小書きのカナなど,絶対禁止とい
3963 うわけではないができれば行頭にはきて欲しくない場合に,0と
3964 10000の間の値を指定するのも有用であろう.
3966 \ltjsetparameter{prebreakpenalty={`ゕ,150}}
3970 \item[\Param{postbreakpenalty}\,=\{<chr\_code>,<penalty>\}] [\verb+\postbreakpenalty+]
3972 文字コード<chr\_code>の\textbf{JAchar}が行末にくることを抑止するために,
3973 この文字の後に挿入/追加されるペナルティの量を指定する.
3975 \pTeX では,\verb+\prebreakpenalty+, \verb+\postbreakpenalty+において,
3977 \item 一つの文字に対して,pre, postどちらか一つしか指定することができなかっ
3979 \item pre, post合わせて256文字分の情報を格納することしかできなかった.
3981 という制限があったが,\LuaTeX-jaではこれらの制限は解消されている.
3984 \item[\Param{jatextfont}\,=\{<jfam>,<jfont\_cs>\}]
3985 %<en>[\verb+\textfont+ in \TeX]
3986 %<ja>[\TeX の \verb+\textfont+]
3987 %<zh>[\TeX 的\verb+\textfont+]
3988 \item[\Param{jascriptfont}\,=\{<jfam>,<jfont\_cs>\}]
3989 %<en>[\verb+\scriptfont+ in \TeX]
3990 %<ja>[\TeX の \verb+\scriptfont+]
3991 %<zh>[\TeX 中的\verb+\scriptfont+]
3992 \item[\Param{jascriptscriptfont}\,=\{<jfam>,<jfont\_cs>\}]
3993 %<en>[\verb+\scriptscriptfont+ in \TeX]
3994 %<ja>[\TeX の \verb+\scriptscriptfont+]
3995 %<zh>[\TeX 中的\verb+\scriptscriptfont+]
3996 \item[\Param{yjabaselineshift}\,=<dimen>$^\ast$]\
3997 \item[\Param{yalbaselineshift}\,=<dimen>$^\ast$] [\verb+\ybaselineshift+]
3999 \item[\Param{jaxspmode}\,=\{<chr\_code>,<mode>\}]
4002 Setting whether inserting \Param{xkanjiskip} is allowed before/after a \textbf{JAchar} whose character code is <chr\_code>.
4003 The followings are allowed for <mode>:
4006 文字コードが<chr\_code>の\textbf{JAchar}の前/後ろに\Param{xkanjiskip}の
4011 %<en>\item[0, \texttt{inhibit}] Insertion of \Param{xkanjiskip} is inhibited before the character, nor after the character.
4012 %<ja>\item[0, \texttt{inhibit}] \Param{xkanjiskip}の挿入は文字の前/後ろのいずれでも禁止される.
4013 %<zh>\item[0, \texttt{inhibit}] 插入文字前/后的\Param{xkanjiskip}均被禁止。
4014 %<en>\item[1, \texttt{preonly}] Insertion of \Param{xkanjiskip} is allowed before the character, but not after.
4015 %<ja>\item[1, \texttt{preonly}] \Param{xkanjiskip}の挿入は文字の前では許されるが,後ろでは許されない.
4016 %<zh>\item[1, \texttt{preonly}] 文字前允许插入\Param{xkanjiskip},但其后不允许插入。
4017 %<en>\item[2, \texttt{postonly}] Insertion of \Param{xkanjiskip} is allowed after the character, but not before.
4018 %<ja>\item[2, \texttt{postonly}] \Param{xkanjiskip}の挿入は文字の後ろでは許されるが,前では許されない.
4019 %<zh>\item[2, \texttt{postonly}] 文字后允许插入\Param{xkanjiskip},但之前不允许插入。
4020 %<en>\item[3, \texttt{allow}] Insertion of \Param{xkanjiskip} is allowed both before the character and after the character. This is the default value.
4021 %<ja>\item[3, \texttt{allow}] \Param{xkanjiskip}の挿入は文字の前/後ろのいずれでも許される.これがデフォルトの値である.
4022 %<zh>\item[3, \texttt{allow}] 文字前后均可插入\Param{xkanjiskip}。此为默认值。
4025 This parameter is similar to the \verb+\inhibitxspcode+ primitive of \pTeX, but not compatible with \verb+\inhibitxspcode+.
4028 このパラメータは\pTeX の \verb+\inhibitxspcode+ プリミティブと似ているが,
4032 此参数类似\pTeX 基本语句\verb!\inhibitxspcode!,但是和\verb!\inhibitxspcode!不兼容。
4034 \item[\Param{alxspmode}\,=\{<chr\_code>,<mode>\}] [\verb+\xspcode+]
4037 Setting whether inserting \Param{xkanjiskip} is allowed before/after a
4038 \textbf{ALchar} whose character code is <chr\_code>.
4039 The followings are allowed for <mode>:
4042 文字コードが<chr\_code>の\textbf{ALchar}の前/後ろに\Param{xkanjiskip}の
4047 %<en>\item[0, \texttt{inhibit}] Insertion of \Param{xkanjiskip} is inhibited before the character, nor after the character.
4048 %<ja>\item[0, \texttt{inhibit}] \Param{xkanjiskip}の挿入は文字の前/後ろのいずれでも禁止される.
4049 %<zh>\item[0, \texttt{inhibit}] 插入文字前/后的\Param{xkanjiskip}均被禁止。
4050 %<en>\item[1, \texttt{preonly}] Insertion of \Param{xkanjiskip} is allowed before the character, but not after.
4051 %<ja>\item[1, \texttt{preonly}] \Param{xkanjiskip}の挿入は文字の前では許されるが,後ろでは許されない.
4052 %<zh>\item[1, \texttt{preonly}] 文字前允许插入\Param{xkanjiskip},但其后不允许插入。
4053 %<en>\item[2, \texttt{postonly}] Insertion of \Param{xkanjiskip} is allowed after the character, but not before.
4054 %<ja>\item[2, \texttt{postonly}] \Param{xkanjiskip}の挿入は文字の後ろでは許されるが,前では許されない.
4055 %<zh>\item[2, \texttt{postonly}] 文字后允许插入\Param{xkanjiskip},但之前不允许插入。
4056 %<en>\item[3, \texttt{allow}] Insertion of \Param{xkanjiskip} is allowed before the character and after the character. This is the default value.
4057 %<ja>\item[3, \texttt{allow}] \Param{xkanjiskip}の挿入は文字の前/後ろのいずれでも許される.これがデフォルトの値である.
4058 %<zh>\item[3, \texttt{allow}] 文字前后均可插入\Param{xkanjiskip}。此为默认值。
4061 Note that parameters \Param{jaxspmode} and \Param{alxspmode} use a common table, hence these two parameters are synonyms of each other.
4064 \Param{jaxspmode}と\Param{alxspmode}は共通のテーブルを用いているため,
4065 これら2つのパラメータは互いの異名となっていることに注意する.
4068 注意参数\Param{jaxspmode}和\Param{alxspmode}公用一个表,故这两个参数互为同义语。
4071 \item[\Param{autospacing}\,=<bool>$^\ast$] [\verb+\autospacing+]
4072 \item[\Param{autoxspacing}\,=<bool>$^\ast$] [\verb+\autoxspacing+]
4073 \item[\Param{kanjiskip}\,=<skip>] [\verb+\kanjiskip+]
4074 \item[\Param{xkanjiskip}\,=<skip>] [\verb+\xkanjiskip+]
4076 \item[\Param{differentjfm}\,=<mode>$^\dagger$]
4079 Specify how glues/kerns between two \textbf{JAchar}s whose JFM (or size) are different.
4080 The allowed arguments are the followings:
4083 JFM(もしくはサイズ)が異なる2つの\textbf{JAchar}の間にグルー/カーンをどのように
4088 对于处理不同大小或者JFM的两种\textbf{JAchar}之间的胶/出格。
4092 \item[\texttt{average}]
4093 \item[\texttt{both}]
4094 \item[\texttt{large}]
4095 \item[\texttt{small}]
4098 \item[\Param{jacharrange}\,=<ranges>$^\ast$]
4099 \item[\Param{kansujichar}\,=\{<digit>, <chr\_code>\}] [\verb+\kansujichar+]
4103 %<en>\section{Other Primitives}
4104 %<ja>\section{その他のプリミティブ}
4105 %<zh>\section{其他基本语句}
4106 %<en>\subsection{Primitives for Compatibility}
4107 %<ja>\subsection{互換プリミティブ}
4108 %<zh>\subsection{基本语句兼容性}
4111 The following primitives are implemented for compatibility with \pTeX:
4114 以下のプリミティブは\pTeX との互換性のために実装されている:
4119 \begin{list}{}{\def\makelabel{\ttfamily\char92 }\advance\leftmargin1\zw}
4128 %<en>\subsection{\texttt{\char92 inhibitglue} primitive}
4129 %<ja>\subsection{\texttt{\char92 inhibitglue}プリミティブ}
4130 %<zh>\subsection{\texttt{\char92 inhibitglue}基本语句}
4132 The primitive \verb+\inhibitglue+ suppresses the insertion of \textbf{JAglue}.
4133 The following is an example, using a special JFM that there will be a glue between
4134 the beginning of a box and `あ', and also between `あ' and `ウ'.
4137 \verb+\inhibitglue+ プリミティブは\textbf{JAglue}の挿入を抑制する.
4138 以下は,ボックスの始めと`あ'の間,`あ'と`ウ'の間にグルーが入る特別なJFMを用いた例で
4142 基本语句\verb!\inhibitglue!会压缩\textbf{JAchar}的插入。
4143 下面的例子使用了特殊的JFM。在一个盒子和“あ”之间,以及“あ”和“ウ”之间存在胶。
4147 \jfont\g=psft:Ryumin-Light:jfm=test \g
4148 \fbox{\hbox{あウあ\inhibitglue ウ}}
4149 \inhibitglue\par\noindent あ1
4150 \par\inhibitglue\noindent あ2
4151 \par\noindent\inhibitglue あ3
4152 \par\hrule\noindent あoff\inhibitglue ice
4156 With the help of this example, we remark the specification of \verb+\inhibitglue+:
4159 この例を援用して,\verb+\inhibitglue+ の仕様について述べる.
4162 如上例子,我们注意到\verb!\inhibtglue!的用法。
4169 \item The call of \verb+\inhibitglue+ in the (internal) vertical mode is
4173 \item \verb+\inhibitglue+ の垂直モード中での呼び出しは意味を持たない.
4174 4行目の入力で有効にならないのは,\verb+\inhibitglue+ の時点では垂直モードであり,
4175 \verb+\noindent+ の時点で水平モードになるからである.
4179 \item The call of \verb+\inhibitglue+ in the (restricted) horizontal
4180 mode is only effective on the spot; does not get over boundary of
4181 paragraphs. Moreover, \verb+\inhibitglue+ cancels ligatures and
4182 kernings, as shown in the last line of above example.
4185 \item \verb+\inhibitglue+ の(制限された)水平モード中での呼び出しはその場でのみ
4187 さらに,\verb+\inhibitglue+ は上の例の最終行のようにリガチャとカーニングを
4192 \item The call of \verb+\inhibitglue+ in math mode is just ignored.
4195 \item \verb+\inhibitglue+ を数式モード中で呼び出した場合はただ無視される.
4199 %<en>\section{Control Sequences for \LaTeXe}
4200 %<ja>\section{\LaTeXe 用のコントロールシーケンス}
4201 %<zh>\section{\LaTeXe 下使用的控制序列}
4203 %<en>\subsection{Patch for NFSS2}
4204 %<ja>\subsection{NFSS2へのパッチ}
4205 %<zh>\subsection{NFSS2补丁}
4206 \label{ssub-nfsspat}
4209 As described in Subsection~\ref{ssec-ltx}, \LuaTeX-ja simply adopted
4210 \texttt{plfonts.dtx} in \pLaTeXe\ for the Japanese patch for NFSS2.
4211 For an convenience, we will describe
4212 commands which are not described in Subsection~\ref{ssub-chgfnt}.
4215 \ref{ssec-ltx}節で述べたように,\LuaTeX-jaはNFSS2への日本語パッチである
4216 \pLaTeXe の\texttt{plfonts.dtx}を単純に取り入れている.
4217 便宜のため,ここでは\ref{ssub-chgfnt}節で述べていなかったコマンドについて
4222 \item[DeclareYokoKanjiEncoding\{<encoding>\}\{<text-settings>\}\{<math-settings>\}]
4225 In NFSS2 under \LuaTeX-ja, distinction between alphabetic font families
4226 and Japanese font families are only made by their
4227 encodings. For example, encodings OT1 and T1 are for
4228 alphabetic font families, and a Japanese font family cannot
4229 have these encodings. This command defines a new encoding
4230 scheme for Japanese font family (in horizontal direction).
4233 \LuaTeX-jaのNFSS2においては,欧文フォントファミリと和文フォントファミリは
4235 例えば,OT1とT1のエンコーディングは欧文フォントファミリに対するものであり,
4236 和文フォントファミリはこれらのエンコーディングを持つことはできない.
4237 このコマンドは和文フォントファミリ(横書き用)のための新しいエンコーディングを
4241 \item[DeclareKanjiEncodingDefaults\{<text-settings>\}\{<math-settings>\}]
4242 \item[DeclareKanjiSubstitution\{<encoding>\}\{<family>\}\{<series>\}\{<shape>\}]
4243 \item[DeclareErrorKanjiFont\{<encoding>\}\{<family>\}\{<series>\}\{<shape>\}\{<size>\}]
4246 The above 3~commands are just the counterparts for \verb+DeclareFontEncodingDefaults+ and~others.
4249 上記3つのコマンドはちょうど \verb+DeclareFontEncodingDefaults+ などに対応するものである.
4252 \item[reDeclareMathAlphabet\{<unified-cmd>\}\{<al-cmd>\}\{<ja-cmd>\}]
4256 和文・欧文の数式用フォントファミリを一度に変更する命令を作成する.
4257 具体的には,欧文数式用フォントファミリ変更の命令<al-cmd>(\verb+\mathrm+ 等)と,和文数式用フォ
4258 ントファミリ変更の命令<ja-cmd>(\verb+\mathmc+ 等)の2つを同時に行う命令として
4259 <unified-cmd>を(再)定義する.実際の使用では<unified-cmd>と
4260 <al-cmd>に同じものを指定する,すなわち,<al-cmd>で和文側も変
4261 更させるようにするのが一般的と思われる.
4263 {\let\item=\origitem
4266 <unified-cmd>\{<arg>\}\quad$\longrightarrow$\quad
4267 (<al-cmd>を1段展開したもの)\{<ja-cmd>を1段展開したもの)\{<arg>\}\}
4269 と定義を行うので,使用には注意が必要である:
4271 \item <al-cmd>,~<ja-cmd>は既に定義されていなければならない.\verb+\reDeclareMathAlphabet+後に
4272 両命令の内容を再定義しても,<unified-cmd>の内容にそれは反映されない.
4273 \item <al-cmd>,~<ja-cmd>に\verb+\@mathrm+などと\texttt{@}をつけた命令を指定した時の動作は保証できない.
4277 \item[DeclareRelationFont\{<ja-encoding>\}\{<ja-family>\}\{<ja-series>\}\{<ja-shape>\}\\
4278 \hfill\{<al-encoding>\}\{<al-family>\}\{<al-series>\}\{<al-shape>\}]
4280 This command sets the `accompanied' alphabetic font family (given by the latter 4~arguments)
4281 with respect to a Japanese font family given by the former 4~arguments.
4284 いわゆる「従属欧文」を設定するための命令である.前半の4引数で表される和文フォントファミリに対して,
4285 そのフォントに対応する「従属欧文」フォントファミリを後半の4引数により与える.
4287 \item[SetRelationFont]
4289 This command is almost same as \verb+\DeclareRelationFont+, except that this command does a local
4290 assignment, where \verb+\DeclareRelationFont+ does a global assignment.
4293 このコマンドは \verb+\DeclareRelationFont+ とローカルな指定であることを除いて
4294 ほとんど同じである(\verb+\DeclareRelationFont+ はグローバル).
4299 Change current alphabetic font encoding/family/\dots\ to the `accompanied' alphabetic
4300 font family with respect to current Japanese font family,
4302 \verb+\DeclareRelationFont+ or \verb+\SetRelationFont+.
4303 Like \verb+\fontfamily+, \verb+\selectfont+ is required to take an effect.
4306 現在の欧文フォントエンコーディング/ファミリ/…… を,
4307 \verb+\DeclareRelationFont+ か \verb+\SetRelationFont+ で指定された
4308 現在の和文フォントファミリに対応する「従属欧文」フォントファミリに変更する.
4309 \verb+\fontfamily+ のように,有効にするためには \verb+\selectfont+ が必要である.
4312 \item[adjustbaseline]
4315 \item[fontfamily\{<family>\}]
4318 As in \LaTeXe, this command changes current font family (alphabetic, Japanese,~\emph{or both})
4319 to <family>. Which family will be changed is determined as follows:
4322 元々の\LaTeXe におけるものと同様に,このコマンドは現在のフォントファミリ(欧文,
4323 和文,\textbf{もしくは両方})を<family>に変更する.
4324 どのファミリが変更されるかは以下のようにして決定される:
4331 \item Let current encoding scheme for Japanese fonts be
4332 <ja-enc>. Current Japanese font family will be changed to
4333 <family>, if one of the following two conditions is met:
4336 \item 現在の和文フォントに対するエンコーディングが<ja-enc>であるとしよう.
4337 現在の和文フォントファミリは,以下の2つの条件のうちの1つが満たされているときに
4342 \item The family <fam> under the encoding <ja-enc> has been already defined by
4343 \verb+\DeclareKanijFamily+.
4346 \item エンコーディング<ja-enc>におけるファミリ<fam>が既に \verb+\DeclareKanjiFamily+ によって定義されている.
4349 \item A font definition named \texttt{<enc><ja-enc>.fd} (the file name is
4350 all lowercase) exists.
4356 \item フォント定義ファイル\texttt{<enc><ja-enc>.fd}(ファイル名は全て小文字)が存在する.
4360 \item Let current encoding scheme for alphabetic fonts be
4361 <al-enc>. For alphabetic font family, the criterion as above is used.
4364 \item 現在の欧文フォントに対するエンコーディングを<al-enc>とする.
4365 欧文フォントファミリに対しても,上記の基準が用いられる.
4368 \item There is a case which none of the above applies, that is, the font
4369 family named <family> doesn't seem to be defined neither under the
4370 encoding <ja-enc>, nor under <al-enc>.
4371 In this case, the default family for font substitution is used for
4372 alphabetic and Japanese fonts. Note that current encoding will not
4373 be set to <family>, unlike the original implementation in \LaTeX.
4376 \item 上記のいずれもが適用されない,つまり<family>が<ja-enc>と<al-enc>の
4377 どちらでも定義されないような場合がある.
4378 この場合,代替フォントに用いられるデフォルトのフォントファミリが欧文フォントと
4379 和文フォントに用いられる.\LaTeX のオリジナルの実装とは異なり,
4380 現在のエンコーディングは<family>には設定されないことに注意する.
4387 As closing this subsection, we shall introduce an example of
4388 \verb+\SetRelationFont+ and \verb+\userelfont+:
4391 この節の終わりに,\verb+\SetRelationFont+ と \verb+\userelfont+ の例を
4396 \SetRelationFont{JY3}{gt}{m}{n}{OT1}{pag}{m}{n}
4397 \userelfont\selectfont{}あいうabc
4401 %<en>\subsection{Cropmark/`tombow'}
4402 %<ja>\subsection{トンボ}
4405 %<en>\section{Extensions}
4407 \subsection{\texttt{luatexja-fontspec.sty}}
4410 As described in Subsection~\ref{ssec-fontspec}, this optional package
4411 provides the counterparts for several commands defined in the
4412 \Pkg{fontspec} package.
4413 In addition to `font features' in the original \Pkg{fontspec},
4414 the following `font features' specifications are allowed for
4415 the commands of Japanese version:
4418 \ref{ssec-fontspec}節で述べたように,この追加パッケージは\Pkg{fontspec}
4419 パッケージで定義されているコマンドに対応する和文フォント用のコマンドを提供する.
4420 オリジナルの\Pkg{fontspec}での`font feature'に加えて,和文版のコマンドには
4421 以下の`font feature'を指定することができる:
4425 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
4428 \item[JFM-var=<name>] \
4431 These 3 font features correspond to \texttt{cid}, \texttt{jfm} and
4432 \texttt{jfmvar} keys for \verb+\jfont+ primitive, respectively.
4433 \texttt{CID} is effective only when with \texttt{NoEmbed}
4435 See Subsections~\ref{ssec-jfont} and \ref{ssec-psft} for details.
4438 これら3つのキーはそれぞれ \verb+\jfont+ プリミティブに対する
4439 \texttt{cid}, \texttt{jfm}, \texttt{jfmvar}キーとそれぞれ対応する.
4440 \texttt{CID} は下の \texttt{NoEmbed} と合わせて用いられたときのみ有効である.
4441 詳細は\ref{ssec-jfont}節と\ref{ssec-psft}節を参照.
4446 By specifying this font feature, one can use `name-only' Japanese font which
4447 will not be embedded in the output PDF file. See Subsection~\ref{ssec-psft}.
4450 これを指定することで,PDFに埋め込まれない「名前だけ」のフォントを指定することが
4451 できる.\ref{ssec-psft}節を参照.
4455 \subsection{\texttt{luatexja-otf.sty}}
4458 This optional package supports typesetting characters in
4459 Adobe-Japan1. \texttt{luatexja-otf.sty} offers the following 2~low-level
4463 この追加パッケージはAdobe-Japan1の文字の出力をサポートする.
4464 \texttt{luatexja-otf.sty}は以下の2つの低レベルコマンドを提供する:
4466 \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw}
4467 \item[\char92CID\{<number>\}]
4469 Typeset a character whose CID number is <number>.
4472 CID番号が<number>の文字を出力する.
4475 \item[\char92UTF\{<hex\_number>\}]
4477 Typeset a character whose character code is <hex\_number> (in hexadecimal).
4478 This command is similar to \verb+\char"+<hex\_number>,\ %"
4479 but please remind remarks below.
4482 文字コードが(16進で)<hex\_number>の文字を出力する.
4483 このコマンドは \verb+\char"+<hex\_number>と似ているが,下の記述に注意すること.%"
4487 %<en>\paragraph{Remarks}
4490 Characters by \verb+\CID+ and \verb+\UTF+ commands are different from
4491 ordinary characters in the following points:
4494 \verb+\CID+ と \verb+\UTF+ コマンドによって出力される文字は
4502 \item Always treated as \textbf{JAchar}s.
4505 \item 常に\textbf{JAchar}として扱われる.
4508 \item Processing codes for supporting OpenType features (\textit{e.g.},
4509 glyph replacement and kerning) by the \Pkg{luaotfload} package
4510 is not performed to these characters.
4513 \item OpenType feature(例えばグリフ置換やカーニング)をサポートするための
4514 \Pkg{luaotfload}パッケージのコードはこれらの文字には働かない.
4519 %<en>\paragraph{Additional Syntax of JFM}
4520 %<ja>\paragraph{JFMへの記法の追加}
4523 \texttt{luatexja-otf.sty} extends the syntax of JFM; the entries of \texttt{
4524 chars} table in JFM now allows a string in the form
4525 \verb+'AJ1-xxx'+, which stands for the character
4526 whose CID number in Adobe-Japan1 is \verb+xxx+.
4529 \texttt{luatexja-otf.sty}はJFMの記法を拡張する.
4530 JFMの\texttt{chars}テーブルのエントリとして \verb+'AJ1-xxx'+ の形の文字列が
4531 使えるようになる.これはAdobe-Japan1におけるCID番号が \verb+xxx+ の文字を表す.
4534 %<en>\part{Implementations}
4537 %<en>\section{Storing Parameters}
4538 %<ja>\section{パラメータの保持}
4540 %<en>\subsection{Used Dimensions, Attributes and whatsit nodes}
4541 %<ja>\subsection{\LuaTeX-jaで用いられる寸法レジスタ,属性レジスタ,whatsitノード}
4544 Here the following is the list of dimensions and attributes which are used in \LuaTeX-ja.
4547 以下は\LuaTeX-jaで用いられる寸法レジスタ(dimension),属性レジスタ(attribute)の
4551 \def\makelabel{\ttfamily}\advance\leftmargin1\zw
4552 \def\dim#1{\item[\char92 #1\ \textrm{(dimension)}]}
4553 \def\attr#1{\item[\char92 #1\ \textrm{(attribute)}]}
4558 \verb+\jQ+ is equal to
4559 $1\,\textrm{Q}=0.25\,\textrm{mm}$, where `Q'~(also called `級') is
4560 a unit used in Japanese phototypesetting. So one should not change the value of this dimension.
4563 \verb+\jQ+ は$1\,\textrm{Q}=0.25\,\textrm{mm}$
4564 と等しい.ここで,`Q'(もしくは「級」)は日本の写植で用いられる単位である.したがって,
4565 この寸法レジスタの値を変更してはならない.
4570 There is also a unit called `歯' which equals to $0.25\,\textrm{mm}$ and
4571 used in Japanese phototypesetting. This
4572 \verb+\jH+ is a synonym of \verb+\jQ+.
4575 同じく写植で用いられていた単位として「歯」があり,これも$0.25\,\textrm{mm}$と
4576 等しい.\verb+\jH+ は \verb+\jQ+ の別名である.
4581 A temporal register for the `full-width' of current Japanese font.
4584 現在の和文フォントの「全角幅」を保持する一時レジスタ.
4589 A temporal register for the `full-height' (usually the sum of height of imaginary body and its depth) of current Japanese font.
4592 現在の和文フォントの「全角高さ」(通常,高さと深さの和)を保持する一時レジスタ.
4597 Current number of Japanese font family for math formulas.
4600 数式用の和文フォントファミリの現在の番号.
4605 The font index of current Japanese font.
4611 \attr{ltj@charclass}
4613 The character class of Japanese \textit{glyph\_node}.
4616 和文文字の\textit{glyph\_node}の文字クラス.
4619 \attr{ltj@yablshift}
4621 The amount of shifting the baseline of alphabetic fonts in scaled point ($2^{-16}\,\textrm{pt}$).
4624 スケールド・ポイント($2^{-16}\,\textrm{pt}$)を単位とした欧文フォントのベースラインの移動量.
4627 \attr{ltj@ykblshift}
4629 The amount of shifting the baseline of Japanese fonts in scaled point ($2^{-16}\,\textrm{pt}$).
4632 スケールド・ポイント($2^{-16}\,\textrm{pt}$)を単位とした和文フォントのベースラインの移動量.
4637 Whether the auto insertion of \Param{kanjiskip} is allowed at the node.
4640 そのノードで\Param{kanjiskip}の自動挿入が許されるかどうか.
4645 Whether the auto insertion of \Param{xkanjiskip} is allowed at the node.
4648 そのノードで\Param{xkanjiskip}の自動挿入が許されるかどうか.
4653 An attribute for distinguishing `kinds' of a node. One of the following value is
4654 assigned to this attribute:
4657 ノードの「種類」を区別するための属性.以下のうちのひとつが値として割り当てられる:
4660 \item[\textit{italic} (1)]
4662 Glues from an italic correction
4663 (\verb+\/+). This distinction of origins of glues
4664 (from explicit \verb+\kern+, or from \verb+\/+)
4665 is needed in the insertion process of \Param{xkanjiskip}.
4668 イタリック補正(\verb+\/+)によるグルー.このグルーの由来の区別(\verb+\kern+ か
4669 \verb+\/+ か)は\Param{xkanjiskip}の挿入過程において必要になる.
4672 \item[\textit{packed} (2)]
4674 \item[\textit{kinsoku} (3)]
4676 Penalties inserted for the word-wrapping process of Japanese characters (\emph{kinsoku}).
4679 和文文字のワードラップ過程において挿入されたペナルティ(\emph{kinsoku}).
4682 \item[\textit{from\_jfm} (4)]
4684 Glues/kerns from JFM.
4690 \item[\textit{line\_end} (5)]
4695 和文文字が行末にきたとき,行末との間に挿入されるカーンである.
4699 \item[\textit{kanji\_skip} (6)]
4701 Glues for \Param{kanjiskip}.
4704 \Param{kanjiskip}のグルー.
4707 \item[\textit{xkanji\_skip} (7)]
4709 Glues for \Param{xkanjiskip}.
4712 \Param{xkanjiskip}のグルー.
4715 \item[\textit{processed} (8)]
4717 Nodes which is already processed by \ldots.
4720 \LuaTeX-ja の内部処理によって既に処理されたノード.
4723 \item[\textit{ic\_processed} (9)]
4725 Glues from an italic correction, but also already processed.
4728 イタリック補正に由来するグルーであるが,まだ処理されていないもの.
4731 \item[\textit{boxbdd} (15)]
4733 Glues/kerns that inserted just the beginning or the ending of an hbox or a paragraph.
4736 ある水平ボックスか段落の最初か最後に挿入されたグルー/カーン.
4742 Where $i$~is a natural number which is less than~7.
4743 These 7~attributes store bit~vectors indicating which character block is regarded as a block of \textbf{JAchar}s.
4747 これら7つの属性レジスタは,どの文字ブロックが\textbf{JAchar}のブロックとして
4748 扱われるかを示すビットベクトルを格納する.
4753 Furthermore, \LuaTeX-ja uses several `user-defined' whatsit nodes for
4754 inrernal processing. All those nodes store a natural number (hence the node's
4755 \texttt{type} is 100). The following \verb+user_id+s are used:
4758 さらに,\LuaTeX-jaはいくつかの「ユーザ定義の」whatsit ノードを内部処理に用いる.
4759 これらの全てのノードは自然数を格納している(したがってノードの\texttt{type}は
4760 100である).次の \verb+user_id+ が使用される:
4765 Nodes for indicating that \verb+\inhibitglue+ is
4766 specified. The \texttt{value} field of these nodes doesn't matter.
4769 \verb+\inhibitglue+ が指定されたことを示すノード.これらのノードの
4770 \texttt{value}フィールドは意味を持たない.
4775 Nodes for \LuaTeX-ja's stack system (see the next
4776 subsection). The \texttt{value} field of these nodes is
4780 \LuaTeX-jaのスタックシステム(次の節を参照)のためのノード.
4781 これらのノードの\texttt{value}フィールドは現在のグループを表す.
4786 Nodes for Japanese Characters which the callback process of
4787 \Pkg{luaotfload} won't be applied, and the character code is
4788 stored in the \texttt{value} field. Each node having this
4789 \verb+user_id+ is converted to a `glyph\_node' \emph{after}
4790 the callback process of luaotfload.
4791 This \verb+user_id+ is only used by the \Pkg{luatexja-otf} package.
4794 \Pkg{luaotfload}のコールバックによる処理が適用されない和文文字のためのノードで,
4795 \texttt{value}フィールドにその文字のコードが格納されている.
4796 この \verb+user_id+ を持つノードはそれぞれが\Pkg{luaotfload}のコールバックの処理の
4797 \textbf{後で}`glyph\_node'に変換される.この \verb+user_id+ は %
4798 \Pkg{luatexja-otf} パッケージでのみ使用される.
4802 Nodes for indicating beginning of a paragraph.
4803 A paragraph which is started by \verb+\item+ in list-like environments has a horizontal box
4804 for its label before the actual contents. So \dots
4807 These whatsits will be removed during the process of inserting \textbf{JAglue}s.
4810 これらのwhatsitノードは\textbf{JAglue}の挿入処理の間に取り除かれる.
4813 %<en>\subsection{Stack System of \LuaTeX-ja}
4814 %<ja>\subsection{\LuaTeX-jaのスタックシステム}
4817 %<en>\paragraph{Background}
4820 \LuaTeX-ja has its own stack system, and most parameters of \LuaTeX-ja
4821 are stored in it. To clarify the reason, imagine the parameter
4822 \Param{kanjiskip} is stored by a skip, and consider the following
4826 \LuaTeX-jaは独自のスタックシステムを持ち,\LuaTeX-jaのほとんどのパラメータは
4827 これを用いて保持されている.その理由を明らかにするために,
4828 \Param{kanjiskip}パラメータがスキップレジスタで保持されているとし,
4832 \ltjsetparameter{kanjiskip=0pt}ふがふが.%
4833 \setbox0=\hbox{\ltjsetparameter{kanjiskip=5pt}ほげほげ}
4838 As described in Subsection~\ref{ssec-param}, the only effective value of
4839 \Param{kanjiskip} in an hbox is the latest value, so the value of
4840 \Param{kanjiskip} which applied in the entire hbox should be 5\,pt.
4841 However, by the implementation method of \LuaTeX, this `5\,pt' cannot be
4842 known from any callbacks. In the \texttt{tex/packaging.w} (which is a
4843 file in the source of \LuaTeX), there are the following codes:
4846 \ref{ssec-param}節で述べたように,ある水平ボックスの中で効力を持つ
4847 \Param{kanjiskip}の値は最後に現れた値のみであり,したがってボックス全体に適用される
4848 \Param{kanjiskip}は5\,ptであるべきである.しかし,\LuaTeX の実装のために,
4849 この`5\,pt'はどのコールバックからも知ることはできない.
4850 \texttt{tex/packaging.w}(これは\LuaTeX のソースファイルである)の中に,
4856 scaled h; /* height of box */
4857 halfword p; /* first node in a box */
4858 scaled d; /* max depth */
4864 if (cur_list.mode_field == -hmode) {
4865 cur_box = filtered_hpack(cur_list.head_field,
4866 cur_list.tail_field, saved_value(1),
4867 saved_level(1), grp, saved_level(2));
4868 subtype(cur_box) = HLIST_SUBTYPE_HBOX;
4871 Notice that \verb+unsave+ is executed \emph{before}
4872 \verb+filtered_hpack+ (this is where \verb+hpack_filter+ callback is
4873 executed): so `5\,pt' in the above source is orphaned at
4874 \verb+unsave+, and hence it can't be accessed from \verb+hpack_filter+
4878 \verb+unsave+ が \verb+filtered_hpack+(これは \verb+hpack_filter+ コールバックが
4879 実行されるところである)の\textbf{前に}実行されていることに注意する.
4880 したがって,上記ソース中で`5\,pt'は \verb+unsave+ のところで捨てられ,
4881 \verb+hpack_filter+ からはアクセスすることができない.
4884 %<en>\paragraph{The method}
4885 %<ja>\paragraph{解決法}
4886 %<zh>\paragraph{解决方法}
4889 The code of stack system is based on that in a post of Dev-luatex mailing list\footnote{%
4890 \texttt{[Dev-luatex] tex.currentgrouplevel}, a post at 2008/8/19 by Jonathan Sauer.}.
4893 スタックシステムのコードはDev-luatexメーリングリストのある投稿\footnote{\texttt{[Dev-luatex] tex.currentgrouplevel}: Jonathan Sauerによる2008/8/19の投稿.}を
4898 These are two \TeX\ count registers for maintaining information:
4899 \verb+\ltj@@stack+ for the stack level, and \verb+\ltj@@group@level+ for
4900 the \TeX's group level when the last assignment was done. Parameters
4901 are stored in one big table named \texttt{charprop\_stack\_table}, where
4902 \texttt{charprop\_stack\_table[$i$]} stores data of stack level~$i$. If
4903 a new stack level is created by \verb+\ltjsetparameter+, all data of the
4904 previous level is copied.
4907 情報を保持するために,2つの\TeX の整数レジスタを用いている:
4908 \verb+\ltj@@stack+ でスタックレベル,\verb+\ltj@@group@level+ で最後の代入が
4909 なされた時点での\TeX のグループレベルを保持している.
4910 パラメータは\texttt{charprop\_stack\_table}という名前のひとつの大きなテーブルに
4911 格納される.ここで,\texttt{charprop\_stack\_table[$i$]}はスタックレベル$i$の
4912 データを格納している.もし新しいスタックレベルが \verb+\ltjsetparameter+ によって
4913 生成されたら,前のレベルの全てのデータがコピーされる.
4917 To resolve the problem mentioned in `Background' above, \LuaTeX-ja uses
4918 another thing: When a new stack level is about to be created, a whatsit
4919 node whose type, subtype and value are 44~(\textit{user\_defined}),
4920 30112, and current group level respectively is appended to the current
4921 list (we refer this node by \textit{stack\_flag}). This enables us to
4922 know whether assignment is done just inside a hbox. Suppose that the
4923 stack level is~$s$ and the \TeX's group level is~$t$ just after the hbox
4927 上の「背景」で述べた問題を解決するために,\LuaTeX-jaではもう一つの手法を導入する:
4928 新しいスタックレベルが生成されようとするとき,type, subtype, valueがそれぞれ
4929 44~(\textit{user\_defined}), 30112,そして現在のグループレベルであるwhatsitノード
4930 を現在のリストに付け加える(このノードを\textit{stack\_flag}とする).
4931 これにより,ある水平ボックスの中で代入がなされたかどうかを知ることが可能
4932 となる.スタックレベルを$s$,その水平ボックスグループの直後の\TeX のグループレベルを
4940 \item If there is no \textit{stack\_flag} node in the list of the hbox, then
4941 no assignment was occurred inside the hbox. Hence values of
4942 parameters at the end of the hbox are stored in the stack
4946 \item もしその水平ボックスのリストの中に\textit{stack\_flag}ノードがなければ,
4947 水平ボックスの中では代入は起こらなかったということになる.
4948 したがって,その水平ボックスの終わりにおけるパラメータの値はスタックレベル$s$に
4953 \item If there is a \textit{stack\_flag} node whose value is~$t+1$, then
4954 an assignment was occurred just inside the hbox group. Hence
4955 values of parameters at the end of the hbox are stored in the
4959 \item もし値が$t+1$の\textit{stack\_flag}ノードがあれば,その
4960 水平ボックスグループの中で代入が起こったことになる.
4961 したがって,水平ボックスの終わりにおけるパラメータの値はスタックレベル$s+1$に
4966 \item If there are \textit{stack\_flag} nodes but all of their values
4967 are more than~$t+1$, then an assignment was occurred in the box,
4968 but it is done is `more internal' group. Hence values of
4969 parameters at the end of the hbox are stored in the stack
4973 \item もし\textit{stack\_flag}ノードがあるがそれらの値が全て$t+1$より大きい
4974 場合,そのボックスの中で代入が起こったが,それは「より内部の」グループで
4975 起こったということになる.したがって,水平ボックスの終わりでのパラメータの
4976 値はスタックレベル$s$に格納されている.
4981 Note that to work this trick correctly, assignments to
4982 \verb+\ltj@@stack+ and \verb+\ltj@@group@level+ have to be local always,
4983 regardless the value of \verb+\globaldefs+.
4984 This problem is resolved by using
4985 \hbox{\verb+\directlua{tex.globaldefs=0}+} (this assignment is local).
4988 このトリックを正しく働かせるためには,\verb+\ltj@@stack+ と \verb+\ltj@@group@level+ への
4989 代入は \verb+\globaldefs+ の値によらず常にローカルでなければならないことに注意する.
4990 この問題は \hbox{\verb+\directlua{tex.globaldefs=0}+}(この代入は常にローカル)を
4994 %<en>\section{Linebreak after Japanese Character}
4995 %<ja>\section{和文文字直後の改行}
4996 %<zh>\section{日文字符后断行}
4998 %<en>\subsection{Reference: Behavior in \pTeX}
4999 %<ja>\subsection{参考:\pTeX の動作}
5000 %<zh>\subsection{参考: \pTeX 行为}
5002 In~\pTeX, a line break after a Japanese character doesn't emit a space,
5003 since words are not separated by spaces in Japanese writings. However,
5004 this feature isn't fully implemented in \LuaTeX-ja due to the
5005 specification of callbacks in~\LuaTeX. To clarify the difference between
5006 \pTeX~and~\LuaTeX, We briefly describe the handling of a line break in~\pTeX, in
5009 \pTeX's input processor can be described in terms of a finite state
5010 automaton, as that of~\TeX\ in~Section~2.5 of~\cite{texbytopic}. The
5011 internal states are as follows:
5013 \item State~$N$: new line
5014 \item State~$S$: skipping spaces
5015 \item State~$M$: middle of line
5016 \item State~$K$: after a Japanese character
5018 The first three states---$N$, $S$~and~$M$---are as same as \TeX's input
5019 processor. State~$K$ is similar to state~$M$, and is entered after
5020 Japanese characters. The diagram of state transitions are indicated in
5021 Figure~\ref{fig-ptexipro}. Note that \pTeX\ doesn't leave state~$K$
5022 after `beginning/ending of a group' characters.
5026 欧文では文章の改行は単語間でしか行わない.そのため,\TeX では,(文字の直後の)改行は
5027 空白文字と同じ扱いとして扱われる.一方,和文ではほとんどどこでも改行が可能なため,
5028 \pTeX では和文文字の直後の改行は単純に無視されるようになっている.
5030 このような動作は,\pTeX が\TeX からエンジンとして拡張されたことによって可能になったことである.
5031 \pTeX の入力処理部は,\TeX におけるそれと同じように,有限オートマトンとして記述することができ,
5035 \item State~$N$: 行の開始.
5036 \item State~$S$: 空白読み飛ばし.
5037 \item State~$M$: 行中.
5038 \item State~$K$: 行中(和文文字の後).
5040 また,状態遷移は,図\ref{fig-ptexipro}のようになっており,図中の数字は
5041 カテゴリーコードを表している.最初の3状態は\TeX の入力処理部と同じであり,
5042 図中から状態$K$と「$j$」と書かれた矢印を取り除けば,\TeX の入力処理部と同
5047 行が和文文字(とグループ境界文字)で終わっていれば,改行は無視される
5053 \let\sp\textvisiblespace\small
5054 \begin{minipage}{.6\textwidth}%
5056 \unitlength=6.5mm\sf\mathversion{bold}
5057 \begin{tikzpicture}[
5058 ->, auto, shorten >=1pt
5060 \node [shape=rectangle, font=\scriptsize] (init) at (2,7) {start};
5061 \node [shape=circle,draw, fill=blue!20] (newline) at (4,7) {$N$};
5062 \node [shape=circle,draw, fill=blue!20] (midline) at (4,4) {$M$};
5063 \node [shape=circle,draw, fill=blue!20] (skipspc) at (8,7) {$S$};
5064 \node [shape=circle,draw, fill=red!20] (kanji) at (8,4) {$K$};
5065 \node [shape=rectangle,draw, fill=green!20] (scanacs) at (6,8) {scan a c.s.};
5066 \node (endk) at (8,2.5) {} ;
5067 \node (endm) at (4,2.5) {} ;
5068 \node (ends) at (8,8.5) {} ;
5069 \node (endn) at (4,8.5) {} ;
5070 \begin{scope}[font=\scriptsize]
5071 \path (newline) edge [bend right] node [left]{G, O} (midline)
5072 (init) edge node {} (newline)
5073 (midline) edge [bend right=10] node {10} (skipspc)
5074 (skipspc) edge [bend right] node [left,right=10,above=7]{G, O} (midline)
5075 (skipspc) edge [loop right] node {10} (skipspc)
5076 (newline) edge [loop right] node {10} (newline)
5077 (scanacs) edge [bend left] node [left=3,below]{$(*)$} (skipspc)
5078 (scanacs) edge [bend right] node [right=30,above=20]{$(*)$} (midline)
5079 (midline) edge node {5\ [\sp]} (endm)
5080 (midline) edge [loop left] node {G, O} (midline)
5081 (skipspc) edge node [right] {5} (ends)
5082 (newline) edge node {5 [{\tt\char92par}]} (endn);
5084 \path (newline) edge [bend right] node [right=25,below=3]{J} (kanji)
5085 (midline) edge node [below]{J} (kanji)
5086 (kanji) edge [bend left] node {O} (midline)
5087 (kanji) edge node {10} (skipspc)
5088 (kanji) edge [loop right] node {G, J} (kanji)
5089 (skipspc) edge [bend left] node {J} (kanji)
5090 (kanji) edge node {5} (endk)
5097 \begin{minipage}{.4\textwidth}
5099 \item[\textsf{G}] Beginning of group (usually \verb+{+)\\
5100 and ending of group (usually \verb+}+).
5101 \item[\textsf{J}] Japanese characters.
5102 \item[\textsf{5}] \textit{end-of-line} (usually \verb+^^J+).
5103 \item[\textsf{10}] space (usually \sp).
5104 \item[\textsf{O}] other characters, whose category code is in $\{3,4,6,7,8,11,12,13\}$.
5105 \item[\textsf{[\sp]}, \textsf{[{\tt\char92par}]}]
5106 emits a space, or~\verb+\par+.
5110 \item We omitted about category codes
5111 9~(\textit{ignored}), 14~(\textit{comment})~and~15~(\textit{invalid})
5112 from the above diagram. We also ignored the input like `\verb+^^A+' or `\verb+^+\verb+^df+'.
5113 \item When a character whose category code is 0 (\textit{escape character}) is seen by \TeX,
5114 the input processor scans a control sequence (\textsf{scan a c.s.}).
5115 These paths are not shown in the above diagram.
5117 After that, the state is changed to State~$S$ (skipping blanks) in most cases, but
5118 to State~$M$ (middle of line) sometimes.
5120 %<en>\caption{State transitions of \pTeX's input processor.}
5121 %<ja>\caption{\pTeX の入力処理部の状態遷移.}
5122 \label{fig-ptexipro}
5126 %<en>\subsection{Behavior in \LuaTeX-ja}
5127 %<ja>\subsection{\LuaTeX-jaの動作}
5128 %<zh>\subsection{\LuaTeX-ja行为}
5130 States in the input processor of \LuaTeX\ is the same as that of \TeX,
5131 and they can't be customized by any callbacks. Hence, we can only use
5132 \verb+process_input_buffer+ and \verb+token_filter+ callbacks for to
5133 suppress a space by a line break which is after Japanese characters.
5135 However, \verb+token_filter+ callback cannot be used either, since a
5136 character in category code 5~(end-of-line) is converted into an space
5137 token \emph{in the input processor}. So we can use only the
5138 \verb+process_input_buffer+ callback. This means that suppressing a
5139 space must be done \emph{just before} an input line is read.
5141 Considering these situations, handling of an end-of-line in \LuaTeX-ja are as follows:
5143 A character U+FFFFF (its category code is set to 14~(comment) by
5144 \LuaTeX-ja) is appended to an input line, \emph{before \LuaTeX\ actually
5145 process it}, if and only if the following three conditions are satisfied:
5147 \item The category code of \verb+\endlinechar+%
5148 \footnote{Usually, it is $\langle${return}$\rangle$
5149 (whose character code is 13).} is 5~(end-of-line).
5150 \item The category code of U+FFFFF itself is 14~(comment).
5151 \item The input line matches the following `regular expression':
5153 (\text{any char})^*(\textbf{JAchar})
5154 \bigl(\{\text{catcode}=1\}\cup\{\text{catcode}=2\}\bigr)^*
5160 The following example shows the major difference from the behavior of \pTeX:
5162 \ltjsetparameter{autoxspacing=false}
5163 \ltjsetparameter{jacharrange={-6}}xあ
5164 y\ltjsetparameter{jacharrange={+6}}zあ
5168 \item There is no space between `x' and `y', since the line~2 ends with a \textbf{JAchar} `あ'
5169 (this `あ' considered as an \textbf{JAchar} at the ending of line~1).
5170 \item There is no space between `あ' (in the line~3) and `u', since the
5171 line~3 ends with an \textbf{ALchar}
5172 (the letter `あ' considered as an \textbf{ALchar} at the ending of line~2).
5177 \LuaTeX の入力処理部は\TeX のそれと全く同じであり,コールバックによりユーザが
5178 カスタマイズすることはできない.このため,改行抑制の目的でユーザが利用で
5179 きそうなコールバックとしては,\verb+process_input_buffer+や
5180 \verb+token_filter+に限られてしまう.しかし,\TeX の入力処理部をよく見る
5181 と,後者も役には経たないことが分かる:改行文字は,入力処理部によってトー
5182 クン化される時に,カテゴリーコード10の32番文字へと置き換えられてしまうた
5183 め,\verb+token_filter+で非標準なトークン読み出しを行おうとしても,空白文
5184 字由来のトークンと,改行文字由来のトークンは区別できないのだ.
5186 すると,我々のとれる道は,\verb+process_input_buffer+を用いて
5187 \LuaTeX の入力処理部に引き渡される前に入力文字列を編集するというものしかない.
5188 以上を踏まえ,\LuaTeX-jaにおける「和文文字直後の改行抑制」の処理は,次のようになっている:
5191 各入力行に対し,\textbf{その入力行が読まれる前の内部状態で}
5192 以下の3条件が満たされている場合,\LuaTeX-jaはU+FFFFF番の文字
5193 \footnote{この文字はコメント文字として扱われるように\LuaTeX-ja内部で設定をしている.}
5194 を末尾に追加する.よって,その場合に改行は空白とは見做されないこととなる.
5196 \item \verb+\endlinechar+の文字\footnote{普通は,改行文字(文字コード13番)である.}
5197 のカテゴリーコードが5~(end-of-line)である.
5198 \item U+FFFFFのカテゴリーコードが14~(comment)である.
5199 \item 入力行は次の「正規表現」にマッチしている:
5201 (\text{any char})^*(\textbf{JAchar})
5202 \bigl(\{\text{catcode}=1\}\cup\{\text{catcode}=2\}\bigr)^*
5207 この仕様は,前節で述べた\pTeX の仕様にできるだけ近づけたものとなっている.最初の条件は,
5208 \texttt{verbatim}系環境などの日本語対応マクロを書かなくてすませるためのものである.
5209 しかしながら,完全に同じ挙動が実現できたわけではない.
5210 差異は,次の例が示すように,和文文字の範囲を変更した行の改行において見られる:
5212 \ltjsetparameter{autoxspacing=false}
5213 \ltjsetparameter{jacharrange={-6}}xあ
5214 y\ltjsetparameter{jacharrange={+6}}zあ
5217 もし\pTeX とまったく同じ挙動を示すならば,出力は
5218 「\hbox{\ltjsetparameter{autoxspacing=false}x yzあu}」となるべきである.しかし,実際には
5221 \item 2行目は「あ」という和文文字で終わる(2行目を処理する前の時点では,
5222 「あ」は和文文字扱いである)ため,直後の改行文字は無視される.
5223 \item 3行目は「あ」という欧文文字で終わる(2行目を処理する前の時点では,
5224 「あ」は欧文文字扱いである)ため,直後の改行文字は空白に置き換わる.
5226 このため,トラブルを避けるために,和文文字の範囲を\verb+\ltjsetparameter+で編集した場合,
5227 その行はそこで改行するようにした方がいいだろう.
5231 %<en>\section{Insertion of JFM glues, \Param{kanjiskip} and \Param{xkanjiskip}}
5232 %<ja>\section{JFMグルーの挿入,\Param{kanjiskip}と\Param{xkanjiskip}}
5233 %<zh>\section{JFM的胶插入,\Param{kanjiskip}和\Param{xkanjiskip}}
5235 %<en>\subsection{Overview}
5236 %<ja>\subsection{概要}
5237 %<zh>\subsection{概要}
5239 \LuaTeX-jaにおける和文処理グルーの挿入方法は,\pTeX のそれとは全く異なる.
5240 \pTeX では次のような仕様であった:
5242 \item JFMグルーの挿入は,和文文字を表すトークンを元に水平リストに(文字を表す)<char\_node>を
5244 \item \Param{xkanjiskip}の挿入は,水平ボックスへのパッケージングや行分割前に行われる.
5245 \item \Param{kanjiskip}はノードとしては挿入されない.パッケージングや行分割の計算時に
5246 「和文文字を表す2つの<char\_node>の間には\Param{kanjiskip}がある」ものとみなされる.
5248 しかし,\LuaTeX-jaでは,水平ボックスへのパッケージングや行分割前に全ての
5249 \textbf{JAglue},即ちJFMグルー・\Param{xkanjiskip}・\Param{kanjiskip}の
5250 3種類を一度に挿入することになっている.これは,\LuaTeX において欧文の合字・
5251 カーニング処理がノードベースになったことに対応する変更である.
5253 \LuaTeX-jaにおける\textbf{JAglue}挿入処理では,次節で定義する
5254 「クラスタ」を単位にして行われる.大雑把にいうと,「クラスタ」は文字とそれに付随す
5255 るノード達(アクセント位置補正用のカーンや,イタリック補正)をまとめたもの
5256 であり,2つのクラスタの間には,ペナルティ,\verb+\vadjust+,whatsitなど,行組版
5260 %<en>\subsection{definition of a `cluster'}
5261 %<ja>\subsection{「クラスタ」の定義}
5262 %<zh>\subsection{“cluster”定义}
5264 \def\OA{$\text{\sf O}_{\text{\sf A}}$}
5265 \def\OB{$\text{\sf O}_{\text{\sf B}}$}
5268 A \emph{cluster} is a list of consecutive nodes in one of the following forms,
5269 with the \textit{id} of it:
5272 \textbf{クラスタ}は以下の形のうちのどれかひとつをとる連続的なノードのリストである:
5276 \item Nodes whose value of\ \verb+\ltj@icflag+ is in $[3,15)$. These
5277 nodes come from a hbox which is already packaged, by unpackaging
5279 The \textit{id} is \textit{id\_pbox}.
5282 \item その \verb+\ltj@icflag+ の値が$[3,15)$に入るノードのリスト.
5283 これらのノードはある既にパッケージングされた水平ボックスから \verb+\unhbox+ で
5285 その\textit{id}は\textit{id\_pbox}である.
5289 \item A inline math formula, including two \textit{math\_node}s at the boundary of it.
5290 The \textit{id} is \textit{id\_math}.
5293 \item インライン数式でその境界に2つの\textit{math\_node}を含むもの.
5294 その\textit{id}は\textit{id\_math}である.
5298 \item A \textit{glyph\_node}~$p$ with nodes which relate with it:
5301 \item \textit{glpyh\_node}~$p$とそれに関係するノード:
5305 \item A kern for the italic correction of~$p$.
5308 \item $p$のイタリック補正のためのカーン.
5312 \item An accent attached to $p$ by \verb+\accent+.
5315 \item \verb+\accent+ による$p$に付随したアクセント.
5320 \Node{kern}{$\mathit{subtype}=2$}\longrightarrow
5321 \left\{\begin{array}{c}
5322 \Node{glyph}{accent}\\\noalign{\medskip}
5323 \Node{hbox}{accent (shifted vert.)}
5324 \end{array}\right\}\longrightarrow
5325 \Node{kern}{$\mathit{subtype}=2$}}^{\text{(a)}}
5327 \Node{glyph}{$p$}\longrightarrow
5329 \Node{kern}{italic corr.}}^{\text{(b)}}
5333 The \textit{id} is \textit{id\_jglyph} or
5334 \textit{id\_glyph}, according to whether the \textit{glyph\_node}
5335 represents a Japanese character or not.
5338 \textit{id}は\textit{glyph\_node}が和文文字を表すかどうかによって
5339 \textit{id\_jglyph},もしくは\textit{id\_glyph}となる.
5343 \item An box-like node, that is, an hbox, a vbox, a rule (\verb+\vrule+) and an \textit{unset\_node}.
5344 The \textit{id} is \textit{id\_hlist} if the node is an
5345 hbox which is not shifted vertically, or \textit{id\_box\_like}
5349 \item ボックス様のノード,つまり水平ボックス,垂直ボックス,罫線 (\verb+\vrule+),
5350 そして\textit{unset\_node}.
5351 その\textit{id}は垂直に移動していない水平ボックスならば\textit{id\_hlist},
5352 そうでなければ\textit{id\_box\_like}となる.
5356 \item A glue, a kern whose subtype is not 2~(\textit{accent}), and a discretionary break.
5357 The \textit{id} is \textit{id\_glue}, \textit{id\_kern}
5358 and \textit{id\_disc}, respectively.
5361 \item グルー,subtypeが 2~(\textit{accent})ではないカーン,そして任意改行.
5362 その\textit{id}はそれぞれ\textit{id\_glue}, \textit{id\_kern},そして
5363 \textit{id\_disc}である.
5367 Let \textit{Np}, \textit{Nq} and \textit{Nr} denote a cluster.
5370 以下では\textit{Np}, \textit{Nq}, \textit{Nr}でクラスタを表す.
5374 \paragraph{\textit{id}の意味}
5375 $\mathit{Np}.\mathit{id}$の意味を述べるとともに,
5376 「先頭の文字」を表す\textit{glyph\_node}~$\mathit{Np}.\mathit{head}$と,
5377 「最後の文字」を表す\textit{glyph\_node}~$\mathit{Np}.\mathit{tail}$を次のように定義する.
5378 直感的に言うと,\textit{Np}は$\mathit{Np}.\mathit{head}$で始まり$\mathit{Np}.\mathit{tail}$で終わるような単語,
5379 と見做すことができる.これら$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$は
5380 説明用に準備した概念であって,実際のLuaコード中にそのように書かれているわけではないことに注意.
5383 \item[\textit{id\_jglyph}] 和文文字.\\
5384 $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$は,その和文文字を表している
5385 \textit{glyph\_node}そのものである.
5386 \item[\textit{id\_glyph}] 和文文字を表していない\textit{glyph\_node}~$p$.\\
5387 多くの場合,$p$は欧文文字を格納しているが,`ffi'などの合字によって作られた
5388 \textit{glyph\_node}である可能性もある.
5389 前者の場合,$\mathit{Np}.\mathit{head}$,~$\mathit{Np}.\mathit{tail} = p$である.
5392 \item $\mathit{Np}.\mathit{head}$は,
5393 合字の構成要素の先頭→(その\textit{glyph\_node}における)合字の構成要素の先頭→……
5394 と再帰的に検索していってたどり着いた\textit{glyph\_node}である.
5395 \item $\mathit{Np}.\mathit{last}$は,同様に末尾→末尾→と検索してたどり着いた\textit{glyph\_node}である.
5397 \item[\textit{id\_math}] インライン数式.\\
5398 便宜的に,$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$ともに
5399 「文字コード$-1$の欧文文字」とおく.
5400 \item[\textit{id\_hlist}] 縦方向にシフトされていない水平ボックス.\\
5401 この場合,$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$はそれぞれ$p$の内容を表すリストの,
5404 \item 状況によっては,\TeX ソースで言うと
5406 \hbox{\hbox{abc}...\hbox{\lower1pt\hbox{xyz}}}
5408 のように,$p$の内容が別の水平ボックスで開始・終了している可能性も十分あり得る.そのような場合,
5409 $\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$の算出は,\textbf{垂直方向にシフトされていない}水平ボックスの
5410 場合だけ内部を再帰的に探索する.例えば上の例では,$\mathit{Np}.\mathit{head}$は文字「a」を表すノードであり,
5411 一方$\mathit{Np}.\mathit{tail}$は垂直方向にシフトされた水平ボックス,\verb+\lower1pt\hbox{xyz}+に対応するノードである.
5412 \item また,先頭にアクセント付きの文字がきたり,末尾にイタリック補正用のカーンが
5413 来ることもあり得る.この場合は,クラスタの定義のところにもあったように,それらは無視して算出を行う.
5414 \item 最初・最後のノードが合字によって作られた\textit{glyph\_node}のときは,それぞれに対して\textit{id\_glyph}%
5415 と同様に再帰的に構成要素をたどっていく.
5417 \item[\textit{id\_pbox}] 「既に処理された」ノードのリストであり,これらのノードが二度処理を受けないために
5418 まとめて1つのクラスタとして取り扱うだけである.
5419 \textit{id\_hlist}と同じ方法で$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$を算出する,
5420 \item[\textit{id\_disc}] discretionary break (\verb+\discretionary{pre}{post}{nobreak}+).\\
5421 \textit{id\_hlist}と同じ方法で$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$を算出するが,
5422 第3引数の \texttt{nobreak}(行分割が行われない時の内容)を使う.言い換えれば,ここで行分割が発生した時の状況は
5424 \item[\textit{id\_box\_like}] \textit{id\_hlist}とならないboxや,rule.\\
5425 この場合は,$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$のデータは利用されないので,2つの算出は無意味である.
5426 敢えて明示するならば,$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$は共にnil値である.
5427 \item[他] 以上にない\textit{id}に対しても,$\mathit{Np}.\mathit{head}$, $\mathit{Np}.\mathit{tail}$の算出は無意味.
5430 \paragraph{クラスタの別の分類}
5431 さらに,JFMグルー挿入処理の実際の説明により便利なように,\textit{id}とは別のクラスタの分類を行っておく.
5432 挿入処理では2つの隣り合ったクラスタの間に
5433 空白等の実際の挿入を行うことは前に書いたが,ここでの説明では,問題にしているクラスタ\textit{Np}は「後ろ側」のクラスタである
5434 とする.「前側」のクラスタについては,以下の説明で\textit{head}が\textit{last}に置き換わることに注意すること.
5436 \item[和文A] リスト中に直接出現している和文文字.
5437 \textit{id}が\textit{id\_jglyph}であるか,\\
5438 \textit{id}が\textit{id\_pbox}であって$\mathit{Np}.\mathit{head}$が\textbf{JAchar}であるとき.
5440 \item[和文B] リスト中の水平ボックスの中身の先頭として出現した和文文字.和文Aとの違いは,これの前に
5441 JFMグルーの挿入が行われない(\Param{xkanjiskip},~\Param{kanjiskip}は入り得る)ことである.\\
5442 \textit{id}が\textit{id\_hlist}か\textit{id\_disc}であって$\mathit{Np}.\mathit{head}$が\textbf{JAchar}であるとき.
5444 \item[欧文] リスト中に直接/水平ボックスの中身として出現している欧文文字.次の3つの場合が該当:
5446 \item \textit{id}が\textit{id\_glyph}である.
5447 \item \textit{id}が\textit{id\_math}である.
5448 \item \textit{id}が\textit{id\_pbox}か\textit{id\_hlist}か\textit{id\_disc}であって,$\mathit{Np}.\mathit{head}$が\textbf{ALchar}.
5450 \item[箱] box,またはそれに類似するもの.次の2つが該当:
5452 \item \textit{id}が\textit{id\_pbox}か\textit{id\_hlist}か\textit{id\_disc}であって,$\mathit{Np}.\mathit{head}$が\textit{glyph\_node}でない.
5453 \item \textit{id}が\textit{id\_box\_like}である.
5458 \subsection{段落/水平ボックスの先頭や末尾}
5460 まず,段落/水平ボックスの一番最初にあるクラスタ\textit{Np}を探索する.
5461 水平ボックスの場合は何の問題もないが,段落の場合では以下のノード達を事前に読み飛ばしておく:
5463 \verb+\parindent+由来の水平ボックス ($\mathit{subtype}=3$),及び\textit{subtype}が44~(\textit{user\_defined})でない
5466 これは,\verb+\parindent+由来の水平ボックスがクラスタを構成しないようにするためである.
5468 次に,\textit{Np}の直前に空白$g$を必要なら挿入する:
5470 \item この処理が働くような\textit{Np}は\textsf{和文A}である.
5471 \item 問題のリストが字下げありの段落(\verb+\parindent+由来の水平ボックスあり)の場合は,
5472 この空白$g$は「文字コード\texttt{'parbdd'}の文字」と\textit{Np}の間に入るグルー/カーンである.
5473 \item そうでないとき(\verb+noindent+で開始された段落や水平ボックス)は,
5474 $g$は「文字コード\texttt{'boxbdd'}の文字」と\textit{Np}の間に入るグルー/カーンである.
5476 ただし,もし$g$がglueであった場合,この挿入によって\textit{Np}による行分割が新たに可能になるべきではない.
5477 そこで,以下の場合には,$g$の直前に\verb+\penalty10000+を挿入する:
5479 \item 問題にしているリストが段落であり,かつ
5480 \item \textit{Np}の前には予めペナルティがなく,$g$はglue.
5484 末尾の処理は,問題のリストが段落のものか水平ボックスのものかによって異なる.
5485 後者の場合は容易い:最後のクラスタを\textit{Nq}とおくと,\textit{Nq}と「文字コード\texttt{'boxbdd'}の文字」の間に入るグルー/カーンを,
5486 \textit{Nq}の直後に挿入するのみである.
5488 一方.前者(段落)の場合は,リストの末尾は常に\verb+\penalty10000+と,
5489 \verb+\parfillskip+由来のグルーが存在する.よって,最後のクラスタ\textit{Np}は
5490 この\verb+\parfillskip+由来のグルーとなり,実質的な中身の最後はその1つ前のクラスタ\textit{Nq}となる.
5492 \item まず\textit{Nq}の直後に(後に述べる)\textsf{line-end~[E]}によって定まる空白を挿入する.
5493 \item 次に,段落の最後の「通常の和文文字${}+{}$句点」が独立した行となるのを防ぐために,
5494 \Param{jcharwidowpenalty}の値の分だけ適切な場所のペナルティを増やす.
5496 ペナルティ量を増やす場所は,\textit{head}が\textbf{JAchar}であり,かつその文字の\Param{kcatcode}が偶数であるような
5497 最後のクラスタの直前にあるものたちである\footnote{大雑把に言えば,\Param{kcatcode}が奇数であるような\textbf{JAchar}
5498 を約物として考えていることになる.\Param{kcatcode}の最下位ビットはこの\Param{jcharwidowpenalty}用にのみ利用される.}.
5501 \subsection{概観と典型例:2つの「和文A」の場合}
5502 先に述べたように,2つの隣り合ったクラスタ,\textit{Nq}と\textit{Np}の間には,
5503 ペナルティ,\verb+\vadjust+,whatsitなど,行組版には関係しないものがある.模式的に表すと,
5505 \Node{cluster}{\textit{Nq}}\longrightarrow
5507 \Node{penalty}{$p$}\longrightarrow \cdots\longrightarrow \Node{whatsit}{}}^{(a)}
5508 \longrightarrow \Node{cluster}{\textit{Np}}
5510 のようになっている.間の(a)に相当する部分には,何のノードもない場合ももちろんあり得る.
5511 そうして,JFMグルー挿入後には,この2クラスタ間は次のようになる:
5513 \Node{cluster}{\textit{Nq}}\longrightarrow\Node{kern}{左空白}\longrightarrow
5515 \Node{penalty}{$p+x$}\longrightarrow \cdots\longrightarrow \Node{whatsit}{}}^{(a)}
5516 \longrightarrow \Node{glue or kern}{右空白}\longrightarrow \Node{cluster}{\textit{Np}}
5519 以後,\textbf{典型的な例として,クラスタ\textit{Nq}と\textit{Np}が共に\textsf{\textmd{和文A}}である場合を見ていこう,}
5522 \paragraph{「右空白」の算出}
5523 まず,「右空白」にあたる量を算出する.通常はこれが,隣り合った2つの和文文字間に入る空白量となる.
5525 \item[JFM由来{[M]}] JFMの文字クラス指定によって入る空白を以下によって求める.この段階で空白量が未定義(未指定)だった場合,
5526 デフォルト値\Param{kanjiskip}を採用することとなるので,次へ.
5528 \item もし両クラスタの間で\verb+\inhibitglue+が実行されていた場合(証としてwhatsitノードが自動挿入される),
5529 代わりに\Param{kanjiskip}が挿入されることとなる.次へ.
5530 \item \textit{Nq}と\textit{Np}が同じJFM・同じ\texttt{jfmvar}キー・同じサイズの和文フォントであったならば,
5531 共通に使っているJFM内で挿入される空白(グルーかカーン)が決まっているか調べる.
5532 \item 1.でも2.でもない場合は,\textit{Nq}と\textit{Np}が違うJFM/\texttt{jfmvar}/サイズである.
5535 \vcenter{\halign{\hfil$#:={}$&(\inhibitglue#\inhibitglue)\cr
5536 gb&\textit{Nq}と「文字コードが{\tt'diffmet'}の文字」との間に入るグルー/カーン\cr
5537 ga&「文字コードが{\tt'diffmet'}の文字」と\textit{Np}との間に入るグルー/カーン\cr
5540 として,左側由来・右側由来の空白(グルー/カーン)を(それぞれのJFMから)求める.
5541 $\mathit{ga}$と$\mathit{gb}$のどちらか片方が未定義であるならば,定義されている側の値をそのまま採用する.
5542 もし$\mathit{ga}$と$\mathit{gb}$が両方決まっているならば,両者の値を平均\footnote{\Param{differentjfm}パラメタの
5543 値によって,「大きい方」「小さい方」「合計」に変えることができる.}した値を採用する.
5548 \jfont\foo=psft:Ryumin-Light:jfm=ujis
5549 \jfont\bar=psft:GothicBBB-Medium:jfm=ujis
5550 \jfont\baz=psft:GothicBBB-Medium:jfm=ujis;jfmvar=piyo
5554 \overbrace{\Node{glyph}{{\tt\char92 foo}, `あ'}}^{p}
5555 \longrightarrow \overbrace{\Node{glyph}{{\tt\char92 bar}, `い'}}^{q}
5556 \longrightarrow \overbrace{\Node{glyph}{{\tt\char92 baz}, `う'}}^{r}
5558 という3ノードを考える(それぞれ単独でクラスタをなす).
5559 この場合,$p$と$q$の間は,実フォントが異なるにもかかわらず(2)の状況となる一方で,
5560 $q$と$r$の間は(実フォントが同じなのに)\texttt{jfmvar}キーの内容が異なるので(3)の状況となる.
5561 \item[\Param{kanjiskip}~{[K]}] 上の[M]において空白が定まらなかった場合,
5562 \Param{kanjiskip}の値を以下で定め,それを「右空白」として採用する.
5563 この段階においては,\verb+\inhibitglue+は効力を持たないため,
5564 結果として,2つの和文文字間には常に何らかのグルー/カーンが挿入されることとなる.
5566 \item 両クラスタ(厳密には$\mathit{Nq}.\mathit{tail}$,$\mathit{Np}.\mathit{head}$)の中身の文字コードに対する
5567 \Param{autospacing}パラメタが両方ともfalseだった場合は,長さ0のglueとする.
5568 \item ユーザ側から見た\Param{kanjiskip}パラメタの自然長が${\tt \char92 maxdimen}=(2^{30}-1)\,{\rm sp}$で
5569 なければ,\Param{kanjiskip}パラメタの値を持つglueを採用する.
5570 \item 2.でない場合は,\textit{Nq}, \textit{Np}で使われているJFMに指定されている\Param{kanjiskip}の値を用いる.
5571 どちらか片方のクラスタだけが和文文字(\textsf{和文A}・\textsf{和文B})のときは,そちらのクラスタで使われている
5572 JFM由来の値だけを用いる.もし両者で使われているJFMが異なった場合は,上の[M]~3.と同様の方法を用いて調整する.
5575 \paragraph{「左空白」の算出とそれに伴う補正}
5578 \item[line-end~{[E]}]
5579 \textit{Nq}と\textit{Np}の間で行分割が起きたときに,
5580 \textit{Nq}と行末の間に入る空白である.ぶら下げ組の組版などに用いられることを期待している.
5582 \item 既に算出した「右空白」がカーンである場合は,「左空白」は挿入されない.
5583 \item 「右空白」がglueか未定義(長さ0のglueとみなす)の場合は,「左空白」は
5584 \textit{Nq}と「文字コード\texttt{'lineend'}の文字」との間に入るカーンとして,JFMから決定される.
5585 \item 2.で決まった「左空白」の長さが0でなければ,その分だけ先ほど算出した「右空白」の自然長を引く.
5588 \paragraph{禁則用ペナルティの挿入}
5591 a:=(\text{\textit{Nq}{\footnotemark}の文字に対する\Param{postbreakpenalty}の値})
5592 +(\text{\textit{Np}{\footnotemark}の文字に対する\Param{prebreakpenalty}の値})
5594 とおく\footnotetext{厳密にはそれぞれ$\mathit{Nq}.\mathit{tail}$,$\mathit{Np}.\mathit{head}$.}.
5595 ペナルティは通常$[-10000,10000]$の整数値をとり,また$\pm 10000$は正負の無限大を意味することになっているが,この$a$の
5598 $a$は禁則処理用に\textit{Nq}と\textit{Np}の間に加えられるべきペナルティ量である.
5600 \item[P-normal~{[PN]}]
5601 \textit{Nq}と\textit{Np}の間の(a)部分にペナルティ(\textit{penalty\_node})があれば処理は簡単である:
5602 それらの各ノードにおいて,ペナルティ値を($\pm 10000$を無限大として扱いつつ)$a$だけ増加させればよい.
5603 また,$10000 + (-10000) = 0$としている.
5605 少々困るのは,(a)部分にペナルティが存在していない場合である.
5606 直感的に,補正すべき量$a$が0でないとき,その値をもつ\textit{penalty\_node}を作って
5607 「右空白」の(もし未定義なら\textit{Np}の)直前に挿入……
5608 ということになるが,実際には僅かにこれより複雑である.
5610 \item 「右空白」がカーンであるとき,
5611 それは「\textit{Nq}と\textit{Np}の間で改行は許されない」ことを意図している.そのため,
5612 この場合は$a\neq 0$であってもペナルティの挿入はしない.
5613 \item 「左空白」がカーンとしてきっちり定義されている時(このとき,「右空白」はカーンでない),
5614 この「左空白」の直後での行分割を許容しないといけないので,$a=0$であっても
5615 \textit{penalty\_node}を作って挿入する.
5616 \item 以上のどれでもないときは,$a\neq 0$ならば\textit{penalty\_node}を作って挿入する.
5620 \def\gkf#1#2#3{\sf$\displaystyle\vphantom{\Bigg(}%
5621 \frac{\hbox to 1\zw{#1}\hbox to 4.5\zw{\hss #2}}{\hbox{#3}}$}
5623 %<en>\caption{Summary of JFM glues.}
5624 %<ja>\caption{JFM グルーの概要.}
5625 %<zh>\caption{JFM胶总结。}
5629 \begin{tabular}{c|cccccc}
5631 {\bf\textit{Np}}↓&\sf 和文A&\sf 和文B&\sf 欧文&\sf 箱&\sf glue&\sf kern\\\midrule
5634 \gkf{---}{\OA →K}{PN}&
5635 \gkf{---}{\OA →X}{PN}&
5638 \gkf{---}{\OA}{PS}\\
5644 \gkf{E}{\OB →X}{PA}&
5646 \sf 箱&\gkf{E}{\OB}{PA}\\
5647 \sf glue&\gkf{E}{\OB}{PN}\\
5648 \sf kern&\gkf{E}{\OB}{PS}\\
5654 Here {\small\gkf{E}{M→K}{PN}} means that
5657 ここで {\small\gkf{E}{M→K}{PN}} は次の意味である:
5661 \item To determine the `right-space', \LuaTeX-ja first attempts by the method `\textsf{JFM-origin~[M]}'.
5662 If this attempt fails, \LuaTeX-ja use the method `\textsf{\Param{kanjiskip}~[K]}'.
5665 \item 「右空白」を決めるために,\LuaTeX-ja はまず「JFM由来{[M]}」の方法を試みる.
5666 これが失敗したら,\LuaTeX-ja は「\Param{kanjiskip}~{[K]}」の方法を試みる.
5670 \item The `left space' between \textit{Nq}~and~\textit{Np} is determined by the method `\textsf{line-end~[E]}'.
5673 \item \textit{Nq} と \textit{Np} の間の「左空白」は「\textsf{line-end~[E]}」の
5678 \item \LuaTeX-ja adopts the method `\textsf{P-normal~[PN]}' to adjust the penalty between two clusters for \emph{kinsoku shori}.
5681 \item \LuaTeX-jaは2つのクラスタの間の禁則処理用のペナルティを調節するために「\textsf{P-normal~[PN]}」の方法を採用する.
5688 本節の内容は表\ref{tab-jfmglue}にまとめてある.
5690 \paragraph{和文Aと欧文の間}
5691 \textit{Nq}が\textsf{和文A}で,\textit{Np}が\textsf{欧文}の場合,JFMグルー挿入処理は次のようにして行われる.
5693 \item 「右空白」については,まず以下に述べる\textsf{Boundary-B~[\OB]}により空白を決定しようと試みる.
5694 それが失敗した場合は,\textsf{\Param{xkanjiskip}~[X]}によって定める.
5695 \item 「左空白」については,既に述べた\textsf{line-end~[E]}をそのまま採用する.それに伴う「右空白」の補正も同じ.
5696 \item 禁則用ペナルティも,以前述べた\textsf{P-normal~[PN]}と同じである.
5699 \item[Boundary-B~{[\OB]}] 和文文字と「和文でないもの」との間に入る空白を以下によって求め,
5700 未定義でなければそれを「右空白」として採用する.
5701 \textsf{JFM-origin~[M]}の変種と考えて良い.
5702 これによって定まる空白の典型例は,和文の閉じ括弧と欧文文字の間に入る半角アキである.
5704 \item もし両クラスタの間で\verb+\inhibitglue+が実行されていた場合(証としてwhatsitノードが自動挿入される),次へ.
5706 \textit{Nq}と「文字コードが{\tt'jcharbdd'}の文字」との間に入るグルー/カーンとして定まる.
5708 \item[\Param{xkanjiskip}~{[X]}]
5709 この段階では,\textsf{\Param{kanjiskip}~[K]}のときと同じように,
5710 \Param{xkanjiskip}の値を以下で定め,それを「右空白」として採用する.
5711 この段階で\verb+\inhibitglue+は効力を持たないのも同じである.
5713 \item 以下のいずれかの場合は,\Param{xkanjiskip}の挿入は抑止される.しかし,実際には行分割を許容するために,長さ0のglueを採用する:
5715 \item 両クラスタにおいて,それらの中身の文字コードに対する\Param{autoxspacing}パラメタが共にfalseである.
5716 \item \textit{Nq}の中身の文字コードについて,「直後への\Param{xkanjiskip}の挿入」が禁止されている
5717 (つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメタが2以上).
5718 \item \textit{Np}の中身の文字コードについて,「直前への\Param{xkanjiskip}の挿入」が禁止されている
5719 (つまり,\Param{jaxspmode}~(or \Param{alxspmode})パラメタが偶数).
5721 \item ユーザ側から見た\Param{xkanjiskip}パラメタの自然長が${\tt \char92 maxdimen}=(2^{30}-1)\,{\rm sp}$で
5722 なければ,\Param{xkanjiskip}パラメタの値を持つglueを採用する.
5723 \item 2.でない場合は,\textit{Nq}, \textit{Np}(\textsf{和文A}/\textsf{和文B}なのは片方だけ)
5724 で使われているJFMに指定されている\Param{xkanjiskip}の値を用いる.
5728 \paragraph{欧文と和文Aの間}
5729 \textit{Nq}が\textsf{欧文}で,\textit{Np}が\textsf{和文A}の場合,JFMグルー挿入処理は上の場合とほぼ同じである.
5730 \textsf{和文A}のクラスタが逆になるので,\textsf{Boundary-A~[\OA]}の部分が変わるだけ.
5732 \item 「右空白」については,まず以下に述べる\textsf{Boundary-A~[\OA]}により空白を決定しようと試みる.
5733 それが失敗した場合は,\textsf{\Param{xkanjiskip}~[X]}によって定める.
5734 \item \textit{Nq}が和文でないので,「左空白」は算出されない.
5735 \item 禁則用ペナルティは,以前述べた\textsf{P-normal~[PN]}と同じである.
5738 \item[Boundary-A~{[\OA]}] 「和文でないもの」と和文文字との間に入る空白を以下によって求め,
5739 未定義でなければそれを「右空白」として採用する.
5740 \textsf{JFM-origin~[M]}の変種と考えて良い.
5741 これによって定まる空白の典型例は,欧文文字と和文の開き括弧との間に入る半角アキである.
5743 \item もし両クラスタの間で\verb+\inhibitglue+が実行されていた場合(証としてwhatsitノードが自動挿入される),次へ.
5745 「文字コードが{\tt'jcharbdd'}の文字」と\textit{Np}との間に入るグルー/カーンとして定まる.
5749 \paragraph{和文Aと箱・グルー・カーンの間}
5750 \textit{Nq}が\textsf{和文A}で,\textit{Np}が\textsf{箱}・グルー・カーンのいずれかであった場合,
5751 両者の間に挿入されるJFMグルーについては同じ処理である.しかし,そこでの行分割に対する仕様が異なるので,
5752 ペナルティの挿入処理は若干異なったものとなっている.
5755 \item 「右空白」については,既に述べた\textsf{Boundary-B~[\OB]}により空白を決定しようと試みる.
5756 それが失敗した場合は,「右空白」は挿入されない.
5757 \item 「左空白」については,既に述べた\textsf{line-end~[E]}の算出方法をそのまま採用する.それに伴う「右空白」の補正も同じ.
5758 \item 禁則用ペナルティの処理は,後ろのクラスタ\textit{Np}の種類によって異なる.
5759 なお,$\mathit{Np}.\mathit{head}$は無意味であるから,
5760 「$\mathit{Np}.\mathit{head}$に対する\Param{prebreakpenalty}の値」は0とみなされる.言い換えれば,
5762 a:=(\text{\textit{Nq}{\footnotemark}の文字に対する\Param{postbreakpenalty}の値}).
5765 \item[箱] \textit{Np}が\textsf{箱}であった場合は,両クラスタの間での行分割は
5766 (明示的に両クラスタの間に\verb+\penalty10000+があった場合を除き)いつも許容される.そのため,
5767 ペナルティ処理は,後に述べる\textsf{P-allow~[PA]}が\textsf{P-normal~[PN]}の代わりに用いられる.
5768 \item[グルー] \textit{Np}がグルーの場合,ペナルティ処理は\textsf{P-normal~[PN]}を用いる.
5769 \item[カーン] \textit{Np}がカーンであった場合は,両クラスタの間での行分割は
5770 (明示的に両クラスタの間にペナルティがあった場合を除き)許容されない.
5771 ペナルティ処理は,後に述べる\textsf{P-suppress~[PS]}を使う.
5773 これらの\textsf{P-normal~[PN]},\textsf{P-allow~[PA]},\textsf{P-suppress~[PS]}の違いは,
5774 \textit{Nq}と\textit{Np}の間(以前の図だと(a)の部分)にペナルティが存在しない場合にのみ存在する.
5778 \item[P-allow~{[PA]}]
5779 \textit{Nq}と\textit{Np}の間の(a)部分にペナルティがあれば,\textsf{P-normal~[PN]}と同様に,
5780 それらの各ノードにおいてペナルティ値を$a$だけ増加させる.
5782 (a)部分にペナルティが存在していない場合,
5783 \LuaTeX-ja は\textit{Nq}と\textit{Np}の間の行分割を可能にしようとする.
5784 そのために,以下の場合に$a$をもつ\textit{penalty\_node}を作って
5785 「右空白」の(もし未定義なら\textit{Np}の)直前に挿入する:
5787 \item 「右空白」がグルーでない(カーンか未定義)であるとき.
5788 \item 「左空白」がカーンとしてきっちり定義されている時.
5791 \item[P-suppress~{[PS]}]
5792 \textit{Nq}と\textit{Np}の間の(a)部分にペナルティがあれば,\textsf{P-normal~[PN]}と同様に,
5793 それらの各ノードにおいてペナルティ値を$a$だけ増加させる.
5795 (a)部分にペナルティが存在していない場合,
5796 \textit{Nq}と\textit{Np}の間の行分割は元々不可能のはずだったのであるが,
5797 \LuaTeX-ja はそれをわざわざ行分割可能にはしない.
5798 そのため,「右空白」がglueであれば,その直前に\verb+\penalty10000+を挿入する.
5801 なお,「右空白」はカーン,「左空白」は未定義の
5803 \overbrace{\Node{glyph}{`あ'}}^{\mathit{Nq}}\longrightarrow \overbrace{\Node{glue}{1\,pt}}^{\mathit{Np}}
5806 このとき,$a$,即ち「あ」の\Param{postbreakpenalty}がいかなる値であっても,
5809 \overbrace{\Node{glyph}{`あ'}}^{\mathit{Nq}}\longrightarrow
5810 \Node{kern}{右空白}\longrightarrow \overbrace{\Node{glue}{1\,pt}}^{\mathit{Np}}
5813 となり,$a$分のペナルティは挿入されないことに注意して欲しい.
5814 \Param{postbreakpenalty}は($a$は)殆どの場合が非負の値と考えられ,そのような場合では
5817 \overbrace{\Node{glyph}{`あ'}}^{\mathit{Nq}}\longrightarrow
5818 \Node{penalty}{$a$}\longrightarrow
5819 \Node{kern}{右空白}\longrightarrow \overbrace{\Node{glue}{1\,pt}}^{\mathit{Np}}
5822 \footnote{kern$\rightarrow$glueが1つの行分割可能点(行分割に伴うペナルティは0)
5823 であるため,たとえ$a=10000$であっても,\textit{Nq}と\textit{Np}の間で行分割を禁止することはできない.}.
5825 \paragraph{箱・グルー・カーンと和文Aの間}
5826 \textit{Np}が\textsf{箱}・グルー・カーンのいずれかで,\textit{Np}が\textsf{和文A}であった場合は,
5827 すぐ上の(\textit{Nq}と\textit{Np}の順序が逆になっている)場合とほぼ同じであるが,「左空白」がなくなることにのみ注意.
5829 \item 「右空白」については,既に述べた\textsf{Boundary-A~[\OA]}により空白を決定しようと試みる.
5830 それが失敗した場合は,「右空白」は挿入されない.
5831 \item \textit{Nq}が和文でないので,「左空白」は算出されない.
5832 \item 禁則用ペナルティの処理は,\textit{Nq}の種類によって異なる.
5833 $\mathit{Nq}.\mathit{tail}$は無意味なので,
5835 a:=(\text{\textit{Np}{\footnotemark}の文字に対する\Param{prebreakpenalty}の値}).
5838 \item[箱] \textit{Nq}が\textsf{箱}の場合は,\textsf{P-allow~[PA]}を用いる.
5839 \item[グルー] \textit{Nq}がグルーの場合は,\textsf{P-normal~[PN]}を用いる.
5840 \item[カーン] \textit{Nq}がカーンの場合は,\textsf{P-suppress~[PS]}を用いる.
5844 \paragraph{和文Aと和文Bの違い}
5845 先に述べたように,\textsf{和文B}は水平ボックスの中身の先頭(or 末尾)として出現している
5846 和文文字である.リスト内に直接ノードとして現れている和文文字(\textsf{和文A})との違いは,
5848 \item \textsf{和文B}に対しては,JFMの文字クラス指定から定まる空白
5849 \textsf{JFM-origin~[M]},\textsf{Boundary-A~[\OA]},\textsf{Boundary-B~[\OB]})の挿入は行われない.
5852 \item 片方が\textsf{和文A},もう片方が\textsf{和文B}のクラスタの場合,
5853 \textsf{Boundary-A~[\OA]}または\textsf{Boundary-B~[\OB]}の挿入を試み,それがダメなら
5854 \Param{kanjiskip}~\textsf{[K]}の挿入を行う.
5855 \item \textsf{和文B}の2つのクラスタの間には,\Param{kanjiskip}~\textsf{[K]}が自動的に入る.
5857 \item \textsf{和文B}と箱・グルー・カーンが隣接したとき(どちらが前かは関係ない),間にJFMグルー・ペナルティの挿入は一切しない.
5858 \item \textsf{和文B}と\textsf{和文B},また\textsf{和文B}と\textsf{欧文}とが隣接した時は,禁則用ペナルティ挿入処理は
5859 \textsf{P-suppress~[PS]}が用いられる.
5860 \item \textsf{和文B}の文字に対する\Param{prebreakpenalty},~\Param{postbreakpenalty}の値は使われず,0として計算される.
5871 \item 1行目の\verb+\inhibitglue+は\textsf{Boundary-B~[\OB]}の処理のみを抑止するので,ピリオドと「A」の間には
5872 \Param{xkanjiskip}(四分アキ)が入ることに注意.
5873 \item 2行目のピリオドと「A」の間においては,前者が\textsf{和文B}となる(水平ボックスの中身の末尾として登場しているから)ので,
5874 そもそも\textsf{Boundary-B~[\OB]}の処理は行われない.よって,\Param{xkanjiskip}が入ることとなる.
5875 \item 3行目では,ピリオドの属するクラスタは\textsf{和文A}である.これによって,
5876 ピリオドと「A」の間には\textsf{Boundary-B~[\OB]}由来の半角アキが入ることになる.
5881 \begin{thebibliography}{99}
5882 \addcontentsline{toc}{section}{\refname}
5883 \bibitem{texbytopic}
5884 Victor Eijkhout, \emph{\TeX\ by Topic, A \TeX nician's Reference}, Addison-Wesley, 1992.
5885 \end{thebibliography}
5889 \section{Package versions used in this document}
5890 This document was typeset using the following packages:
5894 {\makeatletter\tt\footnotesize
5896 \filename@parse{#1}\def\@temp{sty}
5897 \ifx\@temp\filename@ext
5900 \ifx\filename@ext\relax tex\else\filename@ext\fi}%
5901 \leavevmode\hskip-13em\hbox to 13em{\filename@area\reserved@a\hss}%
5902 \csname ver@\reserved@a\endcsname\par
5905 \parindent0pt\leftskip13em
5913 %% config file for showexpl.sty
5915 %% Copyright The LuaTeX-ja project team, 2005
5917 \ProvidesFile{showexpl.cfg}
5918 [2012/05/20 v0.01 Definitions for the showexpl package (luatexja)]