OSDN Git Service

ltj-inputbuf.lua: add a close paren.
[luatex-ja/luatexja.git] / src / ltjclasses.dtx
1 % \iffalse meta-comment
2 %% File: ltjclasses.dtx
3 %  -----------------------------------------
4 %  Original: jclasses.dtx
5 %
6 %  Copyright 1995-2001 ASCII Corporation.
7 %
8 %  This file is part of the pLaTeX2e system.
9 %  -----------------------------------------
10 %
11 % \fi
12 %
13 % \CheckSum{4509}
14 %% \CharacterTable
15 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
16 %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
17 %%   Digits        \0\1\2\3\4\5\6\7\8\9
18 %%   Exclamation   \!     Double quote  \"     Hash (number) \#
19 %%   Dollar        \$     Percent       \%     Ampersand     \&
20 %%   Acute accent  \'     Left paren    \(     Right paren   \)
21 %%   Asterisk      \*     Plus          \+     Comma         \,
22 %%   Minus         \-     Point         \.     Solidus       \/
23 %%   Colon         \:     Semicolon     \;     Less than     \<
24 %%   Equals        \=     Greater than  \>     Question mark \?
25 %%   Commercial at \@     Left bracket  \[     Backslash     \\
26 %%   Right bracket \]     Circumflex    \^     Underscore    \_
27 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
28 %%   Right brace   \}     Tilde         \~}
29 %%
30 %
31 % \setcounter{StandardModuleDepth}{1}
32 % \StopEventually{}
33 %
34 % \iffalse
35 % \changes{v1.0}{1995/04/19}{first edition}
36 % \changes{v1.0a}{1995/08/30}{ページスタイル部分の調整}
37 % \changes{v1.0b}{1995/11/08}{ページスタイル部分の調整}
38 % \changes{v1.0c}{1996/01/30}{\LaTeX\ \texttt{!<1995/12/01!>}での修正を反映}
39 % \changes{v1.0d}{1996/02/29}{デフォルトページスタイルの修正}
40 % \changes{v1.0e}{1996/03/14}{itemize, enumerate環境の修正}
41 % \changes{v1.0f}{1996/07/10}{面付けオプションを追加}
42 % \changes{v1.0g}{1996/09/03}{トンボの横に作成日時を出力するようにした}
43 % \changes{v1.1}{1997/01/16}{\LaTeX\ \texttt{!<1996/06/01!>}版に対応}
44 % \changes{v1.1a}{1997/01/23}{\LaTeX\ \texttt{!<1996/12/01!>}版に対応}
45 % \changes{v1.1a}{1997/01/25}{互換モードでp\LaTeX~2.09のa4jなどの
46 %      用紙オプションに対応}
47 % \changes{v1.1b}{1997/01/28}{日本語ファミリの宣言を再度、実装}
48 % \changes{v1.1d}{1997/01/29}{2eモードでa4jなどのオプションに対応}
49 % \changes{v1.1e}{1997/04/08}{トップマージンの値を修正}
50 % \changes{v1.1f}{1997/07/08}{縦組クラスでベースラインがおかしいのを修正}
51 % \changes{v1.1g}{1997/08/25}{片面印刷のとき、sectionレベルが出力されない
52 %      のを修正}
53 % \changes{v1.1h}{1997/09/03}{landscape指定時の値を修正}
54 % \changes{v1.1i}{1997/12/12}{report, bookクラスで片面印刷時に、
55 %      bothstyleスタイルにすると、コンパイルエラーになるのを修正}
56 % \changes{v1.1j}{1998/02/03}{互換モード時のa5pのトップマージンを0.7in増加}
57 % \changes{v1.1k}{1998/03/23}{reportとbookクラスで番号を付けない見出しの
58 %   ペナルティが\cs{M@}だったのを\cs{@M}に修正}
59 % \changes{v1.1m}{1998/04/07}{\cs{today}の計算手順を変更}
60 % \changes{v1.1n}{1998/10/13}{report,bookクラスの表番号が
61 %   見出しレベルに関係なくchapter番号が出力されてしまうのを修正}
62 % \changes{v1.1n}{1998/10/13}{mentukeオプションがエラーになっていたのを修正}
63 % \changes{v1.1o}{1998/12/24}{secnumdepthカウンタを$-1$以下にすると、
64 %   見出し文字列も消えてしまうのを修正}
65 % \changes{v1.1p}{1999/1/6}{\cs{oddsidemargin}のポイントへの変換を後ろに}
66 % \changes{v1.1q}{1999/05/18}{縦組時のみに設定するようにした}
67 % \changes{v1.1r}{1999/08/09}{トップマージンの計算式を修正}
68 % \changes{v1.2}{2001/09/04}{\cs{chapter}の出力位置がアスタリスク形式と
69 %   そうでないときと違うのを修正(ありがとう、鈴木@津さん)}
70 % \changes{v1.3}{2001/10/04}{目次のページ番号の書体を\cs{rmfamily}から
71 %   \cs{normalfont}に変更(ありがとう、鈴木た@MILNさん)}
72 % \changes{v1.4}{2002/04/09}{縦組スタイルで\cs{flushbottom}しないようにした}
73 % \changes{v1.5}{2004/01/15}{\cs{part},\cs{chapter}の\cs{@afterindentfalse}を
74 %   \cs{@afterindenttrue}に変更。
75 %   \cs{section},\cs{subsection},\cs{subsubsection}の前後空きの伸縮幅を修正。
76 %   (ありがとうございます、鈴木た@MILNさん)}
77 % \changes{v1.6}{2006/06/27}{フォントコマンドを修正。ありがとう、ymtさん。}
78 % \changes{v1.6-ltj}{2011/09/27}{jclasses.dtx v1.6 をベースにLua\LaTeX-ja用に修正。}
79 % \changes{v1.6-ltj-2}{2013/06/06}{luatexja.cfgに対応.}
80 % \changes{v1.6-ltj-3}{2014/06/08}{縦組クラスの時のgeometry.styに対応.}
81 % \changes{v1.6-ltj-4}{2014/06/30}{組方向の変更箇所を現行のLua\TeX-jaの仕様に合うように修正.}
82 % \changes{v1.6-ltj-5}{2014/07/02}{\cs{ifydir}, \cs{iftdir}を使わないように修正.}
83 % \changes{v1.6-ltj-6}{2014/07/28}{縦組クラスでlltjext.styを読み込むように修正.}
84 % \changes{v1.6-ltj-7}{2014/11/15}{縦組クラスとeveryshi.styとの相性が悪い問題を修正.}
85 % \changes{v1.6-ltj-8}{2014/11/22}{縦組時のgeometry.styへの対応を別ファイル(lltjp-geometry.sty)に分離.それに伴いv1.6-ltj-3での変更を削除.}
86 % \changes{v1.6-ltj-9}{2015/01/01}{縦組クラスの日付出力でエラーになることなどを修正.}
87 % \changes{v1.6-ltj-10}{2015/10/18}{Lua\TeX\ 0.81.0に伴うプリミティブ名の変更に対応.}
88 % \fi
89 %
90 % \iffalse
91 \NeedsTeXFormat{LaTeX2e}
92 %<*driver>
93 \ProvidesFile{ltjclasses.dtx}
94 %</driver>
95 %<*yoko>
96 %<article>\ProvidesClass{ltjarticle}
97 %<report>\ProvidesClass{ltjreport}
98 %<book>\ProvidesClass{ltjbook}
99 %<10pt&!bk>\ProvidesFile{ltjsize10.clo}
100 %<11pt&!bk>\ProvidesFile{ltjsize11.clo}
101 %<12pt&!bk>\ProvidesFile{ltjsize12.clo}
102 %<10pt&bk>\ProvidesFile{ltjbk10.clo}
103 %<11pt&bk>\ProvidesFile{ltjbk11.clo}
104 %<12pt&bk>\ProvidesFile{ltjbk12.clo}
105 %</yoko>
106 %<*tate>
107 %<article>\ProvidesClass{ltjtarticle}
108 %<report>\ProvidesClass{ltjtreport}
109 %<book>\ProvidesClass{ltjtbook}
110 %<10pt&!bk>\ProvidesFile{ltjtsize10.clo}
111 %<11pt&!bk>\ProvidesFile{ltjtsize11.clo}
112 %<12pt&!bk>\ProvidesFile{ltjtsize12.clo}
113 %<10pt&bk>\ProvidesFile{ltjtbk10.clo}
114 %<11pt&bk>\ProvidesFile{ltjtbk11.clo}
115 %<12pt&bk>\ProvidesFile{ltjtbk12.clo}
116 %</tate>
117   [2015/10/18 v1.6-ltj-10
118 %<article|report|book> Standard LuaLaTeX-ja class]
119 %<10pt|11pt|12pt>  Standard LuaLaTeX-ja file (size option)]
120 %<*driver>
121 ]
122 \documentclass{ltjltxdoc}
123 \GetFileInfo{ltjclasses.dtx}
124 \usepackage[ipaex,nfssonly]{luatexja-preset}
125 \usepackage[unicode]{hyperref}
126 \title{Lua\LaTeX-ja用\texttt{jclasses}互換クラス}
127 \author{Lua\TeX-jaプロジェクト}
128 \date{\filedate}
129 \begin{document}
130   \maketitle
131   \tableofcontents
132   \DocInput{\filename}
133 \end{document}
134 %</driver>
135 % \fi
136 %
137 % \section{はじめに}
138 % このファイルは、Lua\LaTeX-ja用の|jclasses|互換クラスファイルです。
139 % v1.6をベースに作成しています。
140 % \dst{}プログラムによって、横組用のクラスファイルと縦組用のクラスファイル
141 % を作成することができます。
142 %
143 % 次に\dst{}プログラムのためのオプションを示します。
144 %
145 % \DeleteShortVerb{\|}
146 % \begin{center}
147 % \begin{tabular}{l|l}
148 % \emph{オプション} & \emph{意味}\\\hline
149 % article & articleクラスを生成\\
150 % report  & reportクラスを生成\\
151 % book    & bookクラスを生成\\
152 % 10pt    & 10ptサイズの設定を生成\\
153 % 11pt    & 11ptサイズの設定を生成\\
154 % 12pt    & 12ptサイズの設定を生成\\
155 % bk      & bookクラス用のサイズの設定を生成\\
156 % tate    & 縦組用の設定を生成\\
157 % yoko    & 横組用の設定を生成\\
158 % \end{tabular}
159 % \end{center}
160 % \MakeShortVerb{\|}
161 %
162 % \subsection{\texttt{jclasses.dtx} からの主な変更点}
163 % 全ての変更点を知りたい場合は、|jclasses.dtx|と|ltjclasses.dtx|で|diff|を
164 % とって下さい。
165 % \begin{itemize}
166 % \item |disablejfam|オプションを無効化。もし
167 % \begin{quotation}
168 %   |! LaTeX Error: Too many math alphabets used in version ****.|
169 % \end{quotation}
170 % のエラーが起こった場合は、|lualatex-math|パッケージを読み込んでみて下さい。
171 % \item 出力PDFの用紙サイズが自動的に設定されるようにしてあります。
172 % %%%\item 縦組みクラスにおいて、|geometry|パッケージを読み込んだときに意図通りにならない問題に対応しました。%
173 % \end{itemize}
174 %
175 % \section{Lua\TeX-ja の読み込み}
176 % 最初に|luatexja|を読み込みます。
177 %    \begin{macrocode}
178 %<*article|report|book>
179 \RequirePackage{luatexja}
180 %    \end{macrocode}
181 %
182 % \section{オプションスイッチ}
183 % ここでは、後ほど使用するいくつかのコマンドやスイッチを定義しています。
184 %
185 % \begin{macro}{\c@@paper}
186 % 用紙サイズを示すために使います。
187 % A4, A5, B4, B5用紙はそれぞれ、1, 2, 3, 4として表されます。
188 %    \begin{macrocode}
189 \newcounter{@paper}
190 %    \end{macrocode}
191 % \end{macro}
192 %
193 % \begin{macro}{\if@landscape}
194 % 用紙を横向きにするかどうかのスイッチです。デフォルトは、縦向きです。
195 %    \begin{macrocode}
196 \newif\if@landscape \@landscapefalse
197 %    \end{macrocode}
198 % \end{macro}
199 %
200 % \begin{macro}{\@ptsize}
201 % 組版をするポイント数の一の位を保存するために使います。
202 % 0, 1, 2のいずれかです。
203 %    \begin{macrocode}
204 \newcommand{\@ptsize}{}
205 %    \end{macrocode}
206 % \end{macro}
207 %
208 % \begin{macro}{\if@restonecol}
209 % 二段組時に用いるテンポラリスイッチです。
210 %    \begin{macrocode}
211 \newif\if@restonecol
212 %    \end{macrocode}
213 % \end{macro}
214 %
215 % \begin{macro}{\if@titlepage}
216 % タイトルページやアブストラクト(概要)を
217 % 独立したページにするかどうかのスイッチです。
218 % reportとbookスタイルのデフォルトでは、独立したページになります。
219 %    \begin{macrocode}
220 \newif\if@titlepage
221 %<article>\@titlepagefalse
222 %<report|book>\@titlepagetrue
223 %    \end{macrocode}
224 % \end{macro}
225 %
226 % \begin{macro}{\if@openright}
227 % chapterレベルを奇数ページからはじめるかどうかのスイッチです。
228 % reportクラスのデフォルトは、``no''です。
229 % bookクラスのデフォルトは、``yes''です。
230 %    \begin{macrocode}
231 %<!article>\newif\if@openright
232 %    \end{macrocode}
233 % \end{macro}
234 %
235 % \changes{v1.0c}{1995/12/25}{Macro \cs{if@openbib} removed}
236 %
237 % \begin{macro}{\if@mainmatter}
238 % スイッチ|\@mainmatter|が真の場合、本文を処理しています。
239 % このスイッチが偽の場合は、|\chapter|コマンドは見出し番号を出力しません。
240 %    \begin{macrocode}
241 %<book>\newif\if@mainmatter \@mainmattertrue
242 %    \end{macrocode}
243 % \end{macro}
244 %
245 % \begin{macro}{\hour}
246 % \begin{macro}{\minute}
247 %    \begin{macrocode}
248 \hour\time \divide\hour by 60\relax
249 \@tempcnta\hour \multiply\@tempcnta 60\relax
250 \minute\time \advance\minute-\@tempcnta
251 %    \end{macrocode}
252 % \end{macro}
253 % \end{macro}
254 %
255 % \begin{macro}{\if@stysize}
256 % \changes{v1.1a}{1997/01/25}{Add \cs{if@stysize}.}
257 % \LaTeXe~2.09互換モードで、スタイルオプションにa4j, a5pなどが指定された
258 % ときの動作をエミュレートするためのフラグです。
259 %    \begin{macrocode}
260 \newif\if@stysize \@stysizefalse
261 %    \end{macrocode}
262 % \end{macro}
263 %
264 % \begin{macro}{\if@mathrmmc}
265 % 和欧文両対応の数式文字コマンドを有効にするときに用いるフラグです。
266 % マクロの展開順序が複雑になるのを避けるため、
267 % デフォルトではfalseとしてあります。
268 %    \begin{macrocode}
269 \newif\if@mathrmmc \@mathrmmcfalse
270 %    \end{macrocode}
271 % \end{macro}
272 %
273 % \section{オプションの宣言}
274 % ここでは、クラスオプションの宣言を行なっています。
275 %
276 % \subsection{用紙オプション}
277 % 用紙サイズを指定するオプションです。
278 %    \begin{macrocode}
279 \DeclareOption{a4paper}{\setcounter{@paper}{1}%
280   \setlength\paperheight {297mm}%
281   \setlength\paperwidth  {210mm}}
282 \DeclareOption{a5paper}{\setcounter{@paper}{2}%
283   \setlength\paperheight {210mm}
284   \setlength\paperwidth  {148mm}}
285 \DeclareOption{b4paper}{\setcounter{@paper}{3}%
286   \setlength\paperheight {364mm}
287   \setlength\paperwidth  {257mm}}
288 \DeclareOption{b5paper}{\setcounter{@paper}{4}%
289   \setlength\paperheight {257mm}
290   \setlength\paperwidth  {182mm}}
291 %    \end{macrocode}
292 % \changes{v1.0a}{1995/09/26}{Change b4paper width/height 352x250 to 364x257}
293 % \changes{v1.0a}{1995/09/26}{Change b5paper width/height 250x176 to 257x182}
294 % ドキュメントクラスに、以下のオプションを指定すると、通常よりもテキストを
295 % 組み立てる領域の広いスタイルとすることができます。
296 %    \begin{macrocode}
297 %
298 \DeclareOption{a4j}{\setcounter{@paper}{1}\@stysizetrue
299   \setlength\paperheight {297mm}%
300   \setlength\paperwidth  {210mm}}
301 \DeclareOption{a5j}{\setcounter{@paper}{2}\@stysizetrue
302   \setlength\paperheight {210mm}
303   \setlength\paperwidth  {148mm}}
304 \DeclareOption{b4j}{\setcounter{@paper}{3}\@stysizetrue
305   \setlength\paperheight {364mm}
306   \setlength\paperwidth  {257mm}}
307 \DeclareOption{b5j}{\setcounter{@paper}{4}\@stysizetrue
308   \setlength\paperheight {257mm}
309   \setlength\paperwidth  {182mm}}
310 %
311 \DeclareOption{a4p}{\setcounter{@paper}{1}\@stysizetrue
312   \setlength\paperheight {297mm}%
313   \setlength\paperwidth  {210mm}}
314 \DeclareOption{a5p}{\setcounter{@paper}{2}\@stysizetrue
315   \setlength\paperheight {210mm}
316   \setlength\paperwidth  {148mm}}
317 \DeclareOption{b4p}{\setcounter{@paper}{3}\@stysizetrue
318   \setlength\paperheight {364mm}
319   \setlength\paperwidth  {257mm}}
320 \DeclareOption{b5p}{\setcounter{@paper}{4}\@stysizetrue
321   \setlength\paperheight {257mm}
322   \setlength\paperwidth  {182mm}}
323 %    \end{macrocode}
324 %
325 % \subsection{サイズオプション}
326 % 基準となるフォントの大きさを指定するオプションです。
327 %    \begin{macrocode}
328 \if@compatibility
329   \renewcommand{\@ptsize}{0}
330 \else
331   \DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
332 \fi
333 \DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
334 \DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
335 %    \end{macrocode}
336 %
337 % \subsection{横置きオプション}
338 % このオプションが指定されると、用紙の縦と横の長さを入れ換えます。
339 % \changes{v1.1h}{1997/09/03}{オプションの処理時に縦横の値を交換}
340 % \changes{v1.1h}{1997/09/03}{landscapeオプションを互換モードでも有効に}
341 %    \begin{macrocode}
342 \DeclareOption{landscape}{\@landscapetrue
343   \setlength\@tempdima{\paperheight}%
344   \setlength\paperheight{\paperwidth}%
345   \setlength\paperwidth{\@tempdima}}
346 %    \end{macrocode}
347 %
348 % \subsection{トンボオプション}
349 % |tombow|オプションが指定されると、用紙サイズに合わせてトンボを出力します。
350 % このとき、トンボの脇にPDFを作成した日付が出力されます。
351 % 作成日付の出力を抑制するには、|tombow|ではなく、|tombo|と指定をします。
352 % \changes{v1.0g}{1996/09/03}{Add to \cs{@bannertoken}.}
353 % \changes{v1.1a}{1997/01/23}{日付出力オプション}
354 %    \begin{macrocode}
355 \DeclareOption{tombow}{%
356   \tombowtrue \tombowdatetrue
357   \setlength{\@tombowwidth}{.1\p@}%
358   \@bannertoken{%
359      \jobname\space:\space\number\year/\number\month/\number\day
360       (\number\hour:\number\minute)}
361   \maketombowbox}
362 \DeclareOption{tombo}{%
363   \tombowtrue \tombowdatefalse
364   \setlength{\@tombowwidth}{.1\p@}%
365   \maketombowbox}
366 %    \end{macrocode}
367 %
368 % \subsection{面付けオプション}
369 % このオプションが指定されると、トンボオプションを指定したときと同じ
370 % 位置に文章を出力します。作成したPDFをフィルムに面付け出力する場合など
371 % に指定をします。
372 % \changes{v1.0f}{1996/07/10}{面付けオプションを追加}
373 % \changes{v1.1n}{1998/10/13}
374 %     {動作していなかったのを修正。ありがとう、刀祢さん}
375 %    \begin{macrocode}
376 \DeclareOption{mentuke}{%
377   \tombowtrue \tombowdatefalse
378   \setlength{\@tombowwidth}{\z@}%
379   \maketombowbox}
380 %    \end{macrocode}
381 %
382 % \subsection{組方向オプション}
383 % このオプションが指定されると、縦組で組版をします。
384 % \changes{v1.0g}{1997/01/25}{Insert \cs{hbox}, to switch tate-mode.}
385 % \changes{v1.1d}{1997/02/05}{開始ページがおかしくなるのを修正}
386 % \changes{v1.1f}{1997/07/08}{縦組時にベースラインがおかしくなるのを修正}
387 %
388 % \changes{v1.6-ltj-4}{2014/06/30}{本文の組方向を \cs{AtBeginDocument} で
389 %   変更することができなくなったことに対応}
390 %    \begin{macrocode}
391 \DeclareOption{tate}{%
392   \tate\AtBeginDocument{\message{《縦組モード》}\adjustbaseline}%
393 }
394 %    \end{macrocode}
395 %
396 % 縦組クラスと|everyshi|パッケージの相性が悪い問題に対処します。
397 % この処理は、ZRさんの|pxeveryshi|パッケージと実質的に同じ内容です。
398 %    \begin{macrocode}
399 %<*tate>
400 \AtEndOfPackageFile{everyshi}{%
401   \def\@EveryShipout@Output{%
402     \setbox8\vbox{%
403       \yoko
404       \@EveryShipout@Hook
405       \@EveryShipout@AtNextHook
406       \global\setbox\luatexoutputbox=\box\luatexoutputbox
407     }%
408     \gdef\@EveryShipout@AtNextHook{}%
409     \@EveryShipout@Org@Shipout\box\luatexoutputbox
410   }}
411 %</tate>
412 %    \end{macrocode}
413 %
414 % \subsection{両面、片面オプション}
415 % twosideオプションが指定されると、両面印字出力に適した整形を行ないます。
416 %    \begin{macrocode}
417 \DeclareOption{oneside}{\@twosidefalse}
418 \DeclareOption{twoside}{\@twosidetrue}
419 %    \end{macrocode}
420 %
421 % \subsection{二段組オプション}
422 % 二段組にするかどうかのオプションです。
423 %    \begin{macrocode}
424 \DeclareOption{onecolumn}{\@twocolumnfalse}
425 \DeclareOption{twocolumn}{\@twocolumntrue}
426 %    \end{macrocode}
427 %
428 % \subsection{表題ページオプション}
429 % |@titlepage|が真の場合、表題を独立したページに出力します。
430 %    \begin{macrocode}
431 \DeclareOption{titlepage}{\@titlepagetrue}
432 \DeclareOption{notitlepage}{\@titlepagefalse}
433 %    \end{macrocode}
434 %
435 % \subsection{右左起こしオプション}
436 % chapterを右ページあるいは左ページから
437 % はじめるかどうかを指定するオプションです。
438 %    \begin{macrocode}
439 %<!article>\if@compatibility
440 %<book>\@openrighttrue
441 %<!article>\else
442 %<!article>\DeclareOption{openright}{\@openrighttrue}
443 %<!article>\DeclareOption{openany}{\@openrightfalse}
444 %<!article>\fi
445 %    \end{macrocode}
446 %
447 % \subsection{数式のオプション}
448 % \Lopt{leqno}を指定すると、数式番号を数式の左側に出力します。
449 % \Lopt{fleqn}を指定するとディスプレイ数式を左揃えで出力します。
450 %    \begin{macrocode}
451 \DeclareOption{leqno}{\input{leqno.clo}}
452 \DeclareOption{fleqn}{\input{fleqn.clo}}
453 %    \end{macrocode}
454 %
455 % \subsection{参考文献のオプション}
456 % 参考文献一覧を``オープンスタイル''の書式で出力します。
457 % これは各ブロックが改行で区切られ、|\bibindent|のインデントが付く書式です。
458 % \changes{v1.0c}{1995/12/25}{openbibオプションを再実装}
459 %    \begin{macrocode}
460 \DeclareOption{openbib}{%
461 %    \end{macrocode}
462 % 参考文献環境内の最初のいくつかのフックを満たします。
463 %    \begin{macrocode}
464   \AtEndOfPackage{%
465    \renewcommand\@openbib@code{%
466       \advance\leftmargin\bibindent
467       \itemindent -\bibindent
468       \listparindent \itemindent
469       \parsep \z@
470       }%
471 %    \end{macrocode}
472 % そして、|\newblock|を再定義します。
473 %    \begin{macrocode}
474    \renewcommand\newblock{\par}}}
475 %    \end{macrocode}
476 %
477 % \subsection{日本語ファミリ宣言の抑制、和欧文両対応の数式文字}
478 % p\TeX では数式ファミリの数が16個だったので日本語ファミリ宣言を抑制する
479 % |disablejfam|オプションが用意されていましたが、Lua\TeX ではOmega拡張が
480 % 取り込まれて数式ファミリは256個まで使用できるため、このオプションは必要ありません。
481 % ただし、\LaTeXe カーネルでは未だに数式ファミリの数は16個に制限されているので、
482 % 実際に使用可能な数式ファミリの数を増やすためには|lualatex-math|パッケージを
483 % 読み込む必要があることに注意が必要です。
484 %
485 % |mathrmmc|オプションは、
486 % |\mathrm|と|\mathbf|を和欧文両対応にするためのクラスオプションです。
487 % \changes{v1.1d}{1992/02/04}{disablejfamの判断を間違えてたのを修正}
488 %    \begin{macrocode}
489 \if@compatibility
490   \@mathrmmctrue
491 \else
492   \DeclareOption{disablejfam}{%
493     \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}}
494   \DeclareOption{mathrmmc}{\@mathrmmctrue}
495 \fi
496 %    \end{macrocode}
497 %
498 %
499 % \subsection{ドラフトオプション}
500 % |draft|オプションを指定すると、オーバフルボックスの起きた箇所に、
501 % 5ptの罫線が引かれます。
502 %    \begin{macrocode}
503 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
504 \DeclareOption{final}{\setlength\overfullrule{0pt}}
505 %</article|report|book>
506 %    \end{macrocode}
507 %
508 % \subsection{フォントメトリックの変更}
509
510 % Lua\LaTeX-jaの標準では、OTFパッケージ由来のメトリックが使われるようになっています。
511 % 本クラスでは、「p\TeX の組版と互換性をできるだけ持たせる」例を提示するため、
512 % \begin{itemize}
513 % \item メトリックを\texttt{min10.tfm}ベースの\texttt{jfm-min.lua}に変更。
514 % \item 明朝とゴシックは両方とも\texttt{jfm-min.lua}を用いるが、
515 %   和文処理用グルー挿入時には「違うメトリックを使用」として思わせる。
516 % \item p\TeX と同様に、「異なるメトリックの2つの和文文字」の間には、両者から定める
517 %   グルーを両方挿入する。
518 % \item calllbackを利用し、標準で用いる\texttt{jfm-min.lua}を、段落始めの括弧が全角二分下がりになるように内部で変更している。
519 %
520 % \end{itemize}
521 %
522 % |\ltj@stdmcfont|,~|\ltj@stdgtfont| による、デフォルトで使われ明朝・ゴシックのフォントの
523 % 設定に対応しました。この2つの命令の値はユーザが日々の利用でその都度指定するものではなく、
524 % 何らかの理由で非埋め込みフォントが正しく利用できない場合にのみ |luatexja.cfg| によって
525 % セットされるものです。
526 %
527 % \changes{v1.6-ltj-9}{2015/01/01}{サイズクラスのロード前にメトリックの変更を行わないと,
528 % \cs{Cht}等の値が反映されないのでこの場所に移動させました.}
529
530 %    \begin{macrocode}
531 %<*article|report|book>
532 \directlua{luatexbase.add_to_callback('luatexja.load_jfm',
533   function (ji, jn) ji.chars['parbdd'] = 0; return ji end,
534   'ltj.jclasses_load_jfm', 1)}
535 {\jfont\g=\ltj@stdmcfont:jfm=min } % loading jfm-min.lua
536 \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
537 \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.962216] \ltj@stdmcfont:jfm=min}{}
538 \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.962216] \ltj@stdgtfont:jfm=min;jfmvar=goth}{}
539 \ltjglobalsetparameter{differentjfm=both}
540 \directlua{luatexbase.remove_from_callback('luatexja.load_jfm', 'ltj.jclasses_load_jfm')}
541 %</article|report|book>
542 %    \end{macrocode}
543 %
544 % \subsection{オプションの実行}
545 % オプションの実行、およびサイズクラスのロードを行ないます。
546 %    \begin{macrocode}
547 %<*article|report|book>
548 %<*article>
549 %<tate>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,tate}
550 %<yoko>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final}
551 %</article>
552 %<*report>
553 %<tate>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany,tate}
554 %<yoko>\ExecuteOptions{a4paper,10pt,oneside,onecolumn,final,openany}
555 %</report>
556 %<*book>
557 %<tate>\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright,tate}
558 %<yoko>\ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright}
559 %</book>
560 \ProcessOptions\relax
561 %<book&tate>\input{ltjtbk1\@ptsize.clo}
562 %<!book&tate>\input{ltjtsize1\@ptsize.clo}
563 %<book&yoko>\input{ltjbk1\@ptsize.clo}
564 %<!book&yoko>\input{ltjsize1\@ptsize.clo}
565 %    \end{macrocode}
566 % 縦組用クラスファイルの場合は、ここで\file{plext.sty}も読み込みます。
567 % \changes{v1.0e}{1996/03/21}{\cs{usepackage} to \cs{RequirePackage}}
568 % \changes{v1.6-ltj-6}{2014/07/28}{Lua\TeX-jaでは,代わりに\file{lltjext.sty}を読み込みま
569 % す.これは\file{plext.sty}をLua\TeX-ja用に書きなおしたものです.}
570 %    \begin{macrocode}
571 %<tate>\RequirePackage{lltjext}
572 %</article|report|book>
573 %    \end{macrocode}
574 %
575 % \section{フォント}
576 %
577 % ここでは、\LaTeX{}のフォントサイズコマンドの定義をしています。
578 % フォントサイズコマンドの定義は、次のコマンドを用います。
579 %
580 % |\@setfontsize||\size|\meta{font-size}\meta{baselineskip}
581 %
582 % \begin{description}
583 % \item[\meta{font-size}] これから使用する、フォントの実際の大きさです。
584 % \item[\meta{baselineskip}] 選択されるフォントサイズ用の通常の
585 %    |\baselineskip|の値です(実際は、|\baselinestretch| * \meta{baselineskip}
586 %    の値です)。
587 % \end{description}
588 %
589 % 数値コマンドは、次のように\LaTeX{}カーネルで定義されています。
590 % \begin{center}
591 % \begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
592 %  \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\
593 %  \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\
594 %  \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\
595 %  ...
596 %  \end{tabular}
597 %  \end{center}
598 %
599 % \begin{macro}{\normalsize}
600 % \begin{macro}{\@normalsize}
601 % 基本サイズとするユーザレベルのコマンドは|\normalsize|です。
602 % \LaTeX{}の内部では|\@normalsize|を使用します。
603 %
604 % |\normalsize|マクロは、|\abovedisplayskip|と
605 % |\abovedisplayshortskip|、および|\belowdisplayshortskip|の値も設定をします。
606 % |\belowdisplayskip|は、つねに|\abovedisplayskip|と同値です。
607 %
608 % また、リスト環境のトップレベルのパラメータは、つねに|\@listI|で与えられます。
609 %    \begin{macrocode}
610 %<*10pt|11pt|12pt>
611 \renewcommand{\normalsize}{%
612 %<10pt&yoko>    \@setfontsize\normalsize\@xpt{15}%
613 %<11pt&yoko>    \@setfontsize\normalsize\@xipt{15.5}%
614 %<12pt&yoko>    \@setfontsize\normalsize\@xiipt{16.5}%
615 %<10pt&tate>    \@setfontsize\normalsize\@xpt{17}%
616 %<11pt&tate>    \@setfontsize\normalsize\@xipt{17}%
617 %<12pt&tate>    \@setfontsize\normalsize\@xiipt{18}%
618 %<*10pt>
619   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
620   \abovedisplayshortskip \z@ \@plus3\p@
621   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
622 %</10pt>
623 %<*11pt>
624   \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
625   \abovedisplayshortskip \z@ \@plus3\p@
626   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
627 %</11pt>
628 %<*12pt>
629   \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
630   \abovedisplayshortskip \z@ \@plus3\p@
631   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
632 %</12pt>
633    \belowdisplayskip \abovedisplayskip
634    \let\@listi\@listI}
635 %    \end{macrocode}
636 %
637 % ここで、ノーマルフォントを選択し、初期化をします。
638 % このとき、縦組モードならば、デフォルトのエンコードを変更します。
639 %    \begin{macrocode}
640 %<tate>\def\kanjiencodingdefault{JT3}%
641 %<tate>\kanjiencoding{\kanjiencodingdefault}%
642 \normalsize
643 %    \end{macrocode}
644 % \end{macro}
645 % \end{macro}
646 %
647 % \begin{macro}{\Cht}
648 % \begin{macro}{\Cdp}
649 % \begin{macro}{\Cwd}
650 % \begin{macro}{\Cvs}
651 % \begin{macro}{\Chs}
652 % 基準となる長さの設定をします。これらのパラメータは\file{lltjfont.sty}で定義
653 % されています。
654 %    \begin{macrocode}
655 \setbox0\hbox{\char"3000}% 全角スペース
656 \setlength\Cht{\ht0}
657 \setlength\Cdp{\dp0}
658 \setlength\Cwd{\wd0}
659 \setlength\Cvs{\baselineskip}
660 \setlength\Chs{\wd0}
661 %    \end{macrocode}
662 % \end{macro}
663 % \end{macro}
664 % \end{macro}
665 % \end{macro}
666 % \end{macro}
667 %
668 % \begin{macro}{\small}
669 % |\small|コマンドの定義は、|\normalsize|に似ています。
670 %    \begin{macrocode}
671 \newcommand{\small}{%
672 %<*10pt>
673   \@setfontsize\small\@ixpt{11}%
674   \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
675   \abovedisplayshortskip \z@ \@plus2\p@
676   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
677   \def\@listi{\leftmargin\leftmargini
678               \topsep 4\p@ \@plus2\p@ \@minus2\p@
679               \parsep 2\p@ \@plus\p@ \@minus\p@
680               \itemsep \parsep}%
681 %</10pt>
682 %<*11pt>
683   \@setfontsize\small\@xpt\@xiipt
684   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
685   \abovedisplayshortskip \z@ \@plus3\p@
686   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
687   \def\@listi{\leftmargin\leftmargini
688               \topsep 6\p@ \@plus2\p@ \@minus2\p@
689               \parsep 3\p@ \@plus2\p@ \@minus\p@
690               \itemsep \parsep}%
691 %</11pt>
692 %<*12pt>
693   \@setfontsize\small\@xipt{13.6}%
694   \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
695   \abovedisplayshortskip \z@ \@plus3\p@
696   \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
697   \def\@listi{\leftmargin\leftmargini
698               \topsep 9\p@ \@plus3\p@ \@minus5\p@
699               \parsep 4.5\p@ \@plus2\p@ \@minus\p@
700               \itemsep \parsep}%
701 %</12pt>
702   \belowdisplayskip \abovedisplayskip}
703 %    \end{macrocode}
704 % \end{macro}
705 %
706 % \begin{macro}{\footnotesize}
707 % |\footnotesize|コマンドの定義は、|\normalsize|に似ています。
708 %    \begin{macrocode}
709 \newcommand{\footnotesize}{%
710 %<*10pt>
711   \@setfontsize\footnotesize\@viiipt{9.5}%
712   \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
713   \abovedisplayshortskip \z@ \@plus\p@
714   \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
715   \def\@listi{\leftmargin\leftmargini
716               \topsep 3\p@ \@plus\p@ \@minus\p@
717               \parsep 2\p@ \@plus\p@ \@minus\p@
718               \itemsep \parsep}%
719 %</10pt>
720 %<*11pt>
721   \@setfontsize\footnotesize\@ixpt{11}%
722   \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
723   \abovedisplayshortskip \z@ \@plus\p@
724   \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
725   \def\@listi{\leftmargin\leftmargini
726               \topsep 4\p@ \@plus2\p@ \@minus2\p@
727               \parsep 2\p@ \@plus\p@ \@minus\p@
728               \itemsep \parsep}%
729 %</11pt>
730 %<*12pt>
731   \@setfontsize\footnotesize\@xpt\@xiipt
732   \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
733   \abovedisplayshortskip \z@ \@plus3\p@
734   \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
735   \def\@listi{\leftmargin\leftmargini
736               \topsep 6\p@ \@plus2\p@ \@minus2\p@
737               \parsep 3\p@ \@plus2\p@ \@minus\p@
738               \itemsep \parsep}%
739 %</12pt>
740   \belowdisplayskip \abovedisplayskip}
741 %    \end{macrocode}
742 % \end{macro}
743 %
744 % \begin{macro}{\scriptsize}
745 % \begin{macro}{\tiny}
746 % \begin{macro}{\large}
747 % \begin{macro}{\Large}
748 % \begin{macro}{\LARGE}
749 % \begin{macro}{\huge}
750 % \begin{macro}{\Huge}
751 % これらは先ほどのマクロよりも簡単です。これらはフォントサイズを変更する
752 % だけで、リスト環境とディスプレイ数式のパラメータは変更しません。
753 %    \begin{macrocode}
754 %<*10pt>
755 \newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
756 \newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
757 \newcommand{\large}{\@setfontsize\large\@xiipt{17}}
758 \newcommand{\Large}{\@setfontsize\Large\@xivpt{21}}
759 \newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}}
760 \newcommand{\huge}{\@setfontsize\huge\@xxpt{28}}
761 \newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}}
762 %</10pt>
763 %<*11pt>
764 \newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}}
765 \newcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt}
766 \newcommand{\large}{\@setfontsize\large\@xiipt{17}}
767 \newcommand{\Large}{\@setfontsize\Large\@xivpt{21}}
768 \newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{25}}
769 \newcommand{\huge}{\@setfontsize\huge\@xxpt{28}}
770 \newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{33}}
771 %</11pt>
772 %<*12pt>
773 \newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}}
774 \newcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt}
775 \newcommand{\large}{\@setfontsize\large\@xivpt{21}}
776 \newcommand{\Large}{\@setfontsize\Large\@xviipt{25}}
777 \newcommand{\LARGE}{\@setfontsize\LARGE\@xxpt{28}}
778 \newcommand{\huge}{\@setfontsize\huge\@xxvpt{33}}
779 \let\Huge=\huge
780 %</12pt>
781 %</10pt|11pt|12pt>
782 %    \end{macrocode}
783 % \end{macro}
784 % \end{macro}
785 % \end{macro}
786 % \end{macro}
787 % \end{macro}
788 % \end{macro}
789 % \end{macro}
790 %
791 %
792 %
793 % \section{レイアウト}
794 %
795 % \subsection{用紙サイズの決定}
796 %
797 % \begin{macro}{\columnsep}
798 % \begin{macro}{\columnseprule}
799 % |\columnsep|は、二段組のときの、左右(あるいは上下)の段間の幅です。
800 % このスペースの中央に|\columnseprule|の幅の罫線が引かれます。
801 % \changes{v1.0g}{1997/01/25}{\cs{columnsep}: 10pt to 3\cs{Cwd} or 2\cs{Cwd}.}
802 %    \begin{macrocode}
803 %<*article|report|book>
804 \if@stysize
805 %<tate>  \setlength\columnsep{3\Cwd}
806 %<yoko>  \setlength\columnsep{2\Cwd}
807 \else
808   \setlength\columnsep{10\p@}
809 \fi
810 \setlength\columnseprule{0\p@}
811 \setlength{\@tempdima}{\paperwidth}
812 \setlength{\@tempdimb}{\paperheight}
813 %    \end{macrocode}
814 % \end{macro}
815 % \end{macro}
816 %
817 % \begin{macro}{\pdfpagewidth}
818 % \begin{macro}{\pdfpageheight}
819 % 出力のPDFの用紙サイズをここで設定しておきます。
820 % |tombow|が真のときは2インチ足しておきます。
821 %
822 % [2015-10-18 LTJ] Lua\TeX\ 0.81.0ではプリミティブの名称変更がされたので,
823 % それに合わせておきます.
824 %
825 %    \begin{macrocode}
826 \iftombow
827   \advance \@tempdima 2in
828   \advance \@tempdimb 2in
829 \fi
830 \ifdefined\pdfpagewidth
831   \setlength{\pdfpagewidth}{\@tempdima}
832   \setlength{\pdfpageheight}{\@tempdimb}
833 \else
834   \setlength{\pagewidth}{\@tempdima}
835   \setlength{\pageheight}{\@tempdimb}
836 \fi
837 %    \end{macrocode}
838 % \end{macro}
839 % \end{macro}
840 %
841 % \subsection{段落の形}
842 %
843 % \begin{macro}{\lineskip}
844 % \begin{macro}{\normallineskip}
845 % これらの値は、行が近付き過ぎたときの\TeX の動作を制御します。
846 %    \begin{macrocode}
847 \setlength\lineskip{1\p@}
848 \setlength\normallineskip{1\p@}
849 %    \end{macrocode}
850 % \end{macro}
851 % \end{macro}
852 %
853 % \begin{macro}{\baselinestretch}
854 % これは、|\baselineskip|の倍率を示すために使います。
855 % デフォルトでは、\emph{何もしません}。このコマンドが``empty''でない場合、
856 % |\baselineskip|の指定の\texttt{plus}や\texttt{minus}部分は無視される
857 % ことに注意してください。
858 %    \begin{macrocode}
859 \renewcommand{\baselinestretch}{}
860 %    \end{macrocode}
861 % \end{macro}
862 %
863 % \begin{macro}{\parskip}
864 % \begin{macro}{\parindent}
865 % |\parskip|は段落間に挿入される、縦方向の追加スペースです。
866 % |\parindent|は段落の先頭の字下げ幅です。
867 %    \begin{macrocode}
868 \setlength\parskip{0\p@ \@plus \p@}
869 \setlength\parindent{1\Cwd}
870 %    \end{macrocode}
871 % \end{macro}
872 % \end{macro}
873 %
874 %  \begin{macro}{\smallskipamount}
875 %  \begin{macro}{\medskipamount}
876 %  \begin{macro}{\bigskipamount}
877 % これら3つのパラメータの値は、\LaTeX{}カーネルの中で設定されています。
878 % これらはおそらく、サイズオプションの指定によって変えるべきです。
879 % しかし、\LaTeX~2.09や\LaTeXe{}の以前のリリースの両方との互換性を保つために、
880 % これらはまだ同じ値としています。
881 %    \begin{macrocode}
882 %<*10pt|11pt|12pt>
883 \setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@}
884 \setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@}
885 \setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@}
886 %</10pt|11pt|12pt>
887 %    \end{macrocode}
888 %  \end{macro}
889 %  \end{macro}
890 %  \end{macro}
891 %
892 % \begin{macro}{\@lowpenalty}
893 % \begin{macro}{\@medpenalty}
894 % \begin{macro}{\@highpenalty}
895 % |\nopagebreak|と|\nolinebreak|コマンドは、これらのコマンドが置かれた場所に、
896 % ペナルティを起いて、分割を制御します。
897 % 置かれるペナルティは、コマンドの引数によって、
898 % |\@lowpenalty|, |\@medpenalty|, |\@highpenalty|のいずれかが使われます。
899 %    \begin{macrocode}
900 \@lowpenalty   51
901 \@medpenalty  151
902 \@highpenalty 301
903 %</article|report|book>
904 %    \end{macrocode}
905 % \end{macro}
906 % \end{macro}
907 % \end{macro}
908 %
909 % \subsection{ページレイアウト}
910 %
911 % \subsubsection{縦方向のスペース}
912 %
913 % \begin{macro}{\headheight}
914 % \begin{macro}{\headsep}
915 % \begin{macro}{\topskip}
916 % |\headheight|は、ヘッダが入るボックスの高さです。
917 % |\headsep|は、ヘッダの下端と本文領域との間の距離です。
918 % |\topskip|は、本文領域の上端と1行目のテキストのベースラインとの距離です。
919 %    \begin{macrocode}
920 %<*10pt|11pt|12pt>
921 \setlength\headheight{12\p@}
922 %<*tate>
923 \if@stysize
924   \ifnum\c@@paper=2 % A5
925     \setlength\headsep{6mm}
926   \else % A4, B4, B5 and other
927     \setlength\headsep{8mm}
928   \fi
929 \else
930     \setlength\headsep{8mm}
931 \fi
932 %</tate>
933 %<*yoko>
934 %<!bk>\setlength\headsep{25\p@}
935 %<10pt&bk>\setlength\headsep{.25in}
936 %<11pt&bk>\setlength\headsep{.275in}
937 %<12pt&bk>\setlength\headsep{.275in}
938 %</yoko>
939 \setlength\topskip{1\Cht}
940 %    \end{macrocode}
941 % \end{macro}
942 % \end{macro}
943 % \end{macro}
944 %
945 % \begin{macro}{\footskip}
946 % |\footskip|は、本文領域の下端とフッタの下端との距離です。
947 % フッタのボックスの高さを示す、|\footheight|は削除されました。
948 %    \begin{macrocode}
949 %<tate>\setlength\footskip{14mm}
950 %<*yoko>
951 %<!bk>\setlength\footskip{30\p@}
952 %<10pt&bk>\setlength\footskip{.35in}
953 %<11pt&bk>\setlength\footskip{.38in}
954 %<12pt&bk>\setlength\footskip{30\p@}
955 %</yoko>
956 %    \end{macrocode}
957 % \end{macro}
958 %
959 % \begin{macro}{\maxdepth}
960 % \changes{v1.1c}{1995/12/25}{\cs{@maxdepth}の設定を除外した}
961 % \TeX のプリミティブレジスタ|\maxdepth|は、|\topskip|と同じような
962 % 働きをします。|\@maxdepth|レジスタは、つねに|\maxdepth|のコピーでなくては
963 % いけません。これは|\begin{document}|の内部で設定されます。
964 % \TeX{}と\LaTeX~2.09では、|\maxdepth|は\texttt{4pt}に固定です。
965 % \LaTeXe{}では、|\maxdepth|$+$|\topskip|を基本サイズの1.5倍にしたいので、
966 % |\maxdepth|を|\topskip|の半分の値で設定します。
967 %    \begin{macrocode}
968 \if@compatibility
969   \setlength\maxdepth{4\p@}
970 \else
971   \setlength\maxdepth{.5\topskip}
972 \fi
973 %    \end{macrocode}
974 % \end{macro}
975 %
976 % \subsubsection{本文領域}
977 % |\textheight|と|\textwidth|は、本文領域の通常の高さと幅を示します。
978 % 縦組でも横組でも、``高さ''は行数を、``幅''は字詰めを意味します。
979 % 後ほど、これらの長さに|\topskip|の値が加えられます。
980 %
981 % \begin{macro}{\textwidth}
982 % 基本組の字詰めです。
983 %
984 % 互換モードの場合:
985 %    \begin{macrocode}
986 \if@compatibility
987 %    \end{macrocode}
988 % \changes{v1.1a}{1997/01/25}{Add paper option with compatibility mode.}
989 % \changes{v1.1h}{1997/09/03}{landscapeでの指定を追加}
990 % 互換モード:|a4j|や|b5j|のクラスオプションが指定された場合の設定:
991 %    \begin{macrocode}
992   \if@stysize
993     \ifnum\c@@paper=2 % A5
994       \if@landscape
995 %<10pt&yoko>        \setlength\textwidth{47\Cwd}
996 %<11pt&yoko>        \setlength\textwidth{42\Cwd}
997 %<12pt&yoko>        \setlength\textwidth{40\Cwd}
998 %<10pt&tate>        \setlength\textwidth{27\Cwd}
999 %<11pt&tate>        \setlength\textwidth{25\Cwd}
1000 %<12pt&tate>        \setlength\textwidth{23\Cwd}
1001       \else
1002 %<10pt&yoko>        \setlength\textwidth{28\Cwd}
1003 %<11pt&yoko>        \setlength\textwidth{25\Cwd}
1004 %<12pt&yoko>        \setlength\textwidth{24\Cwd}
1005 %<10pt&tate>        \setlength\textwidth{46\Cwd}
1006 %<11pt&tate>        \setlength\textwidth{42\Cwd}
1007 %<12pt&tate>        \setlength\textwidth{38\Cwd}
1008       \fi
1009     \else\ifnum\c@@paper=3 % B4
1010       \if@landscape
1011 %<10pt&yoko>        \setlength\textwidth{75\Cwd}
1012 %<11pt&yoko>        \setlength\textwidth{69\Cwd}
1013 %<12pt&yoko>        \setlength\textwidth{63\Cwd}
1014 %<10pt&tate>        \setlength\textwidth{53\Cwd}
1015 %<11pt&tate>        \setlength\textwidth{49\Cwd}
1016 %<12pt&tate>        \setlength\textwidth{44\Cwd}
1017       \else
1018 %<10pt&yoko>        \setlength\textwidth{60\Cwd}
1019 %<11pt&yoko>        \setlength\textwidth{55\Cwd}
1020 %<12pt&yoko>        \setlength\textwidth{50\Cwd}
1021 %<10pt&tate>        \setlength\textwidth{85\Cwd}
1022 %<11pt&tate>        \setlength\textwidth{76\Cwd}
1023 %<12pt&tate>        \setlength\textwidth{69\Cwd}
1024       \fi
1025     \else\ifnum\c@@paper=4 % B5
1026       \if@landscape
1027 %<10pt&yoko>        \setlength\textwidth{60\Cwd}
1028 %<11pt&yoko>        \setlength\textwidth{55\Cwd}
1029 %<12pt&yoko>        \setlength\textwidth{50\Cwd}
1030 %<10pt&tate>        \setlength\textwidth{34\Cwd}
1031 %<11pt&tate>        \setlength\textwidth{31\Cwd}
1032 %<12pt&tate>        \setlength\textwidth{28\Cwd}
1033       \else
1034 %<10pt&yoko>        \setlength\textwidth{37\Cwd}
1035 %<11pt&yoko>        \setlength\textwidth{34\Cwd}
1036 %<12pt&yoko>        \setlength\textwidth{31\Cwd}
1037 %<10pt&tate>        \setlength\textwidth{55\Cwd}
1038 %<11pt&tate>        \setlength\textwidth{51\Cwd}
1039 %<12pt&tate>        \setlength\textwidth{47\Cwd}
1040       \fi
1041     \else % A4 ant other
1042       \if@landscape
1043 %<10pt&yoko>        \setlength\textwidth{73\Cwd}
1044 %<11pt&yoko>        \setlength\textwidth{68\Cwd}
1045 %<12pt&yoko>        \setlength\textwidth{61\Cwd}
1046 %<10pt&tate>        \setlength\textwidth{41\Cwd}
1047 %<11pt&tate>        \setlength\textwidth{38\Cwd}
1048 %<12pt&tate>        \setlength\textwidth{35\Cwd}
1049       \else
1050 %<10pt&yoko>        \setlength\textwidth{47\Cwd}
1051 %<11pt&yoko>        \setlength\textwidth{43\Cwd}
1052 %<12pt&yoko>        \setlength\textwidth{40\Cwd}
1053 %<10pt&tate>        \setlength\textwidth{67\Cwd}
1054 %<11pt&tate>        \setlength\textwidth{61\Cwd}
1055 %<12pt&tate>        \setlength\textwidth{57\Cwd}
1056       \fi
1057     \fi\fi\fi
1058   \else
1059 %    \end{macrocode}
1060 % 互換モード:デフォルト設定
1061 %    \begin{macrocode}
1062     \if@twocolumn
1063       \setlength\textwidth{52\Cwd}
1064     \else
1065 %<10pt&!bk&yoko>      \setlength\textwidth{327\p@}
1066 %<11pt&!bk&yoko>      \setlength\textwidth{342\p@}
1067 %<12pt&!bk&yoko>      \setlength\textwidth{372\p@}
1068 %<10pt&bk&yoko>      \setlength\textwidth{4.3in}
1069 %<11pt&bk&yoko>      \setlength\textwidth{4.8in}
1070 %<12pt&bk&yoko>      \setlength\textwidth{4.8in}
1071 %<10pt&tate>      \setlength\textwidth{67\Cwd}
1072 %<11pt&tate>      \setlength\textwidth{61\Cwd}
1073 %<12pt&tate>      \setlength\textwidth{57\Cwd}
1074     \fi
1075   \fi
1076 %    \end{macrocode}
1077 % 2eモードの場合:
1078 %    \begin{macrocode}
1079 \else
1080 %    \end{macrocode}
1081 % 2eモード:|a4j|や|b5j|のクラスオプションが指定された場合の設定:
1082 % 二段組では用紙サイズの8割、一段組では用紙サイズの7割を版面の幅として
1083 % 設定します。
1084 %    \begin{macrocode}
1085   \if@stysize
1086     \if@twocolumn
1087 %<yoko>      \setlength\textwidth{.8\paperwidth}
1088 %<tate>      \setlength\textwidth{.8\paperheight}
1089     \else
1090 %<yoko>      \setlength\textwidth{.7\paperwidth}
1091 %<tate>      \setlength\textwidth{.7\paperheight}
1092     \fi
1093   \else
1094 %    \end{macrocode}
1095 % 2eモード:デフォルト設定
1096 %    \begin{macrocode}
1097 %<tate>    \setlength\@tempdima{\paperheight}
1098 %<yoko>    \setlength\@tempdima{\paperwidth}
1099     \addtolength\@tempdima{-2in}
1100 %<tate>    \addtolength\@tempdima{-1.3in}
1101 %<yoko&10pt>    \setlength\@tempdimb{327\p@}
1102 %<yoko&11pt>    \setlength\@tempdimb{342\p@}
1103 %<yoko&12pt>    \setlength\@tempdimb{372\p@}
1104 %<tate&10pt>    \setlength\@tempdimb{67\Cwd}
1105 %<tate&11pt>    \setlength\@tempdimb{61\Cwd}
1106 %<tate&12pt>    \setlength\@tempdimb{57\Cwd}
1107     \if@twocolumn
1108       \ifdim\@tempdima>2\@tempdimb\relax
1109         \setlength\textwidth{2\@tempdimb}
1110       \else
1111         \setlength\textwidth{\@tempdima}
1112       \fi
1113     \else
1114       \ifdim\@tempdima>\@tempdimb\relax
1115         \setlength\textwidth{\@tempdimb}
1116       \else
1117         \setlength\textwidth{\@tempdima}
1118       \fi
1119     \fi
1120   \fi
1121 \fi
1122 \@settopoint\textwidth
1123 %    \end{macrocode}
1124 % \end{macro}
1125 %
1126 % \begin{macro}{\textheight}
1127 % 基本組の行数です。
1128 %
1129 % 互換モードの場合:
1130 %    \begin{macrocode}
1131 \if@compatibility
1132 %    \end{macrocode}
1133 % \changes{v1.1a}{1997/01/25}{Add paper option with compatibility mode.}
1134 % \changes{v1.1f}{1997/09/03}{landscapeでの指定を追加}
1135 % 互換モード:|a4j|や|b5j|のクラスオプションが指定された場合の設定:
1136 %    \begin{macrocode}
1137   \if@stysize
1138     \ifnum\c@@paper=2 % A5
1139       \if@landscape
1140 %<10pt&yoko>        \setlength\textheight{17\Cvs}
1141 %<11pt&yoko>        \setlength\textheight{17\Cvs}
1142 %<12pt&yoko>        \setlength\textheight{16\Cvs}
1143 %<10pt&tate>        \setlength\textheight{26\Cvs}
1144 %<11pt&tate>        \setlength\textheight{26\Cvs}
1145 %<12pt&tate>        \setlength\textheight{25\Cvs}
1146       \else
1147 %<10pt&yoko>        \setlength\textheight{28\Cvs}
1148 %<11pt&yoko>        \setlength\textheight{25\Cvs}
1149 %<12pt&yoko>        \setlength\textheight{24\Cvs}
1150 %<10pt&tate>        \setlength\textheight{16\Cvs}
1151 %<11pt&tate>        \setlength\textheight{16\Cvs}
1152 %<12pt&tate>        \setlength\textheight{15\Cvs}
1153       \fi
1154     \else\ifnum\c@@paper=3 % B4
1155       \if@landscape
1156 %<10pt&yoko>        \setlength\textheight{38\Cvs}
1157 %<11pt&yoko>        \setlength\textheight{36\Cvs}
1158 %<12pt&yoko>        \setlength\textheight{34\Cvs}
1159 %<10pt&tate>        \setlength\textheight{48\Cvs}
1160 %<11pt&tate>        \setlength\textheight{48\Cvs}
1161 %<12pt&tate>        \setlength\textheight{45\Cvs}
1162       \else
1163 %<10pt&yoko>        \setlength\textheight{57\Cvs}
1164 %<11pt&yoko>        \setlength\textheight{55\Cvs}
1165 %<12pt&yoko>        \setlength\textheight{52\Cvs}
1166 %<10pt&tate>        \setlength\textheight{33\Cvs}
1167 %<11pt&tate>        \setlength\textheight{33\Cvs}
1168 %<12pt&tate>        \setlength\textheight{31\Cvs}
1169       \fi
1170     \else\ifnum\c@@paper=4 % B5
1171       \if@landscape
1172 %<10pt&yoko>        \setlength\textheight{22\Cvs}
1173 %<11pt&yoko>        \setlength\textheight{21\Cvs}
1174 %<12pt&yoko>        \setlength\textheight{20\Cvs}
1175 %<10pt&tate>        \setlength\textheight{34\Cvs}
1176 %<11pt&tate>        \setlength\textheight{34\Cvs}
1177 %<12pt&tate>        \setlength\textheight{32\Cvs}
1178       \else
1179 %<10pt&yoko>        \setlength\textheight{35\Cvs}
1180 %<11pt&yoko>        \setlength\textheight{34\Cvs}
1181 %<12pt&yoko>        \setlength\textheight{32\Cvs}
1182 %<10pt&tate>        \setlength\textheight{21\Cvs}
1183 %<11pt&tate>        \setlength\textheight{21\Cvs}
1184 %<12pt&tate>        \setlength\textheight{20\Cvs}
1185       \fi
1186     \else % A4 and other
1187       \if@landscape
1188 %<10pt&yoko>        \setlength\textheight{27\Cvs}
1189 %<11pt&yoko>        \setlength\textheight{26\Cvs}
1190 %<12pt&yoko>        \setlength\textheight{25\Cvs}
1191 %<10pt&tate>        \setlength\textheight{41\Cvs}
1192 %<11pt&tate>        \setlength\textheight{41\Cvs}
1193 %<12pt&tate>        \setlength\textheight{38\Cvs}
1194       \else
1195 %<10pt&yoko>        \setlength\textheight{43\Cvs}
1196 %<11pt&yoko>        \setlength\textheight{42\Cvs}
1197 %<12pt&yoko>        \setlength\textheight{39\Cvs}
1198 %<10pt&tate>        \setlength\textheight{26\Cvs}
1199 %<11pt&tate>        \setlength\textheight{26\Cvs}
1200 %<12pt&tate>        \setlength\textheight{22\Cvs}
1201       \fi
1202     \fi\fi\fi
1203 %<yoko>    \addtolength\textheight{\topskip}
1204 %<bk&yoko>    \addtolength\textheight{\baselineskip}
1205 %<tate>    \addtolength\textheight{\Cht}
1206 %<tate>    \addtolength\textheight{\Cdp}
1207 %    \end{macrocode}
1208 % 互換モード:デフォルト設定
1209 %    \begin{macrocode}
1210   \else
1211 %<10pt&!bk&yoko>  \setlength\textheight{578\p@}
1212 %<10pt&bk&yoko>  \setlength\textheight{554\p@}
1213 %<11pt&yoko>  \setlength\textheight{580.4\p@}
1214 %<12pt&yoko>  \setlength\textheight{586.5\p@}
1215 %<10pt&tate>  \setlength\textheight{26\Cvs}
1216 %<11pt&tate>  \setlength\textheight{25\Cvs}
1217 %<12pt&tate>  \setlength\textheight{24\Cvs}
1218   \fi
1219 %    \end{macrocode}
1220 % 2eモードの場合:
1221 %    \begin{macrocode}
1222 \else
1223 %    \end{macrocode}
1224 % 2eモード:|a4j|や|b5j|のクラスオプションが指定された場合の設定:
1225 % 縦組では用紙サイズの70\%(book)か78\%(ariticle,report)、
1226 % 横組では70\%(book)か75\%(article,report)を版面の高さに設定します。
1227 %    \begin{macrocode}
1228   \if@stysize
1229 %<tate&bk>    \setlength\textheight{.75\paperwidth}
1230 %<tate&!bk>    \setlength\textheight{.78\paperwidth}
1231 %<yoko&bk>    \setlength\textheight{.70\paperheight}
1232 %<yoko&!bk>    \setlength\textheight{.75\paperheight}
1233 %    \end{macrocode}
1234 % 2eモード:デフォルト値
1235 %    \begin{macrocode}
1236   \else
1237 %<tate>    \setlength\@tempdima{\paperwidth}
1238 %<yoko>    \setlength\@tempdima{\paperheight}
1239     \addtolength\@tempdima{-2in}
1240 %<yoko>    \addtolength\@tempdima{-1.5in}
1241     \divide\@tempdima\baselineskip
1242     \@tempcnta\@tempdima
1243     \setlength\textheight{\@tempcnta\baselineskip}
1244   \fi
1245 \fi
1246 %    \end{macrocode}
1247 % 最後に、|\textheight|に|\topskip|の値を加えます。
1248 %    \begin{macrocode}
1249 \addtolength\textheight{\topskip}
1250 \@settopoint\textheight
1251 %    \end{macrocode}
1252 % \end{macro}
1253 %
1254 % \subsubsection{マージン}
1255 %
1256 % \begin{macro}{\topmargin}
1257 % |\topmargin|は、``印字可能領域''---用紙の上端から1インチ内側---%
1258 % の上端からヘッダ部分の上端までの距離です。
1259 %
1260 % 2.09互換モードの場合:
1261 %    \begin{macrocode}
1262 \if@compatibility
1263 %<*yoko>
1264   \if@stysize
1265     \setlength\topmargin{-.3in}
1266   \else
1267 %<!bk>    \setlength\topmargin{27\p@}
1268 %<10pt&bk>    \setlength\topmargin{.75in}
1269 %<11pt&bk>    \setlength\topmargin{.73in}
1270 %<12pt&bk>    \setlength\topmargin{.73in}
1271   \fi
1272 %</yoko>
1273 %<*tate>
1274   \if@stysize
1275     \ifnum\c@@paper=2 % A5
1276       \setlength\topmargin{.8in}
1277     \else % A4, B4, B5 and other
1278       \setlength\topmargin{32mm}
1279     \fi
1280   \else
1281     \setlength\topmargin{32mm}
1282   \fi
1283   \addtolength\topmargin{-1in}
1284   \addtolength\topmargin{-\headheight}
1285   \addtolength\topmargin{-\headsep}
1286 %</tate>
1287 %    \end{macrocode}
1288 % 2eモードの場合:
1289 %    \begin{macrocode}
1290 \else
1291   \setlength\topmargin{\paperheight}
1292   \addtolength\topmargin{-\headheight}
1293   \addtolength\topmargin{-\headsep}
1294 %<tate>  \addtolength\topmargin{-\textwidth}
1295 %<yoko>  \addtolength\topmargin{-\textheight}
1296   \addtolength\topmargin{-\footskip}
1297 %    \end{macrocode}
1298 % \changes{v1.1e}{1997/04/08}{横組クラスでの調整量を
1299 %      -2.4インチから-2.0インチにした。}
1300 % \changes{v1.1j}{1998/02/03}{互換モード時のa5pのトップマージンを0.7in増加}
1301 %    \begin{macrocode}
1302   \if@stysize
1303     \ifnum\c@@paper=2 % A5
1304       \addtolength\topmargin{-1.3in}
1305     \else
1306       \addtolength\topmargin{-2.0in}
1307     \fi
1308   \else
1309 %<yoko>    \addtolength\topmargin{-2.0in}
1310 %<tate>    \addtolength\topmargin{-2.8in}
1311   \fi
1312 %    \end{macrocode}
1313 % \changes{v1.1d}{1997/02/05}{\cs{tompargin}を半分にするのはアキ領域の計算後}
1314 % \changes{v1.1r}{1999/08/09}{\cs{if@stysize}フラグに限らず半分にする}
1315 %    \begin{macrocode}
1316   \addtolength\topmargin{-.5\topmargin}
1317 \fi
1318 \@settopoint\topmargin
1319 %    \end{macrocode}
1320 % \end{macro}
1321 %
1322 % \begin{macro}{\marginparsep}
1323 % \begin{macro}{\marginparpush}
1324 % |\marginparsep|は、本文と傍注の間にあけるスペースの幅です。
1325 % 横組では本文の左(右)端と傍注、
1326 % 縦組では本文の下(上)端と傍注の間になります。
1327 % |\marginparpush|は、傍注と傍注との間のスペースの幅です。
1328 %    \begin{macrocode}
1329 \if@twocolumn
1330   \setlength\marginparsep{10\p@}
1331 \else
1332 %<tate>  \setlength\marginparsep{15\p@}
1333 %<yoko>  \setlength\marginparsep{10\p@}
1334 \fi
1335 %<tate>\setlength\marginparpush{7\p@}
1336 %<*yoko>
1337 %<10pt>\setlength\marginparpush{5\p@}
1338 %<11pt>\setlength\marginparpush{5\p@}
1339 %<12pt>\setlength\marginparpush{7\p@}
1340 %</yoko>
1341 %    \end{macrocode}
1342 % \end{macro}
1343 % \end{macro}
1344 %
1345 % \begin{macro}{\oddsidemargin}
1346 % \begin{macro}{\evensidemargin}
1347 % \begin{macro}{\marginparwidth}
1348 % まず、互換モードでの長さを示します。
1349 %
1350 % 互換モード、縦組の場合:
1351 %    \begin{macrocode}
1352 \if@compatibility
1353 %<tate>   \setlength\oddsidemargin{0\p@}
1354 %<tate>   \setlength\evensidemargin{0\p@}
1355 %    \end{macrocode}
1356 % 互換モード、横組、bookクラスの場合:
1357 %    \begin{macrocode}
1358 %<*yoko>
1359 %<*bk>
1360 %<10pt>    \setlength\oddsidemargin   {.5in}
1361 %<11pt>    \setlength\oddsidemargin   {.25in}
1362 %<12pt>    \setlength\oddsidemargin   {.25in}
1363 %<10pt>    \setlength\evensidemargin  {1.5in}
1364 %<11pt>    \setlength\evensidemargin  {1.25in}
1365 %<12pt>    \setlength\evensidemargin  {1.25in}
1366 %<10pt>    \setlength\marginparwidth {.75in}
1367 %<11pt>    \setlength\marginparwidth {1in}
1368 %<12pt>    \setlength\marginparwidth {1in}
1369 %</bk>
1370 %    \end{macrocode}
1371 % 互換モード、横組、reportとarticleクラスの場合:
1372 %    \begin{macrocode}
1373 %<*!bk>
1374     \if@twoside
1375 %<10pt>      \setlength\oddsidemargin   {44\p@}
1376 %<11pt>      \setlength\oddsidemargin   {36\p@}
1377 %<12pt>      \setlength\oddsidemargin   {21\p@}
1378 %<10pt>      \setlength\evensidemargin  {82\p@}
1379 %<11pt>      \setlength\evensidemargin  {74\p@}
1380 %<12pt>      \setlength\evensidemargin  {59\p@}
1381 %<10pt>      \setlength\marginparwidth {107\p@}
1382 %<11pt>      \setlength\marginparwidth {100\p@}
1383 %<12pt>      \setlength\marginparwidth {85\p@}
1384     \else
1385 %<10pt>     \setlength\oddsidemargin   {60\p@}
1386 %<11pt>     \setlength\oddsidemargin   {54\p@}
1387 %<12pt>     \setlength\oddsidemargin   {39.5\p@}
1388 %<10pt>     \setlength\evensidemargin  {60\p@}
1389 %<11pt>     \setlength\evensidemargin  {54\p@}
1390 %<12pt>     \setlength\evensidemargin  {39.5\p@}
1391 %<10pt>     \setlength\marginparwidth  {90\p@}
1392 %<11pt>     \setlength\marginparwidth  {83\p@}
1393 %<12pt>     \setlength\marginparwidth  {68\p@}
1394   \fi
1395 %</!bk>
1396 %    \end{macrocode}
1397 % 互換モード、横組、二段組の場合:
1398 %    \begin{macrocode}
1399   \if@twocolumn
1400      \setlength\oddsidemargin  {30\p@}
1401      \setlength\evensidemargin {30\p@}
1402      \setlength\marginparwidth {48\p@}
1403   \fi
1404 %</yoko>
1405 %    \end{macrocode}
1406 % 縦組、横組にかかわらず、スタイルオプション設定ではゼロです。
1407 % \changes{v1.0g}{1997/01/25}{\cs{oddsidemargin}, \cs{evensidemagin}:
1408 %    0pt if specified papersize at \cs{documentstyle} option.}
1409 %    \begin{macrocode}
1410   \if@stysize
1411     \if@twocolumn\else
1412       \setlength\oddsidemargin{0\p@}
1413       \setlength\evensidemargin{0\p@}
1414     \fi
1415   \fi
1416 %    \end{macrocode}
1417 %
1418 % 互換モードでない場合:
1419 %    \begin{macrocode}
1420 \else
1421   \setlength\@tempdima{\paperwidth}
1422 %<tate>  \addtolength\@tempdima{-\textheight}
1423 %<yoko>  \addtolength\@tempdima{-\textwidth}
1424 %    \end{macrocode}
1425 %
1426 % |\oddsidemargin|を計算します。
1427 %    \begin{macrocode}
1428   \if@twoside
1429 %<tate>    \setlength\oddsidemargin{.6\@tempdima}
1430 %<yoko>    \setlength\oddsidemargin{.4\@tempdima}
1431   \else
1432     \setlength\oddsidemargin{.5\@tempdima}
1433   \fi
1434   \addtolength\oddsidemargin{-1in}
1435 %    \end{macrocode}
1436 % \changes{v1.1p}{1999/1/6}{\cs{oddsidemargin}のポイントへの変換を後ろに}
1437 % |\evensidemargin|を計算します。
1438 %    \begin{macrocode}
1439   \setlength\evensidemargin{\paperwidth}
1440   \addtolength\evensidemargin{-2in}
1441 %<tate>  \addtolength\evensidemargin{-\textheight}
1442 %<yoko>  \addtolength\evensidemargin{-\textwidth}
1443   \addtolength\evensidemargin{-\oddsidemargin}
1444   \@settopoint\oddsidemargin % 1999.1.6
1445   \@settopoint\evensidemargin
1446 %    \end{macrocode}
1447 % |\marginparwidth|を計算します。
1448 % ここで、|\@tempdima|の値は、\linebreak
1449 % |\paperwidth| $-$ |\textwidth|です。
1450 % \changes{v1.1d}{1995/11/24}{typo: \cs{marginmarwidth} to \cs{marginparwidth}}
1451 %    \begin{macrocode}
1452 %<*yoko>
1453   \if@twoside
1454     \setlength\marginparwidth{.6\@tempdima}
1455     \addtolength\marginparwidth{-.4in}
1456   \else
1457     \setlength\marginparwidth{.5\@tempdima}
1458     \addtolength\marginparwidth{-.4in}
1459   \fi
1460   \ifdim \marginparwidth >2in
1461     \setlength\marginparwidth{2in}
1462   \fi
1463 %</yoko>
1464 %    \end{macrocode}
1465 %
1466 % 縦組の場合は、少し複雑です。
1467 %    \begin{macrocode}
1468 %<*tate>
1469   \setlength\@tempdima{\paperheight}
1470   \addtolength\@tempdima{-\textwidth}
1471   \addtolength\@tempdima{-\topmargin}
1472   \addtolength\@tempdima{-\headheight}
1473   \addtolength\@tempdima{-\headsep}
1474   \addtolength\@tempdima{-\footskip}
1475   \setlength\marginparwidth{.5\@tempdima}
1476 %</tate>
1477   \@settopoint\marginparwidth
1478 \fi
1479 %    \end{macrocode}
1480 % \end{macro}
1481 % \end{macro}
1482 % \end{macro}
1483 %
1484 %
1485 % \subsection{脚注}
1486 %
1487 % \begin{macro}{\footnotesep}
1488 % |\footnotesep|は、それぞれの脚注の先頭に置かれる``支柱''の高さです。
1489 % このクラスでは、通常の|\footnotesize|の支柱と同じ長さですので、
1490 % 脚注間に余計な空白は入りません。
1491 %    \begin{macrocode}
1492 %<10pt>\setlength\footnotesep{6.65\p@}
1493 %<11pt>\setlength\footnotesep{7.7\p@}
1494 %<12pt>\setlength\footnotesep{8.4\p@}
1495 %    \end{macrocode}
1496 % \end{macro}
1497 %
1498 % \begin{macro}{\footins}
1499 % |\skip\footins|は、本文の最終行と最初の脚注との間の距離です。
1500 %    \begin{macrocode}
1501 %<10pt>\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
1502 %<11pt>\setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@}
1503 %<12pt>\setlength{\skip\footins}{10.8\p@ \@plus 4\p@ \@minus 2\p@}
1504 %    \end{macrocode}
1505 % \end{macro}
1506 %
1507 % \subsection{フロート}
1508 % すべてのフロートパラメータは、\LaTeX{}のカーネルでデフォルトが定義
1509 % されています。そのため、カウンタ以外のパラメータは|\renewcommand|で
1510 % 設定する必要があります。
1511 %
1512 % \subsubsection{フロートパラメータ}
1513 %
1514 % \begin{macro}{\floatsep}
1515 % \begin{macro}{\textfloatsep}
1516 % \begin{macro}{\intextsep}
1517 % フロートオブジェクトが本文のあるページに置かれるとき、
1518 % フロートとそのページにある別のオブジェクトの距離は、
1519 % これらのパラメータで制御されます。これらのパラメータは、一段組モードと
1520 % 二段組モードの段抜きでないフロートの両方で使われます。
1521 %
1522 % |\floatsep|は、ページ上部あるいは下部のフロート間の距離です。
1523 %
1524 % |\textfloatsep|は、ページ上部あるいは下部のフロートと本文との距離です。
1525 %
1526 % |\intextsep|は、本文の途中に出力されるフロートと本文との距離です。
1527 %    \begin{macrocode}
1528 %<*10pt>
1529 \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
1530 \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
1531 \setlength\intextsep   {12\p@ \@plus 2\p@ \@minus 2\p@}
1532 %</10pt>
1533 %<*11pt>
1534 \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
1535 \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
1536 \setlength\intextsep   {12\p@ \@plus 2\p@ \@minus 2\p@}
1537 %</11pt>
1538 %<*12pt>
1539 \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 4\p@}
1540 \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
1541 \setlength\intextsep   {14\p@ \@plus 4\p@ \@minus 4\p@}
1542 %</12pt>
1543 %    \end{macrocode}
1544 % \end{macro}
1545 % \end{macro}
1546 % \end{macro}
1547 %
1548 % \begin{macro}{\dblfloatsep}
1549 % \begin{macro}{\dbltextfloatsep}
1550 % 二段組モードで、|\textwidth|の幅を持つ、段抜きのフロートオブジェクトが
1551 % 本文と同じページに置かれるとき、本文とフロートとの距離は、
1552 % |\dblfloatsep|と|\dbltextfloatsep|によって制御されます。
1553 %
1554 % |\dblfloatsep|は、ページ上部あるいは下部のフロートと本文との距離です。
1555 %
1556 % |\dbltextfloatsep|は、ページ上部あるいは下部のフロート間の距離です。
1557 %    \begin{macrocode}
1558 %<*10pt>
1559 \setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
1560 \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
1561 %</10pt>
1562 %<*11pt>
1563 \setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
1564 \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
1565 %</11pt>
1566 %<*12pt>
1567 \setlength\dblfloatsep    {14\p@ \@plus 2\p@ \@minus 4\p@}
1568 \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
1569 %</12pt>
1570 %    \end{macrocode}
1571 % \end{macro}
1572 % \end{macro}
1573 %
1574 % \begin{macro}{\@fptop}
1575 % \begin{macro}{\@fpsep}
1576 % \begin{macro}{\@fpbot}
1577 % フロートオブジェクトが、独立したページに置かれるとき、
1578 % このページのレイアウトは、次のパラメータで制御されます。
1579 % これらのパラメータは、一段組モードか、二段組モードでの一段出力の
1580 % フロートオブジェクトに対して使われます。
1581 %
1582 % ページ上部では、|\@fptop|の伸縮長が挿入されます。
1583 % ページ下部では、|\@fpbot|の伸縮長が挿入されます。
1584 % フロート間には|\@fpsep|が挿入されます。
1585 %
1586 % なお、そのページを空白で満たすために、|\@fptop|と|\@fpbot|の
1587 % 少なくともどちらか一方に、|plus ...fil|を含めてください。
1588 %    \begin{macrocode}
1589 %<*10pt>
1590 \setlength\@fptop{0\p@ \@plus 1fil}
1591 \setlength\@fpsep{8\p@ \@plus 2fil}
1592 \setlength\@fpbot{0\p@ \@plus 1fil}
1593 %</10pt>
1594 %<*11pt>
1595 \setlength\@fptop{0\p@ \@plus 1fil}
1596 \setlength\@fpsep{8\p@ \@plus 2fil}
1597 \setlength\@fpbot{0\p@ \@plus 1fil}
1598 %</11pt>
1599 %<*12pt>
1600 \setlength\@fptop{0\p@ \@plus 1fil}
1601 \setlength\@fpsep{10\p@ \@plus 2fil}
1602 \setlength\@fpbot{0\p@ \@plus 1fil}
1603 %</12pt>
1604 %    \end{macrocode}
1605 % \end{macro}
1606 % \end{macro}
1607 % \end{macro}
1608 %
1609 % \begin{macro}{\@dblfptop}
1610 % \begin{macro}{\@dblfpsep}
1611 % \begin{macro}{\@dblfpbot}
1612 % 二段組モードでの二段抜きのフロートに対しては、
1613 % これらのパラメータが使われます。
1614 %    \begin{macrocode}
1615 %<*10pt>
1616 \setlength\@dblfptop{0\p@ \@plus 1fil}
1617 \setlength\@dblfpsep{8\p@ \@plus 2fil}
1618 \setlength\@dblfpbot{0\p@ \@plus 1fil}
1619 %</10pt>
1620 %<*11pt>
1621 \setlength\@dblfptop{0\p@ \@plus 1fil}
1622 \setlength\@dblfpsep{8\p@ \@plus 2fil}
1623 \setlength\@dblfpbot{0\p@ \@plus 1fil}
1624 %</11pt>
1625 %<*12pt>
1626 \setlength\@dblfptop{0\p@ \@plus 1fil}
1627 \setlength\@dblfpsep{10\p@ \@plus 2fil}
1628 \setlength\@dblfpbot{0\p@ \@plus 1fil}
1629 %</12pt>
1630 %</10pt|11pt|12pt>
1631 %    \end{macrocode}
1632 % \end{macro}
1633 % \end{macro}
1634 % \end{macro}
1635 %
1636 % \subsubsection{フロートオブジェクトの上限値}
1637 %
1638 % \begin{macro}{\c@topnumber}
1639 % \Lcount{topnumber}は、本文ページの上部に出力できるフロートの最大数です。
1640 %    \begin{macrocode}
1641 %<*article|report|book>
1642 \setcounter{topnumber}{2}
1643 %    \end{macrocode}
1644 % \end{macro}
1645 %
1646 % \begin{macro}{\c@bottomnumber}
1647 % \Lcount{bottomnumber}は、本文ページの下部に出力できるフロートの最大数です。
1648 %    \begin{macrocode}
1649 \setcounter{bottomnumber}{1}
1650 %    \end{macrocode}
1651 % \end{macro}
1652 %
1653 % \begin{macro}{\c@totalnumber}
1654 % \Lcount{totalnumber}は、本文ページに出力できるフロートの最大数です。
1655 %    \begin{macrocode}
1656 \setcounter{totalnumber}{3}
1657 %    \end{macrocode}
1658 % \end{macro}
1659 %
1660 % \begin{macro}{\c@dbltopnumber}
1661 % \Lcount{dbltopnumber}は、二段組時における、本文ページの上部に出力できる
1662 % 段抜きのフロートの最大数です。
1663 %    \begin{macrocode}
1664 \setcounter{dbltopnumber}{2}
1665 %    \end{macrocode}
1666 % \end{macro}
1667 %
1668 % \begin{macro}{\topfraction}
1669 % これは、本文ページの上部に出力されるフロートが占有できる最大の割り合いです。
1670 %    \begin{macrocode}
1671 \renewcommand{\topfraction}{.7}
1672 %    \end{macrocode}
1673 % \end{macro}
1674 %
1675 % \begin{macro}{\bottomfraction}
1676 % これは、本文ページの下部に出力されるフロートが占有できる最大の割り合いです。
1677 %    \begin{macrocode}
1678 \renewcommand{\bottomfraction}{.3}
1679 %    \end{macrocode}
1680 % \end{macro}
1681 %
1682 % \begin{macro}{\textfraction}
1683 % これは、本文ページに最低限、入らなくてはならない本文の割り合いです。
1684 %    \begin{macrocode}
1685 \renewcommand{\textfraction}{.2}
1686 %    \end{macrocode}
1687 % \end{macro}
1688 %
1689 % \begin{macro}{\floatpagefraction}
1690 % これは、フロートだけのページで最低限、入らなくてはならない
1691 % フロートの割り合いです。
1692 %    \begin{macrocode}
1693 \renewcommand{\floatpagefraction}{.5}
1694 %    \end{macrocode}
1695 % \end{macro}
1696 %
1697 % \begin{macro}{\dbltopfraction}
1698 % これは、2段組時における本文ページに、
1699 % 2段抜きのフロートが占めることができる最大の割り合いです。
1700 %    \begin{macrocode}
1701 \renewcommand{\dbltopfraction}{.7}
1702 %    \end{macrocode}
1703 % \end{macro}
1704 %
1705 % \begin{macro}{\dblfloatpagefraction}
1706 % これは、2段組時におけるフロートだけのページに最低限、
1707 % 入らなくてはならない2段抜きのフロートの割り合いです。
1708 %    \begin{macrocode}
1709 \renewcommand{\dblfloatpagefraction}{.5}
1710 %    \end{macrocode}
1711 % \end{macro}
1712 %
1713 %
1714 %
1715 % \section{ページスタイル}\label{sec:pagestyle}
1716 % つぎの6種類のページスタイルを使用できます。
1717 % \pstyle{empty}は\file{latex.dtx}で定義されています。
1718 %
1719 % \begin{tabular}{ll}
1720 % empty      & ヘッダにもフッタにも出力しない\\
1721 % plain      & フッタにページ番号のみを出力する\\
1722 % headnombre & ヘッダにページ番号のみを出力する\\
1723 % footnombre & フッタにページ番号のみを出力する\\
1724 % headings   & ヘッダに見出しとページ番号を出力する\\
1725 % bothstyle  & ヘッダに見出し、フッタにページ番号を出力する\\
1726 % \end{tabular}
1727 %
1728 % ページスタイル\pstyle{foo}は、|\ps@foo|コマンドとして定義されます。
1729 %
1730 % \begin{macro}{\@evenhead}
1731 % \begin{macro}{\@oddhead}
1732 % \begin{macro}{\@evenfoot}
1733 % \begin{macro}{\@oddfoot}
1734 % これらは|\ps@...|から呼び出され、ヘッダとフッタを出力するマクロです。
1735 %
1736 % \DeleteShortVerb{\|}
1737 % \begin{tabular}{ll}
1738 % |\@oddhead| & 奇数ページのヘッダを出力\\
1739 % |\@oddfoot| & 奇数ページのフッタを出力\\
1740 % |\@evenhead| & 偶数ページのヘッダを出力\\
1741 % |\@evenfoot| & 偶数ページのフッタを出力\\
1742 % \end{tabular}
1743 % \MakeShortVerb{\|}
1744 %
1745 % これらの内容は、横組の場合は|\textwidth|の幅を持つ|\hbox|に入れられ、
1746 % 縦組の場合は|\textheight|の幅を持つ|\hbox|に入れられます。
1747 % \end{macro}
1748 % \end{macro}
1749 % \end{macro}
1750 % \end{macro}
1751 %
1752 % \subsection{マークについて}
1753 % ヘッダに入る章番号や章見出しは、見出しコマンドで実行されるマークコマンドで
1754 % 決定されます。ここでは、実行されるマークコマンドの定義を行なっています。
1755 % これらのマークコマンドは、\TeX{}の|\mark|機能を用いて、
1756 % `left'と`right'の2種類のマークを生成するように定義しています。
1757 %
1758 % \begin{flushleft}
1759 % |\markboth{|\meta{LEFT}|}{|\meta{RIGHT}|}|: 両方のマークに追加します。
1760 %
1761 % |\markright{|\meta{RIGHT}|}|: `右'マークに追加します。
1762 %
1763 % |\leftmark|: |\@oddhead|, |\@oddfoot|, |\@evenhead|, |\@evenfoot|マクロで
1764 %     使われ、現在の``左''マークを出力します。
1765 %     |\leftmark|は\TeX{}の|\botmark|コマンドのような働きをします。
1766 %     初期値は空でなくてはいけません。
1767 %
1768 % |\rightmark|: |\@oddhead|, |\@oddfoot|, |\@evenhead|, |\@evenfoot|マクロで
1769 %     使われ、現在の``右''マークを出力します。
1770 %     |\rightmark|は\TeX{}の|\firstmark|コマンドのような働きをします。
1771 %     初期値は空でなくてはいけません。
1772 % \end{flushleft}
1773 %
1774 % マークコマンドの動作は、左マークの`範囲内の'右マークのために
1775 % 合理的になっています。たとえば、左マークは|\chapter|コマンドによって
1776 % 変更されます。そして右マークは|\section|コマンドによって変更されます。
1777 % しかし、同一ページに複数の|\markboth|コマンドが現れたとき、
1778 % おかしな結果となることがあります。
1779 %
1780 % |\tableofcontents|のようなコマンドは、|\@mkboth|コマンドを用いて、
1781 % あるページスタイルの中でマークを設定しなくてはなりません。
1782 % |\@mkboth|は、|\ps@...|コマンドによって、|\markboth|(ヘッダを設定する)か、
1783 % |\@gobbletwo|(何もしない)に|\let|されます。
1784 %
1785 % \changes{v1.0a}{1995/08/30}{柱の書体がノンブルに影響するバグの修正}
1786 %
1787 % \subsection{plainページスタイル}
1788 % \pstyle{jpl@in}に|\let|するために、ここで定義をします。
1789 %
1790 % \begin{macro}{\ps@plain}
1791 %    \begin{macrocode}
1792 \def\ps@plain{\let\@mkboth\@gobbletwo
1793    \let\ps@jpl@in\ps@plain
1794    \let\@oddhead\@empty
1795    \def\@oddfoot{\reset@font\hfil\thepage\hfil}%
1796    \let\@evenhead\@empty
1797    \let\@evenfoot\@oddfoot}
1798 %    \end{macrocode}
1799 % \end{macro}
1800 %
1801 % \subsection{jpl@inページスタイル}
1802 % \changes{v1.0d}{1996/02/29}{\pstyle{jpl@in}の初期値を定義}
1803 %
1804 % \pstyle{jpl@in}スタイルは、クラスファイル内部で使用するものです。
1805 % \LaTeX{}では、bookクラスを\pstyle{headings}としています。
1806 % しかし、\cs{tableofcontnts}コマンドの内部では\pstyle{plain}として
1807 % 設定されるため、一つの文書でのページ番号の位置が上下に出力される
1808 % ことになります。
1809 %
1810 % そこで、ここでは\cs{tableofcontents}や\cs{theindex}のページスタイル
1811 % を\pstyle{jpl@in}にし、実際に出力される形式は、ほかのページスタイル
1812 % で|\let|をしています。したがって、\pstyle{headings}のとき、目次ページの
1813 % ページ番号はヘッダ位置に出力され、\pstyle{plain}のときには、フッタ位置に
1814 % 出力されます。
1815 %
1816 % ここで、定義をしているのは、その初期値です。
1817 %
1818 % \begin{macro}{\ps@jpl@in}
1819 %    \begin{macrocode}
1820 \let\ps@jpl@in\ps@plain
1821 %    \end{macrocode}
1822 % \end{macro}
1823 %
1824 % \subsection{headnombreページスタイル}
1825 %
1826 % \begin{macro}{\ps@headnombre}
1827 % \pstyle{headnombre}スタイルは、ヘッダにページ番号のみを出力します。
1828 %    \begin{macrocode}
1829 \def\ps@headnombre{\let\@mkboth\@gobbletwo
1830     \let\ps@jpl@in\ps@headnombre
1831 %<yoko>  \def\@evenhead{\thepage\hfil}%
1832 %<yoko>  \def\@oddhead{\hfil\thepage}%
1833 %<tate>  \def\@evenhead{\hfil\thepage}%
1834 %<tate>  \def\@oddhead{\thepage\hfil}%
1835   \let\@oddfoot\@empty\let\@evenfoot\@empty}
1836 %    \end{macrocode}
1837 % \end{macro}
1838 %
1839 % \subsection{footnombreページスタイル}
1840 %
1841 % \begin{macro}{\ps@footnombre}
1842 % \pstyle{footnombre}スタイルは、フッタにページ番号のみを出力します。
1843 %    \begin{macrocode}
1844 \def\ps@footnombre{\let\@mkboth\@gobbletwo
1845     \let\ps@jpl@in\ps@footnombre
1846 %<yoko>  \def\@evenfoot{\thepage\hfil}%
1847 %<yoko>  \def\@oddfoot{\hfil\thepage}%
1848 %<tate>  \def\@evenfoot{\hfil\thepage}%
1849 %<tate>  \def\@oddfoot{\thepage\hfil}%
1850   \let\@oddhead\@empty\let\@evenhead\@empty}
1851 %    \end{macrocode}
1852 % \end{macro}
1853 %
1854 % \subsection{headingsスタイル}
1855 % \pstyle{headings}スタイルは、ヘッダに見出しとページ番号を出力します。
1856 %
1857 % \begin{macro}{\ps@headings}
1858 % このスタイルは、両面印刷と片面印刷とで形式が異なります。
1859 %    \begin{macrocode}
1860 \if@twoside
1861 %    \end{macrocode}
1862 % 横組の場合は、奇数ページが右に、偶数ページが左にきます。
1863 % 縦組の場合は、奇数ページが左に、偶数ページが右にきます。
1864 %    \begin{macrocode}
1865   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
1866     \let\@oddfoot\@empty\let\@evenfoot\@empty
1867 %<yoko>    \def\@evenhead{\thepage\hfil\leftmark}%
1868 %<yoko>    \def\@oddhead{{\rightmark}\hfil\thepage}%
1869 %<tate>    \def\@evenhead{{\leftmark}\hfil\thepage}%
1870 %<tate>    \def\@oddhead{\thepage\hfil\rightmark}%
1871     \let\@mkboth\markboth
1872 %<*article>
1873     \def\sectionmark##1{\markboth{%
1874        \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
1875        ##1}{}}%
1876     \def\subsectionmark##1{\markright{%
1877        \ifnum \c@secnumdepth >\@ne \thesubsection.\hskip1\zw\fi
1878        ##1}}%
1879 %</article>
1880 %<*report|book>
1881   \def\chaptermark##1{\markboth{%
1882      \ifnum \c@secnumdepth >\m@ne
1883 %<book>         \if@mainmatter
1884          \@chapapp\thechapter\@chappos\hskip1\zw
1885 %<book>         \fi
1886      \fi
1887      ##1}{}}%
1888   \def\sectionmark##1{\markright{%
1889      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
1890      ##1}}%
1891 %</report|book>
1892   }
1893 %    \end{macrocode}
1894 % 片面印刷の場合:
1895 % \changes{v1.1g}{1997/08/25}{片面印刷のとき、sectionレベルが出力されない
1896 %      のを修正}
1897 %    \begin{macrocode}
1898 \else % if not twoside
1899   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
1900     \let\@oddfoot\@empty
1901 %<yoko>    \def\@oddhead{{\rightmark}\hfil\thepage}%
1902 %<tate>    \def\@oddhead{\thepage\hfil\rightmark}%
1903     \let\@mkboth\markboth
1904 %<*article>
1905   \def\sectionmark##1{\markright{%
1906      \ifnum \c@secnumdepth >\m@ne \thesection.\hskip1\zw\fi
1907      ##1}}%
1908 %</article>
1909 %<*report|book>
1910 \def\chaptermark##1{\markright{%
1911    \ifnum \c@secnumdepth >\m@ne
1912 %<book>         \if@mainmatter
1913        \@chapapp\thechapter\@chappos\hskip1\zw
1914 %<book>         \fi
1915    \fi
1916    ##1}}%
1917 %</report|book>
1918   }
1919 \fi
1920 %    \end{macrocode}
1921 % \end{macro}
1922 %
1923 % \subsection{bothstyleスタイル}
1924 %
1925 % \begin{macro}{\ps@bothstyle}
1926 % \pstyle{bothstyle}スタイルは、
1927 % ヘッダに見出しを、フッタにページ番号を出力します。
1928 %
1929 % このスタイルは、両面印刷と片面印刷とで形式が異なります。
1930 % \changes{v1.0d}{1995/08/23}{横組のevenfootが中央揃えになっていたのを修正}
1931 % \changes{v1.0d}{1996/03/05}{横組で偶数ページと奇数ページの設定が逆なのを修正}
1932 %    \begin{macrocode}
1933 \if@twoside
1934   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
1935 %<*yoko>
1936     \def\@evenhead{\leftmark\hfil}% right page
1937     \def\@evenfoot{\thepage\hfil}% right page
1938     \def\@oddhead{\hfil\rightmark}% left page
1939     \def\@oddfoot{\hfil\thepage}% left page
1940 %</yoko>
1941 %<*tate>
1942     \def\@evenhead{\hfil\leftmark}% right page
1943     \def\@evenfoot{\hfil\thepage}% right page
1944     \def\@oddhead{\rightmark\hfil}% left page
1945     \def\@oddfoot{\thepage\hfil}% left page
1946 %</tate>
1947   \let\@mkboth\markboth
1948 %<*article>
1949   \def\sectionmark##1{\markboth{%
1950      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
1951      ##1}{}}%
1952   \def\subsectionmark##1{\markright{%
1953      \ifnum \c@secnumdepth >\@ne \thesubsection.\hskip1\zw\fi
1954      ##1}}%
1955 %</article>
1956 %<*report|book>
1957 \def\chaptermark##1{\markboth{%
1958      \ifnum \c@secnumdepth >\m@ne
1959 %<book>         \if@mainmatter
1960          \@chapapp\thechapter\@chappos\hskip1\zw
1961 %<book>         \fi
1962      \fi
1963      ##1}{}}%
1964   \def\sectionmark##1{\markright{%
1965      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
1966      ##1}}%
1967 %</report|book>
1968   }
1969 %    \end{macrocode}
1970 % \changes{v1.1g}{1997/08/25}{片面印刷のとき、sectionレベルが出力されない
1971 %      のを修正}
1972 % \changes{v1.1i}{1997/12/12}{report, bookクラスで片面印刷時に、
1973 %      bothstyleスタイルにすると、コンパイルエラーになるのを修正}
1974 %    \begin{macrocode}
1975 \else % if one column
1976   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
1977 %<yoko>    \def\@oddhead{\hfil\rightmark}%
1978 %<yoko>    \def\@oddfoot{\hfil\thepage}%
1979 %<tate>    \def\@oddhead{\rightmark\hfil}%
1980 %<tate>    \def\@oddfoot{\thepage\hfil}%
1981     \let\@mkboth\markboth
1982 %<*article>
1983   \def\sectionmark##1{\markright{%
1984      \ifnum \c@secnumdepth >\m@ne \thesection.\hskip1\zw\fi
1985      ##1}}%
1986 %</article>
1987 %<*report|book>
1988   \def\chaptermark##1{\markright{%
1989      \ifnum \c@secnumdepth >\m@ne
1990 %<book>         \if@mainmatter
1991          \@chapapp\thechapter\@chappos\hskip1\zw
1992 %<book>         \fi
1993      \fi
1994      ##1}}%
1995 %</report|book>
1996   }
1997 \fi
1998 %    \end{macrocode}
1999 % \end{macro}
2000 %
2001 % \subsection{myheadingスタイル}
2002 %
2003 % \begin{macro}{\ps@myheadings}
2004 % \changes{v1.0d}{1995/08/23}{横組モードの左右が逆であったのを修正}
2005 % \pstyle{myheadings}ページスタイルは簡潔に定義されています。
2006 % ユーザがページスタイルを設計するときのヒナ型として使用することができます。
2007 %    \begin{macrocode}
2008 \def\ps@myheadings{\let\ps@jpl@in\ps@plain%
2009   \let\@oddfoot\@empty\let\@evenfoot\@empty
2010 %<yoko>  \def\@evenhead{\thepage\hfil\leftmark}%
2011 %<yoko>  \def\@oddhead{{\rightmark}\hfil\thepage}%
2012 %<tate>  \def\@evenhead{{\leftmark}\hfil\thepage}%
2013 %<tate>  \def\@oddhead{\thepage\hfil\rightmark}%
2014   \let\@mkboth\@gobbletwo
2015 %<!article>  \let\chaptermark\@gobble
2016   \let\sectionmark\@gobble
2017 %<article>  \let\subsectionmark\@gobble
2018 }
2019 %    \end{macrocode}
2020 % \end{macro}
2021 %
2022 %
2023 % \section{文書コマンド}
2024 %
2025 % \subsubsection{表題}
2026 %
2027 % \begin{macro}{\title}
2028 % \begin{macro}{\autor}
2029 % \begin{macro}{\date}
2030 % 文書のタイトル、著者、日付の情報のための、
2031 % これらの3つのコマンドは\file{latex.dtx}で提供されています。
2032 % これらのコマンドは次のように定義されています。
2033 %    \begin{macrocode}
2034 %\newcommand*{\title}[1]{\gdef\@title{#1}}
2035 %\newcommand*{\author}[1]{\gdef\@author{#1}}
2036 %\newcommand*{\date}[1]{\gdef\@date{#1}}
2037 %    \end{macrocode}
2038 % |\date|マクロのデフォルトは、今日の日付です。
2039 %    \begin{macrocode}
2040 %\date{\today}
2041 %    \end{macrocode}
2042 % \end{macro}
2043 % \end{macro}
2044 % \end{macro}
2045 %
2046 % \begin{environment}{titlepage}
2047 % 通常の環境では、ページの最初と最後を除き、タイトルページ環境は何もしません。
2048 % また、ページ番号の出力を抑制します。レポートスタイルでは、
2049 % ページ番号を1にリセットし、そして最後で1に戻します。
2050 % 互換モードでは、ページ番号はゼロに設定されますが、
2051 % 右起こしページ用のページパラメータでは誤った結果になります。
2052 % 二段組スタイルでも一段組のページが作られます。
2053 %
2054 % 最初に互換モードの定義を作ります。
2055 %    \begin{macrocode}
2056 \if@compatibility
2057 \newenvironment{titlepage}
2058     {%
2059 %<book>      \cleardoublepage
2060      \if@twocolumn\@restonecoltrue\onecolumn
2061      \else\@restonecolfalse\newpage\fi
2062      \thispagestyle{empty}%
2063      \setcounter{page}\z@
2064     }%
2065     {\if@restonecol\twocolumn\else\newpage\fi
2066     }
2067 %   \end{macrocode}
2068 %
2069 % そして、\LaTeX{}ネイティブのための定義です。
2070 %   \begin{macrocode}
2071 \else
2072 \newenvironment{titlepage}
2073     {%
2074 %<book>      \cleardoublepage
2075       \if@twocolumn
2076         \@restonecoltrue\onecolumn
2077       \else
2078         \@restonecolfalse\newpage
2079       \fi
2080       \thispagestyle{empty}%
2081       \setcounter{page}\@ne
2082     }%
2083     {\if@restonecol\twocolumn \else \newpage \fi
2084 %    \end{macrocode}
2085 % 二段組モードでなければ、タイトルページの直後のページのページ番号も1に
2086 % します。
2087 %    \begin{macrocode}
2088      \if@twoside\else
2089         \setcounter{page}\@ne
2090      \fi
2091     }
2092 \fi
2093 %    \end{macrocode}
2094 % \end{environment}
2095 %
2096 % \begin{macro}{\maketitle}
2097 % このコマンドは、表題を作成し、出力します。
2098 % 表題ページを独立させるかどうかによって定義が異なります。
2099 % reportとbookクラスのデフォルトは独立した表題です。
2100 % articleクラスはオプションで独立させることができます。
2101 %
2102 % \begin{macro}{\p@thanks}
2103 % 縦組のときは、|\thanks|コマンドを|\p@thanks|に|\let|します。
2104 % このコマンドは|\footnotetext|を使わず、直接、文字を|\@thanks|に格納
2105 % していきます。
2106 %    \begin{macrocode}
2107 \def\p@thanks#1{\footnotemark
2108   \protected@xdef\@thanks{\@thanks
2109     \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}}
2110 %    \end{macrocode}
2111 % \end{macro}
2112 %
2113 %    \begin{macrocode}
2114 \if@titlepage
2115   \newcommand{\maketitle}{\begin{titlepage}%
2116   \let\footnotesize\small
2117   \let\footnoterule\relax
2118 %<tate>  \let\thanks\p@thanks
2119   \let\footnote\thanks
2120 %    \end{macrocode}
2121 % \changes{v1.1d}{1997/02/12}{縦組クラスの表紙を縦書きにするようにした}
2122 %    \begin{macrocode}
2123 %<tate>  \vbox to\textheight\bgroup\tate\hsize\textwidth
2124   \null\vfil
2125   \vskip 60\p@
2126   \begin{center}%
2127     {\LARGE \@title \par}%
2128     \vskip 3em%
2129     {\Large
2130      \lineskip .75em%
2131       \begin{tabular}[t]{c}%
2132         \@author
2133       \end{tabular}\par}%
2134       \vskip 1.5em%
2135     {\large \@date \par}%       % Set date in \large size.
2136   \end{center}\par
2137 %<tate>  \vfil{\centering\@thanks}\vfil\null
2138 %<tate>  \egroup
2139 %<yoko>  \@thanks\vfil\null
2140   \end{titlepage}%
2141 %    \end{macrocode}
2142 % \Lcount{footnote}カウンタをリセットし、|\thanks|と|\maketitle|コマンドを
2143 % 無効にし、いくつかの内部マクロを空にして格納領域を節約します。
2144 %    \begin{macrocode}
2145   \setcounter{footnote}{0}%
2146   \global\let\thanks\relax
2147   \global\let\maketitle\relax
2148   \global\let\p@thanks\relax
2149   \global\let\@thanks\@empty
2150   \global\let\@author\@empty
2151   \global\let\@date\@empty
2152   \global\let\@title\@empty
2153 %    \end{macrocode}
2154 % タイトルが組版されたら、|\title|コマンドなどの宣言を無効にできます。
2155 % |\and|の定義は、|\author|の引数でのみ使用しますので、破棄します。
2156 %    \begin{macrocode}
2157   \global\let\title\relax
2158   \global\let\author\relax
2159   \global\let\date\relax
2160   \global\let\and\relax
2161   }%
2162 \else
2163   \newcommand{\maketitle}{\par
2164   \begingroup
2165     \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
2166     \def\@makefnmark{\hbox{\unless\ifnum\ltjgetparameter{direction}=3 $\m@th^{\@thefnmark}$
2167       \else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}%
2168 %<*tate>
2169     \long\def\@makefntext##1{\parindent 1\zw\noindent
2170        \hbox to 2\zw{\hss\@makefnmark}##1}%
2171 %</tate>
2172 %<*yoko>
2173      \long\def\@makefntext##1{\parindent 1em\noindent
2174        \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
2175 %</yoko>
2176     \if@twocolumn
2177       \ifnum \col@number=\@ne \@maketitle
2178       \else \twocolumn[\@maketitle]%
2179       \fi
2180     \else
2181       \newpage
2182       \global\@topnum\z@   % Prevents figures from going at top of page.
2183       \@maketitle
2184     \fi
2185      \thispagestyle{jpl@in}\@thanks
2186 %    \end{macrocode}
2187 % ここでグループを閉じ、\Lcount{footnote}カウンタをリセットし、
2188 % |\thanks|, |\maketitle|, |\@maketitle|を無効にし、
2189 % いくつかの内部マクロを空にして格納領域を節約します。
2190 %    \begin{macrocode}
2191   \endgroup
2192   \setcounter{footnote}{0}%
2193   \global\let\thanks\relax
2194   \global\let\maketitle\relax
2195   \global\let\p@thanks\relax
2196   \global\let\@thanks\@empty
2197   \global\let\@author\@empty
2198   \global\let\@date\@empty
2199   \global\let\@title\@empty
2200   \global\let\title\relax
2201   \global\let\author\relax
2202   \global\let\date\relax
2203   \global\let\and\relax
2204   }
2205 %    \end{macrocode}
2206 % \end{macro}
2207 %
2208 % \begin{macro}{\@maketitle}
2209 % 独立した表題ページを作らない場合の、表題の出力形式です。
2210 %    \begin{macrocode}
2211   \def\@maketitle{%
2212   \newpage\null
2213   \vskip 2em%
2214   \begin{center}%
2215 %<yoko>  \let\footnote\thanks
2216 %<tate>  \let\footnote\p@thanks
2217     {\LARGE \@title \par}%
2218     \vskip 1.5em%
2219     {\large
2220       \lineskip .5em%
2221       \begin{tabular}[t]{c}%
2222         \@author
2223       \end{tabular}\par}%
2224     \vskip 1em%
2225     {\large \@date}%
2226   \end{center}%
2227   \par\vskip 1.5em}
2228 \fi
2229 %    \end{macrocode}
2230 % \end{macro}
2231 %
2232 % \subsubsection{概要}
2233 %
2234 % \begin{environment}{abstract}
2235 % 要約文のための環境です。bookクラスでは使えません。
2236 % reportスタイルと、|titlepage|オプションを指定したarticleスタイルでは、
2237 % 独立したページに出力されます。
2238 %    \begin{macrocode}
2239 %<*article|report>
2240 \if@titlepage
2241   \newenvironment{abstract}{%
2242       \titlepage
2243       \null\vfil
2244       \@beginparpenalty\@lowpenalty
2245       \begin{center}%
2246         {\bfseries\abstractname}%
2247         \@endparpenalty\@M
2248       \end{center}}%
2249       {\par\vfil\null\endtitlepage}
2250 \else
2251   \newenvironment{abstract}{%
2252     \if@twocolumn
2253       \section*{\abstractname}%
2254     \else
2255       \small
2256       \begin{center}%
2257         {\bfseries\abstractname\vspace{-.5em}\vspace{\z@}}%
2258       \end{center}%
2259       \quotation
2260     \fi}{\if@twocolumn\else\endquotation\fi}
2261 \fi
2262 %</article|report>
2263 %    \end{macrocode}
2264 % \end{environment}
2265 %
2266 %
2267 % \subsection{章見出し}
2268 %
2269 % \subsection{マークコマンド}
2270 %
2271 % \begin{macro}{\chaptermark}
2272 % \begin{macro}{\sectionmark}
2273 % \begin{macro}{\subsectionmark}
2274 % \begin{macro}{\subsubsectionmark}
2275 % \begin{macro}{\paragraphmark}
2276 % \begin{macro}{\subparagraphmark}
2277 % |\...mark|コマンドを初期化します。これらのコマンドはページスタイルの
2278 % 定義で使われます(第\ref{sec:pagestyle}節参照)。
2279 % これらのたいていのコマンドは\file{latex.dtx}ですでに定義されています。
2280 %    \begin{macrocode}
2281 %<!article>\newcommand*{\chaptermark}[1]{}
2282 %\newcommand*{\sectionmark}[1]{}
2283 %\newcommand*{\subsectionmark}[1]{}
2284 %\newcommand*{\subsubsectionmark}[1]{}
2285 %\newcommand*{\paragraph}[1]{}
2286 %\newcommand*{\subparagraph}[1]{}
2287 %    \end{macrocode}
2288 % \end{macro}
2289 % \end{macro}
2290 % \end{macro}
2291 % \end{macro}
2292 % \end{macro}
2293 % \end{macro}
2294 %
2295 % \subsubsection{カウンタの定義}
2296 %
2297 % \begin{macro}{\c@secnumdepth}
2298 % \Lcount{secnumdepth}には、番号を付ける、見出しコマンドのレベルを設定します。
2299 %    \begin{macrocode}
2300 %<article>\setcounter{secnumdepth}{3}
2301 %<!article>\setcounter{secnumdepth}{2}
2302 %    \end{macrocode}
2303 % \end{macro}
2304 %
2305 % \begin{macro}{\c@chapter}
2306 % \begin{macro}{\c@section}
2307 % \begin{macro}{\c@subsection}
2308 % \begin{macro}{\c@subsubsection}
2309 % \begin{macro}{\c@paragraph}
2310 % \begin{macro}{\c@subparagraph}
2311 % これらのカウンタは見出し番号に使われます。
2312 % 最初の引数は、二番目の引数が増加するたびにリセットされます。
2313 % 二番目のカウンタはすでに定義されているものでなくてはいけません。
2314 %    \begin{macrocode}
2315 \newcounter{part}
2316 %<*book|report>
2317 \newcounter{chapter}
2318 \newcounter{section}[chapter]
2319 %</book|report>
2320 %<article>\newcounter{section}
2321 \newcounter{subsection}[section]
2322 \newcounter{subsubsection}[subsection]
2323 \newcounter{paragraph}[subsubsection]
2324 \newcounter{subparagraph}[paragraph]
2325 %    \end{macrocode}
2326 % \end{macro}
2327 % \end{macro}
2328 % \end{macro}
2329 % \end{macro}
2330 % \end{macro}
2331 % \end{macro}
2332 %
2333 % \begin{macro}{\thepart}
2334 % \begin{macro}{\thechapter}
2335 % \begin{macro}{\thesection}
2336 % \begin{macro}{\thesubsection}
2337 % \begin{macro}{\thesubsubsection}
2338 % \begin{macro}{\theparagraph}
2339 % \begin{macro}{\thesubparagraph}
2340 % |\theCTR|が実際に出力される形式の定義です。
2341 %
2342 % |\arabic{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を
2343 % 算用数字で出力します。
2344 %
2345 % |\roman{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を
2346 % 小文字のローマ数字で出力します。
2347 %
2348 % |\Roman{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を
2349 % 大文字のローマ数字で出力します。
2350 %
2351 % |\alph{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を
2352 % $1=$~a, $2=$~b のようにして出力します。
2353 %
2354 % |\Roman{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を
2355 % $1=$~A, $2=$~B のようにして出力します。
2356 %
2357 % |\kansuji{|\Lcount{COUNTER}|}|は、\Lcount{COUNTER}の値を
2358 % 漢数字で出力します。
2359 %
2360 % |\rensuji{|\meta{obj}|}|は、\meta{obj}を横に並べて出力します。
2361 % したがって、横組のときには、何も影響しません。
2362 %
2363 %    \begin{macrocode}
2364 %<*tate>
2365 \renewcommand{\thepart}{\rensuji{\@Roman\c@part}}
2366 %<article>\renewcommand{\thesection}{\rensuji{\@arabic\c@section}}
2367 %<*report|book>
2368 \renewcommand{\thechapter}{\rensuji{\@arabic\c@chapter}}
2369 \renewcommand{\thesection}{\thechapter・\rensuji{\@arabic\c@section}}
2370 %</report|book>
2371 \renewcommand{\thesubsection}{\thesection・\rensuji{\@arabic\c@subsection}}
2372 \renewcommand{\thesubsubsection}{%
2373    \thesubsection・\rensuji{\@arabic\c@subsubsection}}
2374 \renewcommand{\theparagraph}{%
2375    \thesubsubsection・\rensuji{\@arabic\c@paragraph}}
2376 \renewcommand{\thesubparagraph}{%
2377    \theparagraph・\rensuji{\@arabic\c@subparagraph}}
2378 %</tate>
2379 %<*yoko>
2380 \renewcommand{\thepart}{\@Roman\c@part}
2381 %<article>\renewcommand{\thesection}{\@arabic\c@section}
2382 %<*report|book>
2383 \renewcommand{\thechapter}{\@arabic\c@chapter}
2384 \renewcommand{\thesection}{\thechapter.\@arabic\c@section}
2385 %</report|book>
2386 \renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection}
2387 \renewcommand{\thesubsubsection}{%
2388    \thesubsection.\@arabic\c@subsubsection}
2389 \renewcommand{\theparagraph}{%
2390    \thesubsubsection.\@arabic\c@paragraph}
2391 \renewcommand{\thesubparagraph}{%
2392    \theparagraph.\@arabic\c@subparagraph}
2393 %</yoko>
2394 %    \end{macrocode}
2395 % \end{macro}
2396 % \end{macro}
2397 % \end{macro}
2398 % \end{macro}
2399 % \end{macro}
2400 % \end{macro}
2401 % \end{macro}
2402 %
2403 % \begin{macro}{\@chapapp}
2404 % \begin{macro}{\@chappos}
2405 % |\@chapapp|の初期値は`|\prechaptername|'です。
2406 %
2407 % |\@chappos|の初期値は`|\postchaptername|'です。
2408 %
2409 % |\appendix|コマンドは|\@chapapp|を`|\appendixname|'に、
2410 % |\@chappos|を空に再定義します。
2411 %    \begin{macrocode}
2412 %<*report|book>
2413 \newcommand{\@chapapp}{\prechaptername}
2414 \newcommand{\@chappos}{\postchaptername}
2415 %</report|book>
2416 %    \end{macrocode}
2417 % \end{macro}
2418 % \end{macro}
2419 %
2420 % \subsubsection{前付け、本文、後付け}
2421 %
2422 % \begin{macro}{\frontmatter}
2423 % \begin{macro}{\mainmatter}
2424 % \begin{macro}{\backmatter}
2425 % \changes{v1.1}{1997/01/15}{\cs{frontmatter}, \cs{mainmatter}, \cs{backmatter}
2426 %   を\LaTeX\ の定義に修正}
2427 % 一冊の本は論理的に3つに分割されます。
2428 % 表題や目次や「はじめに」あるいは権利などの前付け、
2429 % そして本文、それから用語集や索引や奥付けなどの後付けです。
2430 %    \begin{macrocode}
2431 %<*book>
2432 \newcommand\frontmatter{%
2433   \if@openright \cleardoublepage \else \clearpage \fi
2434   \@mainmatterfalse\pagenumbering{roman}}
2435 \newcommand{\mainmatter}{%
2436   \if@openright \cleardoublepage \else \clearpage \fi
2437   \@mainmattertrue\pagenumbering{arabic}}
2438 \newcommand{\backmatter}{%
2439   \if@openright \cleardoublepage \else \clearpage \fi
2440   \@mainmatterfalse}
2441 %</book>
2442 %    \end{macrocode}
2443 % \end{macro}
2444 % \end{macro}
2445 % \end{macro}
2446 %
2447 % \subsubsection{ボックスの組み立て}
2448 % クラスファイル定義の、この部分では、|\@startsection|と|\secdef|の
2449 % 二つの内部マクロを使います。これらの構文を次に示します。
2450 %
2451 % |\@startsection|マクロは6つの引数と1つのオプション引数`*'を取ります。
2452 %
2453 %    |\@startsection|\meta{name}\meta{level}\meta{indent}^^A
2454 %                    \meta{beforeskip}\meta{afterskip}\meta{style}
2455 %            optional *\\
2456 %    \null\hphantom{\bslash @startsection}^^A
2457 %            |[|\meta{altheading}|]|\meta{heading}
2458 %
2459 % それぞれの引数の意味は、次のとおりです。
2460 %
2461 % \begin{description}
2462 % \item[\meta{name}] レベルコマンドの名前です(例:section)。
2463 % \item[\meta{level}] 見出しの深さを示す数値です(chapter=1, section=2,
2464 %    $\ldots$)。``\meta{level}$<=$カウンタ\Lcount{secnumdepth}の値''のとき、
2465 %    見出し番号が出力されます。
2466 % \item[\meta{indent}] 見出しに対する、左マージンからのインデント量です。
2467 % \item[\meta{beforeskip}] 見出しの上に置かれる空白の絶対値です。
2468 %    負の場合は、見出しに続くテキストのインデントを抑制します。
2469 % \item[\meta{afterskip}] 正のとき、見出しの後の垂直方向のスペースとなります。
2470 %    負の場合は、見出しの後の水平方向のスペースとなります。
2471 % \item[\meta{style}] 見出しのスタイルを設定するコマンドです。
2472 % \item[\meta{$*$}] 見出し番号を付けないとき、対応するカウンタは増加します。
2473 % \item[\meta{heading}] 新しい見出しの文字列です。
2474 % \end{description}
2475 %
2476 % 見出しコマンドは通常、|\@startsection|と6つの引数で定義されています。
2477 %
2478 % |\secdef|マクロは、
2479 % 見出しコマンドを|\@startsection|を用いないで定義するときに使います。
2480 % このマクロは、2つの引数を持ちます。
2481 %
2482 % |\secdef|\meta{unstarcmds}\meta{starcmds}
2483 %
2484 % \begin{description}
2485 % \item[\meta{unstarcmds}] 見出しコマンドの普通の形式で使われます。
2486 % \item[\meta{starcmds}] $*$形式の見出しコマンドで使われます。
2487 % \end{description}
2488 %
2489 % |\secdef|は次のようにして使うことができます。
2490 % \begin{verbatim}
2491 %    \def\chapter {... \secdef \CMDA \CMDB }
2492 %    \def\CMDA    [#1]#2{....} % \chapter[...]{...} の定義
2493 %    \def\CMDB    #1{....}     % \chapter*{...} の定義
2494 % \end{verbatim}
2495 %
2496 %
2497 % \subsubsection{partレベル}
2498 %
2499 % \begin{macro}{\part}
2500 % このコマンドは、新しいパート(部)をはじめます。
2501 %
2502 % articleクラスの場合は、簡単です。
2503 %
2504 % 新しい段落を開始し、小さな空白を入れ、段落後のインデントをしないようにし、
2505 % |\secdef|で作成します。
2506 %    \begin{macrocode}
2507 %<*article>
2508 \newcommand{\part}{\par\addvspace{4ex}%
2509   \@afterindenttrue
2510   \secdef\@part\@spart}
2511 %</article>
2512 %    \end{macrocode}
2513 % reportとbookスタイルの場合は、少し複雑です。
2514 %
2515 % まず、右ページからはじまるように改ページをします。
2516 % そして、部扉のページスタイルを\pstyle{empty}にします。
2517 % 2段組の場合でも、1段組で作成しますが、後ほど2段組に戻すために、
2518 % |\@restonecol|スイッチを使います。
2519 % \changes{v1.1}{1997/01/15}{\cs{part}を\LaTeX\ の定義に修正}
2520 %    \begin{macrocode}
2521 %<*report|book>
2522 \newcommand{\part}{%
2523   \if@openright \cleardoublepage \else \clearpage \fi
2524   \thispagestyle{empty}%
2525   \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
2526   \null\vfil
2527   \secdef\@part\@spart}
2528 %</report|book>
2529 %    \end{macrocode}
2530 % \end{macro}
2531 %
2532 % \begin{macro}{\@part}
2533 % このマクロが実際に部レベルの見出しを作成します。
2534 % このマクロも文書クラスによって定義が異なります。
2535 %
2536 % articleクラスの場合は、\Lcount{secnumdepth}が$-1$よりも大きいとき、
2537 % 見出し番号を付けます。このカウンタが$-1$以下の場合には付けません。
2538 %    \begin{macrocode}
2539 %<*article>
2540 \def\@part[#1]#2{%
2541   \ifnum \c@secnumdepth >\m@ne
2542     \refstepcounter{part}%
2543     \addcontentsline{toc}{part}{%
2544        \prepartname\thepart\postpartname\hspace{1\zw}#1}%
2545   \else
2546     \addcontentsline{toc}{part}{#1}%
2547   \fi
2548   \markboth{}{}%
2549   {\parindent\z@\raggedright
2550    \interlinepenalty\@M\reset@font
2551    \ifnum \c@secnumdepth >\m@ne
2552      \Large\bfseries\prepartname\thepart\postpartname
2553      \par\nobreak
2554    \fi
2555    \huge\bfseries#2\par}%
2556   \nobreak\vskip3ex\@afterheading}
2557 %</article>
2558 %    \end{macrocode}
2559 %
2560 % reportとbookクラスの場合は、\Lcount{secnumdepth}が$-2$よりも大きいときに、
2561 % 見出し番号を付けます。$-2$以下では付けません。
2562 %
2563 %    \begin{macrocode}
2564 %<*report|book>
2565 \def\@part[#1]#2{%
2566   \ifnum \c@secnumdepth >-2\relax
2567     \refstepcounter{part}%
2568     \addcontentsline{toc}{part}{%
2569        \prepartname\thepart\postpartname\hspace{1em}#1}%
2570   \else
2571     \addcontentsline{toc}{part}{#1}%
2572   \fi
2573   \markboth{}{}%
2574   {\centering
2575    \interlinepenalty\@M\reset@font
2576    \ifnum \c@secnumdepth >-2\relax
2577      \huge\bfseries\prepartname\thepart\postpartname
2578      \par\vskip20\p@
2579    \fi
2580    \Huge\bfseries#2\par}%
2581    \@endpart}
2582 %</report|book>
2583 %    \end{macrocode}
2584 % \end{macro}
2585 %
2586 % \begin{macro}{\@spart}
2587 % このマクロは、番号を付けないときの体裁です。
2588 %    \begin{macrocode}
2589 %<*article>
2590 \def\@spart#1{{%
2591   \parindent\z@\raggedright
2592   \interlinepenalty\@M\reset@font
2593   \huge\bfseries#1\par}%
2594   \nobreak\vskip3ex\@afterheading}
2595 %</article>
2596 %    \end{macrocode}
2597 % \changes{v1.1k}{1998/03/23}{reportとbookクラスで番号を付けない見出しの
2598 %   ペナルティが\cs{M@}だったのを\cs{@M}に修正}
2599 %    \begin{macrocode}
2600 %<*report|book>
2601 \def\@spart#1{{%
2602   \centering
2603   \interlinepenalty\@M\reset@font
2604   \Huge\bfseries#1\par}%
2605   \@endpart}
2606 %</report|book>
2607 %    \end{macrocode}
2608 % \end{macro}
2609 %
2610 % \begin{macro}{\@endpart}
2611 % |\@part|と|\@spart|の最後で実行されるマクロです。
2612 % 両面印刷モードのときは、白ページを追加します。
2613 % 二段組モードのときには、これ以降のページを二段組に戻します。
2614 %    \begin{macrocode}
2615 %<*report|book>
2616 \def\@endpart{\vfil\newpage
2617    \if@twoside\null\thispagestyle{empty}\newpage\fi
2618 %    \end{macrocode}
2619 % 二段組文書のとき、スイッチを二段組モードに戻す必要があります。
2620 %    \begin{macrocode}
2621    \if@tempswa\twocolumn\fi}
2622 %</report|book>
2623 %    \end{macrocode}
2624 % \end{macro}
2625 %
2626 % \subsubsection{chapterレベル}
2627 %
2628 % \begin{macro}{chapter}
2629 % 章レベルは、必ずページの先頭から開始します。
2630 % |openright|オプションが指定されている場合は、右ページからはじまる
2631 % ように|\cleardoublepage|を呼び出します。
2632 % そうでなければ、|\clearpage|を呼び出します。
2633 % なお、縦組の場合でも右ページからはじまるように、
2634 % フォーマットファイルで|\clerdoublepage|が定義されています。
2635 %
2636 % 章見出しが出力されるページのスタイルは、\pstyle{jpl@in}になります。
2637 % \pstyle{jpl@in}は、\pstyle{headnomble}か\pstyle{footnomble}のいずれかです。
2638 % 詳細は、第\ref{sec:pagestyle}節を参照してください。
2639 %
2640 % また、|\@topnum|をゼロにして、
2641 % 章見出しの上にトップフロートが置かれないようにしています。
2642 %    \begin{macrocode}
2643 %<*report|book>
2644 \newcommand{\chapter}{%
2645   \if@openright\cleardoublepage\else\clearpage\fi
2646   \thispagestyle{jpl@in}%
2647   \global\@topnum\z@
2648   \@afterindenttrue
2649   \secdef\@chapter\@schapter}
2650 %    \end{macrocode}
2651 % \end{macro}
2652 %
2653 % \begin{macro}{\@chapter}
2654 % このマクロは、章見出しに番号を付けるときに呼び出されます。
2655 % \Lcount{secnumdepth}が$-1$よりも大きく、
2656 % |\@mainmatter|が真(bookクラスの場合)のときに、番号を出力します。
2657 %    \begin{macrocode}
2658 \def\@chapter[#1]#2{%
2659   \ifnum \c@secnumdepth >\m@ne
2660 %<book>    \if@mainmatter
2661     \refstepcounter{chapter}%
2662     \typeout{\@chapapp\space\thechapter\space\@chappos}%
2663     \addcontentsline{toc}{chapter}%
2664       {\protect\numberline{\@chapapp\thechapter\@chappos}#1}%
2665 %<book>    \else\addcontentsline{toc}{chapter}{#1}\fi
2666   \else
2667     \addcontentsline{toc}{chapter}{#1}%
2668   \fi
2669   \chaptermark{#1}%
2670   \addtocontents{lof}{\protect\addvspace{10\p@}}%
2671   \addtocontents{lot}{\protect\addvspace{10\p@}}%
2672   \@makechapterhead{#2}\@afterheading}
2673 %    \end{macrocode}
2674 % \end{macro}
2675 %
2676 % \begin{macro}{\@makechapterhead}
2677 % このマクロが実際に章見出しを組み立てます。
2678 % \changes{v1.1o}{1998/12/24}{secnumdepthカウンタを$-1$以下にすると、
2679 %   見出し文字列も消えてしまうのを修正}
2680 % \changes{v1.2}{2001/09/04}{\cs{chapter}の出力位置がアスタリスク形式と
2681 %   そうでないときと違うのを修正(ありがとう、鈴木@津さん)}
2682 %    \begin{macrocode}
2683 \def\@makechapterhead#1{\hbox{}%
2684   \vskip2\Cvs
2685   {\parindent\z@
2686    \raggedright
2687    \reset@font\huge\bfseries
2688    \leavevmode
2689    \ifnum \c@secnumdepth >\m@ne
2690      \setlength\@tempdima{\linewidth}%
2691 %<book>    \if@mainmatter
2692      \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1\zw}%
2693      \addtolength\@tempdima{-\wd\z@}%
2694      \unhbox\z@\nobreak
2695 %<book>    \fi
2696      \vtop{\hsize\@tempdima#1}%
2697    \else
2698      #1\relax
2699    \fi}\nobreak\vskip3\Cvs}
2700 %    \end{macrocode}
2701 % \end{macro}
2702 %
2703 % \begin{macro}{\@schapter}
2704 % このマクロは、章見出しに番号を付けないときに呼び出されます。
2705 %    \begin{macrocode}
2706 \def\@schapter#1{%
2707 %<article>  \if@twocolumn\@topnewpage[\@makeschapterhead{#1}]\else
2708   \@makeschapterhead{#1}\@afterheading
2709 %<article>  \fi
2710 }
2711 %    \end{macrocode}
2712 % \end{macro}
2713 %
2714 % \begin{macro}{\@makeschapterhead}
2715 % 番号を付けない場合の形式です。
2716 % \changes{v1.2}{2001/09/04}{\cs{chapter}の出力位置がアスタリスク形式と
2717 %   そうでないときと違うのを修正(ありがとう、鈴木@津さん)}
2718 %    \begin{macrocode}
2719 \def\@makeschapterhead#1{\hbox{}%
2720   \vskip2\Cvs
2721   {\parindent\z@
2722    \raggedright
2723    \reset@font\huge\bfseries
2724    \leavevmode
2725    \setlength\@tempdima{\linewidth}%
2726    \vtop{\hsize\@tempdima#1}}\vskip3\Cvs}
2727 %</report|book>
2728 %    \end{macrocode}
2729 % \end{macro}
2730 %
2731 % \subsubsection{下位レベルの見出し}
2732 %
2733 % \begin{macro}{\section}
2734 % 見出しの前後に空白を付け、|\Large\bfseries|で出力をします。
2735 %    \begin{macrocode}
2736 \newcommand{\section}{\@startsection{section}{1}{\z@}%
2737    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
2738    {.5\Cvs \@plus.3\Cvs}%
2739    {\reset@font\Large\bfseries}}
2740 %    \end{macrocode}
2741 % \end{macro}
2742 %
2743 % \begin{macro}{\subsection}
2744 % 見出しの前後に空白を付け、|\large\bfseries|で出力をします。
2745 %    \begin{macrocode}
2746 \newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
2747    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
2748    {.5\Cvs \@plus.3\Cvs}%
2749    {\reset@font\large\bfseries}}
2750 %    \end{macrocode}
2751 % \end{macro}
2752 %
2753 % \begin{macro}{\subsubsection}
2754 % 見出しの前後に空白を付け、|\normalsize\bfseries|で出力をします。
2755 %    \begin{macrocode}
2756 \newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
2757    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
2758    {.5\Cvs \@plus.3\Cvs}%
2759    {\reset@font\normalsize\bfseries}}
2760 %    \end{macrocode}
2761 % \end{macro}
2762 %
2763 % \begin{macro}{\paragraph}
2764 % 見出しの前に空白を付け、|\normalsize\bfseries|で出力をします。
2765 % 見出しの後ろで改行されません。
2766 %    \begin{macrocode}
2767 \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
2768    {3.25ex \@plus 1ex \@minus .2ex}%
2769    {-1em}%
2770    {\reset@font\normalsize\bfseries}}
2771 %    \end{macrocode}
2772 % \end{macro}
2773 %
2774 % \begin{macro}{\subparagraph}
2775 % 見出しの前に空白を付け、|\normalsize\bfseries|で出力をします。
2776 % 見出しの後ろで改行されません。
2777 %    \begin{macrocode}
2778 \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
2779    {3.25ex \@plus 1ex \@minus .2ex}%
2780    {-1em}%
2781    {\reset@font\normalsize\bfseries}}
2782 %    \end{macrocode}
2783 % \end{macro}
2784 %
2785 %
2786 % \subsubsection{付録}
2787 %
2788 % \begin{macro}{\appendix}
2789 % articleクラスの場合、|\appendix|コマンドは次のことを行ないます。
2790 %
2791 % \begin{itemize}
2792 % \item \Lcount{section}と\Lcount{subsection}カウンタをリセットする。
2793 % \item |\thesection|を英小文字で出力するように再定義する。
2794 % \end{itemize}
2795 %
2796 %    \begin{macrocode}
2797 %<*article>
2798 \newcommand{\appendix}{\par
2799   \setcounter{section}{0}%
2800   \setcounter{subsection}{0}%
2801 %<tate>  \renewcommand{\thesection}{\rensuji{\@Alph\c@section}}}
2802 %<yoko>  \renewcommand{\thesection}{\@Alph\c@section}}
2803 %</article>
2804 %    \end{macrocode}
2805 %
2806 % reportとbookクラスの場合、|\appendix|コマンドは次のことを行ないます。
2807 %
2808 % \begin{itemize}
2809 % \item \Lcount{chapter}と\Lcount{section}カウンタをリセットする。
2810 % \item |\@chapapp|を|\appendixname|に設定する。
2811 % \item |\@chappos|を空にする。
2812 % \item |\thechapter|を英小文字で出力するように再定義する。
2813 % \end{itemize}
2814 %
2815 %    \begin{macrocode}
2816 %<*report|book>
2817 \newcommand{\appendix}{\par
2818   \setcounter{chapter}{0}%
2819   \setcounter{section}{0}%
2820   \renewcommand{\@chapapp}{\appendixname}%
2821   \renewcommand{\@chappos}\space%
2822 %<tate>  \renewcommand{\thechapter}{\rensuji{\@Alph\c@chapter}}}
2823 %<yoko>  \renewcommand{\thechapter}{\@Alph\c@chapter}}
2824 %</report|book>
2825 %    \end{macrocode}
2826 % \end{macro}
2827 %
2828 %
2829 %
2830 % \subsection{リスト環境}
2831 % ここではリスト環境について説明をしています。
2832 %
2833 % リスト環境のデフォルトは次のように設定されます。
2834 %
2835 % まず、|\rigtmargin|, |\listparindent|, |\itemindent|をゼロにします。
2836 % そして、K番目のレベルのリストは|\@listK|で示されるマクロが呼び出されます。
2837 % ここで`K'は小文字のローマ数字で示されます。たとえば、3番目のレベルのリスト
2838 % として|\@listiii|が呼び出されます。
2839 % |\@listK|は|\leftmargin|を|\leftmarginK|に設定します。
2840 %
2841 % \begin{macro}{\leftmargin}
2842 % \begin{macro}{\leftmargini}
2843 % \begin{macro}{\leftmarginii}
2844 % \begin{macro}{\leftmarginiii}
2845 % \begin{macro}{\leftmarginiv}
2846 % \begin{macro}{\leftmarginv}
2847 % \begin{macro}{\leftmarginvi}
2848 % 二段組モードのマージンは少しだけ小さく設定してあります。
2849 %    \begin{macrocode}
2850 \if@twocolumn
2851   \setlength\leftmargini {2em}
2852 \else
2853   \setlength\leftmargini {2.5em}
2854 \fi
2855 %    \end{macrocode}
2856 % 次の3つの値は、|\labelsep|とデフォルトラベル(`(m)', `vii.', `M.')の
2857 % 幅の合計よりも大きくしてあります。
2858 %    \begin{macrocode}
2859 \setlength\leftmarginii  {2.2em}
2860 \setlength\leftmarginiii {1.87em}
2861 \setlength\leftmarginiv  {1.7em}
2862 \if@twocolumn
2863   \setlength\leftmarginv {.5em}
2864   \setlength\leftmarginvi{.5em}
2865 \else
2866   \setlength\leftmarginv {1em}
2867   \setlength\leftmarginvi{1em}
2868 \fi
2869 %    \end{macrocode}
2870 % \end{macro}
2871 % \end{macro}
2872 % \end{macro}
2873 % \end{macro}
2874 % \end{macro}
2875 % \end{macro}
2876 % \end{macro}
2877 %
2878 % \begin{macro}{\labelsep}
2879 % \begin{macro}{\labelwidth}
2880 % |\labelsep|はラベルとテキストの項目の間の距離です。
2881 % |\labelwidth|はラベルの幅です。
2882 %    \begin{macrocode}
2883 \setlength  \labelsep  {.5em}
2884 \setlength  \labelwidth{\leftmargini}
2885 \addtolength\labelwidth{-\labelsep}
2886 %    \end{macrocode}
2887 % \end{macro}
2888 % \end{macro}
2889 %
2890 % \begin{macro}{\@beginparpenalty}
2891 % \begin{macro}{\@endparpenalty}
2892 % これらのペナルティは、リストや段落環境の前後に挿入されます。
2893 % \begin{macro}{\@itempenalty}
2894 % このペナルティは、リスト項目の間に挿入されます。
2895 %    \begin{macrocode}
2896 \@beginparpenalty -\@lowpenalty
2897 \@endparpenalty   -\@lowpenalty
2898 \@itempenalty     -\@lowpenalty
2899 %</article|report|book>
2900 %    \end{macrocode}
2901 % \end{macro}
2902 % \end{macro}
2903 % \end{macro}
2904 %
2905 % \begin{macro}{\partopsep}
2906 % リスト環境の前に空行がある場合、|\parskip|と|\topsep|に|\partopsep|が
2907 % 加えられた値の縦方向の空白が取られます。
2908 %    \begin{macrocode}
2909 %<10pt>\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
2910 %<11pt>\setlength\partopsep{3\p@ \@plus 1\p@ \@minus 1\p@}
2911 %<12pt>\setlength\partopsep{3\p@ \@plus 2\p@ \@minus 2\p@}
2912 %    \end{macrocode}
2913 % \end{macro}
2914 %
2915 % \begin{macro}{\@listi}
2916 % \begin{macro}{\@listI}
2917 % |\@listi|は、|\leftmargin|, |\parsep|, |\topsep|, |\itemsep|などの
2918 % トップレベルの定義をします。
2919 % この定義は、フォントサイズコマンドによって変更されます(たとえば、
2920 % |\small|の中では``小さい''リストパラメータになります)。
2921 %
2922 % このため、|\normalsize|がすべてのパラメータを戻せるように、
2923 % |\@listI|は|\@listi|のコピーを保存するように定義されています。
2924 %    \begin{macrocode}
2925 %<*10pt|11pt|12pt>
2926 \def\@listi{\leftmargin\leftmargini
2927 %<*10pt>
2928   \parsep 4\p@ \@plus2\p@ \@minus\p@
2929   \topsep 8\p@ \@plus2\p@ \@minus4\p@
2930   \itemsep4\p@ \@plus2\p@ \@minus\p@}
2931 %</10pt>
2932 %<*11pt>
2933   \parsep 4.5\p@ \@plus2\p@ \@minus\p@
2934   \topsep 9\p@   \@plus3\p@ \@minus5\p@
2935   \itemsep4.5\p@ \@plus2\p@ \@minus\p@}
2936 %</11pt>
2937 %<*12pt>
2938   \parsep 5\p@  \@plus2.5\p@ \@minus\p@
2939   \topsep 10\p@ \@plus4\p@   \@minus6\p@
2940   \itemsep5\p@  \@plus2.5\p@ \@minus\p@}
2941 %</12pt>
2942 \let\@listI\@listi
2943 %    \end{macrocode}
2944 % ここで、パラメータを初期化しますが、厳密には必要ありません。
2945 %    \begin{macrocode}
2946 \@listi
2947 %    \end{macrocode}
2948 % \end{macro}
2949 % \end{macro}
2950 %
2951 % \begin{macro}{\@listii}
2952 % \begin{macro}{\@listiii}
2953 % \begin{macro}{\@listiv}
2954 % \begin{macro}{\@listv}
2955 % \begin{macro}{\@listvi}
2956 % 下位レベルのリスト環境のパラメータの設定です。
2957 % これらは保存用のバージョンを持たないことと、
2958 % フォントサイズコマンドによって変更されないことに注意をしてください。
2959 % 言い換えれば、このクラスは、本文サイズが
2960 % |\normalsize|で現れるリストの入れ子についてだけ考えています。
2961 %    \begin{macrocode}
2962 \def\@listii{\leftmargin\leftmarginii
2963    \labelwidth\leftmarginii \advance\labelwidth-\labelsep
2964 %<*10pt>
2965    \topsep  4\p@ \@plus2\p@ \@minus\p@
2966    \parsep  2\p@ \@plus\p@  \@minus\p@
2967 %</10pt>
2968 %<*11pt>
2969    \topsep  4.5\p@ \@plus2\p@ \@minus\p@
2970    \parsep  2\p@   \@plus\p@  \@minus\p@
2971 %</11pt>
2972 %<*12pt>
2973    \topsep  5\p@   \@plus2.5\p@ \@minus\p@
2974    \parsep  2.5\p@ \@plus\p@  \@minus\p@
2975 %</12pt>
2976    \itemsep\parsep}
2977 \def\@listiii{\leftmargin\leftmarginiii
2978    \labelwidth\leftmarginiii \advance\labelwidth-\labelsep
2979 %<10pt>   \topsep 2\p@  \@plus\p@\@minus\p@
2980 %<11pt>   \topsep 2\p@  \@plus\p@\@minus\p@
2981 %<12pt>   \topsep 2.5\p@\@plus\p@\@minus\p@
2982    \parsep\z@
2983    \partopsep \p@ \@plus\z@ \@minus\p@
2984    \itemsep\topsep}
2985 \def\@listiv {\leftmargin\leftmarginiv
2986               \labelwidth\leftmarginiv
2987               \advance\labelwidth-\labelsep}
2988 \def\@listv  {\leftmargin\leftmarginv
2989               \labelwidth\leftmarginv
2990               \advance\labelwidth-\labelsep}
2991 \def\@listvi {\leftmargin\leftmarginvi
2992               \labelwidth\leftmarginvi
2993               \advance\labelwidth-\labelsep}
2994 %</10pt|11pt|12pt>
2995 %    \end{macrocode}
2996 % \end{macro}
2997 % \end{macro}
2998 % \end{macro}
2999 % \end{macro}
3000 % \end{macro}
3001 %
3002 %
3003 % \subsubsection{enumerate環境}
3004 % enumerate環境は、カウンタ\Lcount{enumi}, \Lcount{enumii}, \Lcount{enumiii},
3005 % \Lcount{enumiv}を使います。\Lcount{enumN}はN番目のレベルの番号を制御します。
3006 %
3007 % \begin{macro}{\theenumi}
3008 % \begin{macro}{\theenumii}
3009 % \begin{macro}{\theenumiii}
3010 % \begin{macro}{\theenumiv}
3011 % 出力する番号の書式を設定します。
3012 % これらは、すでに\file{ltlists.dtx}で定義されています。
3013 %    \begin{macrocode}
3014 %<*article|report|book>
3015 %<*tate>
3016 \renewcommand{\theenumi}{\rensuji{\@arabic\c@enumi}}
3017 \renewcommand{\theenumii}{\rensuji{(\@alph\c@enumii)}}
3018 \renewcommand{\theenumiii}{\rensuji{\@roman\c@enumiii}}
3019 \renewcommand{\theenumiv}{\rensuji{\@Alph\c@enumiv}}
3020 %</tate>
3021 %<*yoko>
3022 \renewcommand{\theenumi}{\@arabic\c@enumi}
3023 \renewcommand{\theenumii}{\@alph\c@enumii}
3024 \renewcommand{\theenumiii}{\@roman\c@enumiii}
3025 \renewcommand{\theenumiv}{\@Alph\c@enumiv}
3026 %</yoko>
3027 %    \end{macrocode}
3028 % \end{macro}
3029 % \end{macro}
3030 % \end{macro}
3031 % \end{macro}
3032 %
3033 % \begin{macro}{\labelenumi}
3034 % \begin{macro}{\labelenumii}
3035 % \begin{macro}{\labelenumiii}
3036 % \begin{macro}{\labelenumiv}
3037 % enumerate環境のそれぞれの項目のラベルは、
3038 % |\labelenumi| \ldots\ |\labelenumiv|で生成されます。
3039 %    \begin{macrocode}
3040 %<*tate>
3041 \newcommand{\labelenumi}{\theenumi}
3042 \newcommand{\labelenumii}{\theenumii}
3043 \newcommand{\labelenumiii}{\theenumiii}
3044 \newcommand{\labelenumiv}{\theenumiv}
3045 %</tate>
3046 %<*yoko>
3047 \newcommand{\labelenumi}{\theenumi.}
3048 \newcommand{\labelenumii}{(\theenumii)}
3049 \newcommand{\labelenumiii}{\theenumiii.}
3050 \newcommand{\labelenumiv}{\theenumiv.}
3051 %</yoko>
3052 %    \end{macrocode}
3053 % \end{macro}
3054 % \end{macro}
3055 % \end{macro}
3056 % \end{macro}
3057 %
3058 % \begin{macro}{\p@enumii}
3059 % \begin{macro}{\p@enumiii}
3060 % \begin{macro}{\p@enumiv}
3061 % |\ref|コマンドによって、
3062 % enumerate環境のN番目のリスト項目が参照されるときの書式です。
3063 %    \begin{macrocode}
3064 \renewcommand{\p@enumii}{\theenumi}
3065 \renewcommand{\p@enumiii}{\theenumi(\theenumii)}
3066 \renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
3067 %    \end{macrocode}
3068 % \end{macro}
3069 % \end{macro}
3070 % \end{macro}
3071 %
3072 % \begin{environment}{enumerate}
3073 % \changes{v1.1q}{1999/05/18}{縦組時のみに設定するようにした}
3074 % トップレベルで使われたときに、最初と最後に半行分のスペースを開けるように、
3075 % 変更します。この環境は、\file{ltlists.dtx}で定義されています。
3076 %
3077 %    \begin{macrocode}
3078 \renewenvironment{enumerate}
3079   {\ifnum \@enumdepth >\thr@@\@toodeep\else
3080    \advance\@enumdepth\@ne
3081    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
3082    \list{\csname label\@enumctr\endcsname}{%
3083       \ifnum\ltjgetparameter{direction}=3
3084          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
3085            \else\topsep\z@\fi
3086          \parskip\z@ \itemsep\z@ \parsep\z@
3087          \labelwidth1\zw \labelsep.3\zw
3088          \ifnum \@enumdepth=\@ne \leftmargin1\zw\relax
3089            \else\leftmargin\leftskip\fi
3090          \advance\leftmargin 1\zw
3091       \fi
3092          \usecounter{\@enumctr}%
3093          \def\makelabel##1{\hss\llap{##1}}}%
3094    \fi}{\endlist}
3095 %    \end{macrocode}
3096 % \end{environment}
3097 %
3098 %
3099 % \subsubsection{itemize環境}
3100 %
3101 % \begin{macro}{\labelitemi}
3102 % \begin{macro}{\labelitemii}
3103 % \begin{macro}{\labelitemiii}
3104 % \begin{macro}{\labelitemiv}
3105 % itemize環境のそれぞれの項目のラベルは、
3106 % |\labelenumi| \ldots\ |\labelenumiv|で生成されます。
3107 % \changes{v1.1a}{1997/01/28}{Bug fix: \cs{labelitemii}.}
3108 %    \begin{macrocode}
3109 \newcommand{\labelitemi}{\textbullet}
3110 \newcommand{\labelitemii}{%
3111   \ifnum\ltjgetparameter{direction}=3
3112      {\textcircled{~}}
3113   \else
3114      {\normalfont\bfseries\textendash}
3115   \fi
3116 }
3117 \newcommand{\labelitemiii}{\textasteriskcentered}
3118 \newcommand{\labelitemiv}{\textperiodcentered}
3119 %    \end{macrocode}
3120 % \end{macro}
3121 % \end{macro}
3122 % \end{macro}
3123 % \end{macro}
3124 %
3125 % \begin{environment}{itemize}
3126 % \changes{v1.0e}{1996/03/14}{縦組時のみに設定するようにした}
3127 % トップレベルで使われたときに、最初と最後に半行分のスペースを開けるように、
3128 % 変更します。この環境は、\file{ltlists.dtx}で定義されています。
3129 %    \begin{macrocode}
3130 \renewenvironment{itemize}
3131   {\ifnum \@itemdepth >\thr@@\@toodeep\else
3132    \advance\@itemdepth\@ne
3133    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
3134    \expandafter
3135    \list{\csname \@itemitem\endcsname}{%
3136       \ifnum\ltjgetparameter{direction}=3
3137          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
3138            \else\topsep\z@\fi
3139          \parskip\z@ \itemsep\z@ \parsep\z@
3140          \labelwidth1\zw \labelsep.3\zw
3141          \ifnum \@itemdepth =\@ne \leftmargin1\zw\relax
3142            \else\leftmargin\leftskip\fi
3143          \advance\leftmargin 1\zw
3144       \fi
3145          \def\makelabel##1{\hss\llap{##1}}}%
3146    \fi}{\endlist}
3147 %    \end{macrocode}
3148 % \end{environment}
3149 %
3150 %
3151 % \subsubsection{description環境}
3152 %
3153 % \begin{environment}{description}
3154 % \changes{v1.0e}{1996/03/14}{\cs{topskip}や\cs{parkip}などの値を縦組時のみに
3155 %        設定するようにした}
3156 % description環境を定義します。
3157 % 縦組時には、インデントが3字分だけ深くなります。
3158 %    \begin{macrocode}
3159 \newenvironment{description}
3160   {\list{}{\labelwidth\z@ \itemindent-\leftmargin
3161    \ifnum\ltjgetparameter{direction}=3
3162      \leftmargin\leftskip \advance\leftmargin3\Cwd
3163      \rightmargin\rightskip
3164      \labelsep=1\zw \itemsep\z@
3165      \listparindent\z@ \topskip\z@ \parskip\z@ \partopsep\z@
3166    \fi
3167            \let\makelabel\descriptionlabel}}{\endlist}
3168 %    \end{macrocode}
3169 % \end{environment}
3170 %
3171 % \begin{macro}{\descriptionlabel}
3172 % ラベルの形式を変更する必要がある場合は、|\descriptionlabel|を
3173 % 再定義してください。
3174 %    \begin{macrocode}
3175 \newcommand{\descriptionlabel}[1]{%
3176    \hspace\labelsep\normalfont\bfseries #1}
3177 %    \end{macrocode}
3178 % \end{macro}
3179 %
3180 %
3181 % \subsubsection{verse環境}
3182 %
3183 % \begin{environment}{verse}
3184 % verse環境は、リスト環境のパラメータを使って定義されています。
3185 % 改行をするには|\\|を用います。|\\|は|\@centercr|に|\let|されています。
3186 %    \begin{macrocode}
3187 \newenvironment{verse}
3188   {\let\\\@centercr
3189    \list{}{\itemsep\z@ \itemindent -1.5em%
3190            \listparindent\itemindent
3191            \rightmargin\leftmargin \advance\leftmargin 1.5em}%
3192            \item\relax}{\endlist}
3193 %    \end{macrocode}
3194 % \end{environment}
3195 %
3196 % \subsubsection{quotation環境}
3197 %
3198 % \begin{environment}{quotation}
3199 % quotation環境もまた、list環境のパラメータを使用して定義されています。
3200 % この環境の各行は、|\textwidth|よりも小さく設定されています。
3201 % この環境における、段落の最初の行はインデントされます。
3202 %    \begin{macrocode}
3203 \newenvironment{quotation}
3204   {\list{}{\listparindent 1.5em%
3205            \itemindent\listparindent
3206            \rightmargin\leftmargin
3207            \parsep\z@ \@plus\p@}%
3208            \item\relax}{\endlist}
3209 %    \end{macrocode}
3210 % \end{environment}
3211 %
3212 % \subsubsection{quote環境}
3213 %
3214 % \begin{environment}{quote}
3215 % quote環境は、段落がインデントされないことを除き、quotation環境と同じです。
3216 %    \begin{macrocode}
3217 \newenvironment{quote}
3218   {\list{}{\rightmargin\leftmargin}%
3219            \item\relax}{\endlist}
3220 %    \end{macrocode}
3221 % \end{environment}
3222 %
3223 %
3224 %
3225 % \subsection{フロート}
3226 %
3227 % \file{ltfloat.dtx}では、フロートオブジェクトを操作するためのツールしか
3228 % 定義していません。タイプが\texttt{TYPE}のフロートオブジェクトを
3229 % 扱うマクロを定義するには、次の変数が必要です。
3230 %
3231 % \begin{description}
3232 % \item[\texttt{\bslash fps@TYPE}]
3233 %   タイプ\texttt{TYPE}のフロートを置くデフォルトの位置です。
3234 %
3235 % \item[\texttt{\bslash ftype@TYPE}]
3236 %   タイプ\texttt{TYPE}のフロートの番号です。
3237 %   各\texttt{TYPE}には、一意な、2の倍数の\texttt{TYPE}番号を割り当てます。
3238 %   たとえば、図が番号1ならば、表は2です。次のタイプは4となります。
3239 %
3240 % \item[\texttt{\bslash ext@TYPE}]
3241 %   タイプ\texttt{TYPE}のフロートの目次を出力するファイルの拡張子です。
3242 %   たとえば、|\ext@figure|は`lot'です。
3243 %
3244 % \item[\texttt{\bslash fnum@TYPE}]
3245 %   キャプション用の図番号を生成するマクロです。
3246 %   たとえば、|\fnum@figure|は`図|\thefigure|'を作ります。
3247 % \end{description}
3248 %
3249 % \subsubsection{figure環境}
3250 % ここでは、figure環境を実装しています。
3251 %
3252 % \begin{macro}{\c@figure}
3253 % \begin{macro}{\thefigure}
3254 % 図番号です。
3255 %    \begin{macrocode}
3256 %<article>\newcounter{figure}
3257 %<report|book>\newcounter{figure}[chapter]
3258 %<*tate>
3259 %<article>\renewcommand{\thefigure}{\rensuji{\@arabic\c@figure}}
3260 %    \end{macrocode}
3261 % \changes{v1.1d}{1997/02/14}{\cs{ifnum}文の構文エラーを訂正。}
3262 %    \begin{macrocode}
3263 %<*report|book>
3264 \renewcommand{\thefigure}{%
3265   \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@figure}}
3266 %</report|book>
3267 %</tate>
3268 %<*yoko>
3269 %<article>\renewcommand{\thefigure}{\@arabic\c@figure}
3270 %<*report|book>
3271 \renewcommand{\thefigure}{%
3272   \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@figure}
3273 %</report|book>
3274 %</yoko>
3275 %    \end{macrocode}
3276 % \end{macro}
3277 % \end{macro}
3278 %
3279 % \begin{macro}{\fps@figure}
3280 % \begin{macro}{\ftype@figure}
3281 % \begin{macro}{\ext@figure}
3282 % \begin{macro}{\fnum@figure}
3283 % フロートオブジェクトタイプ``figure''のためのパラメータです。
3284 %    \begin{macrocode}
3285 \def\fps@figure{tbp}
3286 \def\ftype@figure{1}
3287 \def\ext@figure{lof}
3288 %<tate>\def\fnum@figure{\figurename\thefigure}
3289 %<yoko>\def\fnum@figure{\figurename~\thefigure}
3290 %    \end{macrocode}
3291 % \end{macro}
3292 % \end{macro}
3293 % \end{macro}
3294 % \end{macro}
3295 %
3296 % \begin{environment}{figure}
3297 % \begin{environment}{figure*}
3298 % |*|形式は2段抜きのフロートとなります。
3299 %    \begin{macrocode}
3300 \newenvironment{figure}
3301                {\@float{figure}}
3302                {\end@float}
3303 \newenvironment{figure*}
3304                {\@dblfloat{figure}}
3305                {\end@dblfloat}
3306 %    \end{macrocode}
3307 % \end{environment}
3308 % \end{environment}
3309 %
3310 % \subsubsection{table環境}
3311 % ここでは、table環境を実装しています。
3312 %
3313 % \begin{macro}{\c@table}
3314 % \begin{macro}{\thetable}
3315 % \changes{v1.1n}{1998/10/13}
3316 %    {report, bookクラスでchapterカウンタを考慮していなかったのを修正。
3317 %     ありがとう、平川@慶應大さん。}
3318 % 表番号です。
3319 %    \begin{macrocode}
3320 %<article>\newcounter{table}
3321 %<report|book>\newcounter{table}[chapter]
3322 %<*tate>
3323 %<article>\renewcommand{\thetable}{\rensuji{\@arabic\c@table}}
3324 %<*report|book>
3325 \renewcommand{\thetable}{%
3326   \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@table}}
3327 %</report|book>
3328 %</tate>
3329 %<*yoko>
3330 %<article>\renewcommand{\thetable}{\@arabic\c@table}
3331 %<*report|book>
3332 \renewcommand{\thetable}{%
3333   \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@table}
3334 %</report|book>
3335 %</yoko>
3336 %    \end{macrocode}
3337 % \end{macro}
3338 % \end{macro}
3339 %
3340 % \begin{macro}{\fps@table}
3341 % \begin{macro}{\ftype@table}
3342 % \begin{macro}{\ext@table}
3343 % \begin{macro}{\fnum@table}
3344 % フロートオブジェクトタイプ``table''のためのパラメータです。
3345 %    \begin{macrocode}
3346 \def\fps@table{tbp}
3347 \def\ftype@table{2}
3348 \def\ext@table{lot}
3349 %<tate>\def\fnum@table{\tablename\thetable}
3350 %<yoko>\def\fnum@table{\tablename~\thetable}
3351 %    \end{macrocode}
3352 % \end{macro}
3353 % \end{macro}
3354 % \end{macro}
3355 % \end{macro}
3356 %
3357 % \begin{environment}{table}
3358 % \begin{environment}{table*}
3359 % |*|形式は2段抜きのフロートとなります。
3360 %    \begin{macrocode}
3361 \newenvironment{table}
3362                {\@float{table}}
3363                {\end@float}
3364 \newenvironment{table*}
3365                {\@dblfloat{table}}
3366                {\end@dblfloat}
3367 %    \end{macrocode}
3368 % \end{environment}
3369 % \end{environment}
3370 %
3371 % \subsection{キャプション}
3372 %
3373 % \begin{macro}{\@makecaption}
3374 % |\caption|コマンドは、キャプションを組み立てるために|\@mkcaption|を呼出ます。
3375 % このコマンドは二つの引数を取ります。
3376 % 一つは、\meta{number}で、フロートオブジェクトの番号です。
3377 % もう一つは、\meta{text}でキャプション文字列です。
3378 % \meta{number}には通常、`図 3.2'のような文字列が入っています。
3379 % このマクロは、|\parbox|の中で呼び出されます。書体は|\normalsize|です。
3380 %
3381 % \begin{macro}{\abovecaptionskip}
3382 % \begin{macro}{\belowcaptionskip}
3383 % これらの長さはキャプションの前後に挿入されるスペースです。
3384 %    \begin{macrocode}
3385 \newlength\abovecaptionskip
3386 \newlength\belowcaptionskip
3387 \setlength\abovecaptionskip{10\p@}
3388 \setlength\belowcaptionskip{0\p@}
3389 %    \end{macrocode}
3390 % \end{macro}
3391 % \end{macro}
3392 %
3393 % キャプション内で複数の段落を作成することができるように、
3394 % このマクロは|\long|で定義をします。
3395 %    \begin{macrocode}
3396 \long\def\@makecaption#1#2{%
3397   \vskip\abovecaptionskip
3398   \ifnum\ltjgetparameter{direction}=3 \sbox\@tempboxa{#1\hskip1\zw#2}%
3399     \else\sbox\@tempboxa{#1: #2}%
3400   \fi
3401   \ifdim \wd\@tempboxa >\hsize
3402     \ifnum\ltjgetparameter{direction}=3  #1\hskip1\zw#2\relax\par
3403       \else #1: #2\relax\par\fi
3404   \else
3405     \global \@minipagefalse
3406     \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
3407   \fi
3408   \vskip\belowcaptionskip}
3409 %    \end{macrocode}
3410 % \end{macro}
3411 %
3412 % \subsection{コマンドパラメータの設定}
3413 %
3414 % \subsubsection{arrayとtabular環境}
3415 %
3416 % \begin{macro}{\arraycolsep}
3417 % array環境のカラムは2|\arraycolsep|で分離されます。
3418 %    \begin{macrocode}
3419 \setlength\arraycolsep{5\p@}
3420 %    \end{macrocode}
3421 % \end{macro}
3422 %
3423 % \begin{macro}{\tabcolsep}
3424 % tabular環境のカラムは2|\tabcolsep|で分離されます。
3425 %    \begin{macrocode}
3426 \setlength\tabcolsep{6\p@}
3427 %    \end{macrocode}
3428 % \end{macro}
3429 %
3430 % \begin{macro}{\arrayrulewidth}
3431 % arrayとtabular環境内の罫線の幅です。
3432 %    \begin{macrocode}
3433 \setlength\arrayrulewidth{.4\p@}
3434 %    \end{macrocode}
3435 % \end{macro}
3436 %
3437 % \begin{macro}{\doublerulesep}
3438 % arrayとtabular環境内の罫線間を調整する空白です。
3439 %    \begin{macrocode}
3440 \setlength\doublerulesep{2\p@}
3441 %    \end{macrocode}
3442 % \end{macro}
3443 %
3444 % \subsubsection{tabbing環境}
3445 %
3446 % \begin{macro}{\tabbingsep}
3447 % |\'|コマンドで置かれるスペースを制御します。
3448 %    \begin{macrocode}
3449 \setlength\tabbingsep{\labelsep}
3450 %    \end{macrocode}
3451 % \end{macro}
3452 %
3453 % \subsubsection{minipage環境}
3454 %
3455 % \begin{macro}{\@mpfootins}
3456 % minipageにも脚注を付けることができます。
3457 % |\skip||\@mpfootins|は、通常の|\skip||\footins|と同じような動作をします。
3458 %    \begin{macrocode}
3459 \skip\@mpfootins = \skip\footins
3460 %    \end{macrocode}
3461 % \end{macro}
3462 %
3463 % \subsubsection{framebox環境}
3464 %
3465 % \begin{macro}{\fboxsep}
3466 % \begin{macro}{\fboxrule}
3467 % |\fboxsep|は、|\fbox|と|\framebox|での、
3468 % テキストとボックスの間に入る空白です。
3469 % |\fboxrule|は|\fbox|と|\framebox|で作成される罫線の幅です。
3470 %    \begin{macrocode}
3471 \setlength\fboxsep{3\p@}
3472 \setlength\fboxrule{.4\p@}
3473 %    \end{macrocode}
3474 % \end{macro}
3475 % \end{macro}
3476 %
3477 % \subsubsection{equationとeqnarray環境}
3478 %
3479 % \begin{macro}{\theequation}
3480 % equationカウンタは、新しい章の開始でリセットされます。
3481 % また、equation番号には、章番号が付きます。
3482 %
3483 % このコードは|\chapter|定義の後、より正確にはchapterカウンタの定義の後、
3484 % でなくてはいけません。
3485 %    \begin{macrocode}
3486 %<article>\renewcommand{\theequation}{\@arabic\c@equation}
3487 %<*report|book>
3488 \@addtoreset{equation}{chapter}
3489 \renewcommand{\theequation}{%
3490   \ifnum\c@chapter>\z@\thechapter.\fi \@arabic\c@equation}
3491 %</report|book>
3492 %    \end{macrocode}
3493 % \end{macro}
3494 %
3495 %
3496 % \section{フォントコマンド}
3497 % まず、数式内に日本語を直接、記述するために数式記号用文字に
3498 % ``JY3/mc/m/n''を登録します。数式バージョンがboldの場合は、
3499 % ``JY3/gt/m/n''を用います。
3500 % これらは、|\mathmc|, |\mathgt|として登録されます。
3501 % また、日本語数式ファミリとして|\symmincho|がこの段階で設定されます。
3502 % |mathrmmc|オプションが指定されていた場合には、これに引き続き
3503 % |\mathrm|と|\mathbf|を和欧文両対応にするための作業がなされます。この際、
3504 % 他のマクロとの衝突を避けるため|\AtBeginDocument|
3505 % を用いて展開順序を遅らせる必要があります。
3506 %
3507 %   \textbf{変更}
3508 %
3509 % \changes{v1.6}{2006/06/27}{フォントコマンドを修正。ありがとう、ymtさん。}
3510 %    \LaTeX{} 2.09
3511 %    compatibility mode では和文数式フォントfamが2重定義されていた
3512 %    ので、その部分を変更しました。
3513 %    \begin{macrocode}
3514 \if@compatibility\else
3515   \DeclareSymbolFont{mincho}{JY3}{mc}{m}{n}
3516   \DeclareSymbolFontAlphabet{\mathmc}{mincho}
3517   \SetSymbolFont{mincho}{bold}{JY3}{gt}{m}{n}
3518   \jfam\symmincho
3519   \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n}
3520 \fi
3521 \if@mathrmmc
3522   \AtBeginDocument{%
3523   \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
3524   \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}
3525 }%
3526 \fi
3527 %    \end{macrocode}
3528 %
3529 % ここでは\LaTeX~2.09で一般的に使われていたコマンドを定義しています。
3530 % これらのコマンドはテキストモードと数式モードの\emph{どちらでも}動作します。
3531 % これらは互換性のために提供をしますが、できるだけ|\text...|と|\math...|を
3532 % 使うようにしてください。
3533 %
3534 % \begin{macro}{\mc}
3535 % \begin{macro}{\gt}
3536 % \begin{macro}{\rm}
3537 % \begin{macro}{\sf}
3538 % \begin{macro}{\tt}
3539 % これらのコマンドはフォントファミリを変更します。
3540 % 互換モードの同名コマンドと異なり、すべてのコマンドがデフォルトフォントに
3541 % リセットしてから、対応する属性を変更することに注意してください。
3542 %    \begin{macrocode}
3543 \DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
3544 \DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
3545 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
3546 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
3547 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
3548 %    \end{macrocode}
3549 % \end{macro}
3550 % \end{macro}
3551 % \end{macro}
3552 % \end{macro}
3553 % \end{macro}
3554 %
3555 % \begin{macro}{\bf}
3556 % このコマンドはボールド書体にします。ノーマル書体に変更するには、
3557 % |\mdseries|と指定をします。
3558 %    \begin{macrocode}
3559 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
3560 %    \end{macrocode}
3561 % \end{macro}
3562 %
3563 % \begin{macro}{\it}
3564 % \begin{macro}{\sl}
3565 % \begin{macro}{\sc}
3566 % これらのコマンドはフォントシェイプを切替えます。
3567 % スラント体とスモールキャップの数式アルファベットはありませんので、
3568 % 数式モードでは何もしませんが、警告メッセージを出力します。
3569 % |\upshape|コマンドで通常のシェイプにすることができます。
3570 %    \begin{macrocode}
3571 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
3572 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
3573 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
3574 %    \end{macrocode}
3575 % \end{macro}
3576 % \end{macro}
3577 % \end{macro}
3578 %
3579 % \begin{macro}{\cal}
3580 % \begin{macro}{\mit}
3581 % これらのコマンドは数式モードでだけ使うことができます。
3582 % 数式モード以外では何もしません。
3583 % 現在のNFSSは、これらのコマンドが警告を生成するように定義していますので、
3584 % `手ずから'定義する必要があります。
3585 %    \begin{macrocode}
3586 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
3587 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
3588 %    \end{macrocode}
3589 % \end{macro}
3590 % \end{macro}
3591 %
3592 %
3593 %
3594 % \section{相互参照}
3595 %
3596 % \subsection{目次}
3597 % |\section|コマンドは、\file{.toc}ファイルに、次のような行を出力します。
3598 %
3599 % |\contentsline{section}{|\meta{title}|}{|\meta{page}|}|
3600 %
3601 % \meta{title}には項目が、\meta{page}にはページ番号が入ります。
3602 % |\section|に見出し番号が付く場合は、\meta{title}は、
3603 % |\numberline{|\meta{num}|}{|\meta{heading}|}|となります。
3604 % \meta{num}は|\thesection|コマンドで生成された見出し番号です。
3605 % \meta{heading}は見出し文字列です。この他の見出しコマンドも同様です。
3606 %
3607 % figure環境での|\caption|コマンドは、\file{.lof}ファイルに、
3608 % 次のような行を出力します。
3609 %
3610 % |\contentsline{figure}{\numberline{|\meta{num}|}{|%
3611 %                              \meta{caption}|}}{|\meta{page}|}|
3612 %
3613 % \meta{num}は、|\thefigure|コマンドで生成された図番号です。
3614 % \meta{caption}は、キャプション文字列です。table環境も同様です。
3615 %
3616 % |\contentsline{|\meta{name}|}|コマンドは、|\l@|\meta{name}に展開されます。
3617 % したがって、目次の体裁を記述するには、|\l@chapter|, |\l@section|などを
3618 % 定義します。図目次のためには|\l@figure|です。
3619 % これらの多くのコマンドは|\@dottedtocline|コマンドで定義されています。
3620 % このコマンドは次のような書式となっています。
3621 %
3622 % |\@dottedtocline{|\meta{level}|}{|\meta{indent}|}{|^^A
3623 %        \meta{numwidth}|}{|\meta{title}|}{|\meta{page}|}|
3624 %
3625 % \begin{description}
3626 % \item[\meta{level}] ``\meta{level} $<=$ \Lcount{tocdepth}''のときにだけ、
3627 %   生成されます。|\chapter|はレベル0、|\section|はレベル1、$\ldots$ です。
3628 % \item[\meta{indent}] 一番外側からの左マージンです。
3629 % \item[\meta{numwidth}] 見出し番号(|\numberline|コマンドの\meta{num})が
3630 %   入るボックスの幅です。
3631 % \end{description}
3632 %
3633 % \begin{macro}{\c@tocdepth}
3634 % \Lcount{tocdepth}は、目次ページに出力をする見出しレベルです。
3635 %    \begin{macrocode}
3636 %<article>\setcounter{tocdepth}{3}
3637 %<!article>\setcounter{tocdepth}{2}
3638 %    \end{macrocode}
3639 % \end{macro}
3640 %
3641 % また、目次を生成するために次のパラメータも使います。
3642 %
3643 % \begin{macro}{\@pnumwidth}
3644 % ページ番号の入るボックスの幅です。
3645 %    \begin{macrocode}
3646 \newcommand{\@pnumwidth}{1.55em}
3647 %    \end{macrocode}
3648 % \end{macro}
3649 %
3650 % \begin{macro}{\@tocmarg}
3651 % 複数行にわたる場合の右マージンです。
3652 %    \begin{macrocode}
3653 \newcommand{\@tocrmarg}{2.55em}
3654 %    \end{macrocode}
3655 % \end{macro}
3656 %
3657 % \begin{macro}{\@dotsep}
3658 % ドットの間隔(mu単位)です。2や1.7のように指定をします。
3659 %    \begin{macrocode}
3660 \newcommand{\@dotsep}{4.5}
3661 %    \end{macrocode}
3662 % \end{macro}
3663 %
3664 % \begin{macro}{\toclineskip}
3665 % この長さ変数は、目次項目の間に入るスペースの長さです。
3666 % デフォルトはゼロとなっています。縦組のとき、スペースを少し広げます。
3667 %    \begin{macrocode}
3668 \newdimen\toclineskip
3669 %<yoko>\setlength\toclineskip{\z@}
3670 %<tate>\setlength\toclineskip{2\p@}
3671 %    \end{macrocode}
3672 % \end{macro}
3673 %
3674 % \begin{macro}{\numberline}
3675 % \begin{macro}{\@lnumwidth}
3676 % |\numberline|マクロの定義を示します。オリジナルの定義では、ボックスの幅を
3677 % |\@tempdima|にしていますが、この変数はいろいろな箇所で使われますので、
3678 % 期待した値が入らない場合があります。
3679 %
3680 % たとえば、|lltjfont.sty|での|\selectfont|は、和欧文のベースラインを調整する
3681 % ために|\@tempdima|変数を用いています。そのため、|\l@...|マクロの中で
3682 % フォントを切替えると、|\numberline|マクロのボックス
3683 % の幅が、ベースラインを調整するときに計算した値になってしまいます。
3684 %
3685 % フォント選択コマンドの後、あるいは|\numberline|マクロの中でフォントを
3686 % 切替えてもよいのですが、一時変数を意識したくないので、
3687 % 見出し番号の入るボックスを|\@lnumwidth|変数を用いて組み立てるように
3688 % |\numberline|マクロを再定義します。
3689 %    \begin{macrocode}
3690 \newdimen\@lnumwidth
3691 \def\numberline#1{\hbox to\@lnumwidth{#1\hfil}}
3692 %    \end{macrocode}
3693 % \end{macro}
3694 % \end{macro}
3695 %
3696 % \begin{macro}{\@dottedtocline}
3697 % 目次の各行間に|\toclineskip|を入れるように変更します。
3698 % このマクロは\file{ltsect.dtx}で定義されています。
3699 % \changes{v1.3}{2001/10/04}{第5引数の書体を\cs{rmfamily}から\cs{normalfont}に変更}
3700 %    \begin{macrocode}
3701 \def\@dottedtocline#1#2#3#4#5{%
3702   \ifnum #1>\c@tocdepth \else
3703     \vskip\toclineskip \@plus.2\p@
3704     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
3705      \parindent #2\relax\@afterindenttrue
3706      \interlinepenalty\@M
3707      \leavevmode
3708      \@lnumwidth #3\relax
3709      \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip
3710      {#4}\nobreak
3711      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}%
3712      \hfill\nobreak
3713      \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}%
3714      \par}%
3715   \fi}
3716 %    \end{macrocode}
3717 % \end{macro}
3718 %
3719 % \begin{macro}{\addcontentsline}
3720 % ページ番号を|\rensuji|で囲むように変更します。
3721 % 横組のときにも`|\rensuji|'コマンドが出力されますが、
3722 % このコマンドによる影響はありません。
3723 %
3724 % このマクロは\file{ltsect.dtx}で定義されています。
3725 %    \begin{macrocode}
3726 \def\addcontentsline#1#2#3{%
3727   \protected@write\@auxout
3728     {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
3729 %<tate>\@temptokena{\rensuji{\thepage}}}%
3730 %<yoko>\@temptokena{\thepage}}%
3731     {\string\@writefile{#1}%
3732        {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
3733 }
3734 %    \end{macrocode}
3735 % \end{macro}
3736 %
3737 %
3738 % \subsubsection{本文目次}
3739 %
3740 % \begin{macro}{\tableofcontents}
3741 % 目次を生成します。
3742 %    \begin{macrocode}
3743 \newcommand{\tableofcontents}{%
3744 %<*report|book>
3745   \if@twocolumn\@restonecoltrue\onecolumn
3746   \else\@restonecolfalse\fi
3747 %</report|book>
3748 %<article>  \section*{\contentsname
3749 %<!article>  \chapter*{\contentsname
3750     \@mkboth{\contentsname}{\contentsname}%
3751   }\@starttoc{toc}%
3752 %<report|book>  \if@restonecol\twocolumn\fi
3753 }
3754 %    \end{macrocode}
3755 % \end{macro}
3756 %
3757 % \begin{macro}{\l@part}
3758 % partレベルの目次です。
3759 %    \begin{macrocode}
3760 \newcommand*{\l@part}[2]{%
3761   \ifnum \c@tocdepth >-2\relax
3762 %<article>    \addpenalty{\@secpenalty}%
3763 %<!article>    \addpenalty{-\@highpenalty}%
3764     \addvspace{2.25em \@plus\p@}%
3765     \begingroup
3766     \parindent\z@\rightskip\@pnumwidth
3767     \parfillskip-\@pnumwidth
3768     {\leavevmode\large\bfseries
3769      \setlength\@lnumwidth{4\zw}%
3770      #1\hfil\nobreak
3771      \hbox to\@pnumwidth{\hss#2}}\par
3772     \nobreak
3773 %<article>    \if@compatibility
3774     \global\@nobreaktrue
3775     \everypar{\global\@nobreakfalse\everypar{}}%
3776 %<article>    \fi
3777      \endgroup
3778   \fi}
3779 %    \end{macrocode}
3780 % \end{macro}
3781 %
3782 % \begin{macro}{\l@chapter}
3783 % chapterレベルの目次です。
3784 %    \begin{macrocode}
3785 %<*report|book>
3786 \newcommand*{\l@chapter}[2]{%
3787   \ifnum \c@tocdepth >\m@ne
3788     \addpenalty{-\@highpenalty}%
3789     \addvspace{1.0em \@plus\p@}%
3790     \begingroup
3791       \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
3792       \leavevmode\bfseries
3793       \setlength\@lnumwidth{4\zw}%
3794       \advance\leftskip\@lnumwidth \hskip-\leftskip
3795       #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par
3796       \penalty\@highpenalty
3797     \endgroup
3798   \fi}
3799 %</report|book>
3800 %    \end{macrocode}
3801 % \end{macro}
3802 %
3803 % \begin{macro}{\l@section}
3804 % sectionレベルの目次です。
3805 %    \begin{macrocode}
3806 %<*article>
3807 \newcommand*{\l@section}[2]{%
3808   \ifnum \c@tocdepth >\z@
3809     \addpenalty{\@secpenalty}%
3810     \addvspace{1.0em \@plus\p@}%
3811     \begingroup
3812       \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
3813       \leavevmode\bfseries
3814       \setlength\@lnumwidth{1.5em}%
3815       \advance\leftskip\@lnumwidth \hskip-\leftskip
3816       #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par
3817     \endgroup
3818   \fi}
3819 %</article>
3820 %    \end{macrocode}
3821 %
3822 %    \begin{macrocode}
3823 %<*report|book>
3824 %<tate>\newcommand*{\l@section}{\@dottedtocline{1}{1\zw}{4\zw}}
3825 %<yoko>\newcommand*{\l@section}{\@dottedtocline{1}{1.5em}{2.3em}}
3826 %</report|book>
3827 %    \end{macrocode}
3828 % \end{macro}
3829 %
3830 % \begin{macro}{\l@subsection}
3831 % \begin{macro}{\l@subsubsection}
3832 % \begin{macro}{\l@paragraph}
3833 % \begin{macro}{\l@subparagraph}
3834 % 下位レベルの目次項目の体裁です。
3835 %    \begin{macrocode}
3836 %<*tate>
3837 %<*article>
3838 \newcommand*{\l@subsection}   {\@dottedtocline{2}{1\zw}{4\zw}}
3839 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{2\zw}{6\zw}}
3840 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{3\zw}{8\zw}}
3841 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{4\zw}{9\zw}}
3842 %</article>
3843 %<*report|book>
3844 \newcommand*{\l@subsection}   {\@dottedtocline{2}{2\zw}{6\zw}}
3845 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{3\zw}{8\zw}}
3846 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{4\zw}{9\zw}}
3847 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{5\zw}{10\zw}}
3848 %</report|book>
3849 %</tate>
3850 %<*yoko>
3851 %<*article>
3852 \newcommand*{\l@subsection}   {\@dottedtocline{2}{1.5em}{2.3em}}
3853 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{3.8em}{3.2em}}
3854 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{7.0em}{4.1em}}
3855 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{10em}{5em}}
3856 %</article>
3857 %<*report|book>
3858 \newcommand*{\l@subsection}   {\@dottedtocline{2}{3.8em}{3.2em}}
3859 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{7.0em}{4.1em}}
3860 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{10em}{5em}}
3861 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{12em}{6em}}
3862 %</report|book>
3863 %</yoko>
3864 %    \end{macrocode}
3865 % \end{macro}
3866 % \end{macro}
3867 % \end{macro}
3868 % \end{macro}
3869 %
3870 %
3871 % \subsubsection{図目次と表目次}
3872 %
3873 % \begin{macro}{\listoffigures}
3874 % 図の一覧を作成します。
3875 %    \begin{macrocode}
3876 \newcommand{\listoffigures}{%
3877 %<*report|book>
3878   \if@twocolumn\@restonecoltrue\onecolumn
3879   \else\@restonecolfalse\fi
3880   \chapter*{\listfigurename
3881 %</report|book>
3882 %<article>    \section*{\listfigurename
3883   \@mkboth{\listfigurename}{\listfigurename}}%
3884   \@starttoc{lof}%
3885 %<report|book>  \if@restonecol\twocolumn\fi
3886 }
3887 %    \end{macrocode}
3888 % \end{macro}
3889 %
3890 % \begin{macro}{\l@figure}
3891 % 図目次の体裁です。
3892 %    \begin{macrocode}
3893 %<tate>\newcommand*{\l@figure}{\@dottedtocline{1}{1\zw}{4\zw}}
3894 %<yoko>\newcommand*{\l@figure}{\@dottedtocline{1}{1.5em}{2.3em}}
3895 %    \end{macrocode}
3896 % \end{macro}
3897 %
3898 % \begin{macro}{\listoftables}
3899 % \changes{v1.0c}{1995/12/28}{fix the \cs{listoftable} typo.}
3900 % 表の一覧を作成します。
3901 %    \begin{macrocode}
3902 \newcommand{\listoftables}{%
3903 %<*report|book>
3904   \if@twocolumn\@restonecoltrue\onecolumn
3905   \else\@restonecolfalse\fi
3906   \chapter*{\listtablename
3907 %</report|book>
3908 %<article>    \section*{\listtablename
3909   \@mkboth{\listtablename}{\listtablename}}%
3910   \@starttoc{lot}%
3911 %<report|book>  \if@restonecol\twocolumn\fi
3912 }
3913 %    \end{macrocode}
3914 % \end{macro}
3915 %
3916 % \begin{macro}{\l@table}
3917 % 表目次の体裁は、図目次と同じにします。
3918 %    \begin{macrocode}
3919 \let\l@table\l@figure
3920 %    \end{macrocode}
3921 % \end{macro}
3922 %
3923 %
3924 % \subsection{参考文献}
3925 %
3926 % \begin{macro}{\bibindent}
3927 % オープンスタイルの参考文献で使うインデント幅です。
3928 %    \begin{macrocode}
3929 \newdimen\bibindent
3930 \setlength\bibindent{1.5em}
3931 %    \end{macrocode}
3932 % \end{macro}
3933 %
3934 % \begin{macro}{\newblock}
3935 % |\newblock|のデフォルト定義は、小さなスペースを生成します。
3936 %    \begin{macrocode}
3937 \newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
3938 %    \end{macrocode}
3939 % \end{macro}
3940 %
3941 % \begin{environment}{thebibliography}
3942 % 参考文献や関連図書のリストを作成します。
3943 %    \begin{macrocode}
3944 \newenvironment{thebibliography}[1]
3945 %<article>{\section*{\refname\@mkboth{\refname}{\refname}}%
3946 %<report|book>{\chapter*{\bibname\@mkboth{\bibname}{\bibname}}%
3947    \list{\@biblabel{\@arabic\c@enumiv}}%
3948         {\settowidth\labelwidth{\@biblabel{#1}}%
3949          \leftmargin\labelwidth
3950          \advance\leftmargin\labelsep
3951          \@openbib@code
3952          \usecounter{enumiv}%
3953          \let\p@enumiv\@empty
3954          \renewcommand\theenumiv{\@arabic\c@enumiv}}%
3955    \sloppy
3956 %    \end{macrocode}
3957 % \changes{v1.1a}{1997/01/23}{\LaTeX\ \texttt{!<1996/12/01!>}に合わせて修正}
3958 %    \begin{macrocode}
3959    \clubpenalty4000
3960    \@clubpenalty\clubpenalty
3961    \widowpenalty4000%
3962    \sfcode`\.\@m}
3963   {\def\@noitemerr
3964     {\@latex@warning{Empty `thebibliography' environment}}%
3965    \endlist}
3966 %    \end{macrocode}
3967 % \end{environment}
3968 %
3969 % \begin{macro}{\@openbib@code}
3970 % |\@openbib@code|のデフォルト定義は何もしません。
3971 % この定義は、\Lopt{openbib}オプションによって変更されます。
3972 %    \begin{macrocode}
3973 \let\@openbib@code\@empty
3974 %    \end{macrocode}
3975 % \end{macro}
3976 %
3977 % \begin{macro}{\@biblabel}
3978 %    The label for a |\bibitem[...]| command is produced by this
3979 %    macro. The default from \file{latex.dtx} is used.
3980 %    \begin{macrocode}
3981 % \renewcommand*{\@biblabel}[1]{[#1]\hfill}
3982 %    \end{macrocode}
3983 % \end{macro}
3984 %
3985 % \begin{macro}{\@cite}
3986 %    The output of the |\cite| command is produced by this macro. The
3987 %    default from \file{latex.dtx} is used.
3988 %    \begin{macrocode}
3989 % \renewcommand*{\@cite}[1]{[#1]}
3990 %    \end{macrocode}
3991 % \end{macro}
3992 %
3993 %
3994 % \subsection{索引}
3995 %
3996 % \begin{environment}{theindex}
3997 % 2段組の索引を作成します。
3998 % 索引の先頭のページのスタイルは\pstyle{jpl@in}とします。したがって、
3999 % \pstyle{headings}と\pstyle{bothstyle}に適した位置に出力されます。
4000 %    \begin{macrocode}
4001 \newenvironment{theindex}
4002   {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi
4003    \columnseprule\z@ \columnsep 35\p@
4004 %<article>   \twocolumn[\section*{\indexname}]%
4005 %<report|book>   \twocolumn[\@makeschapterhead{\indexname}]%
4006    \@mkboth{\indexname}{\indexname}%
4007    \thispagestyle{jpl@in}\parindent\z@
4008    \parskip\z@ \@plus .3\p@\relax
4009    \let\item\@idxitem}
4010   {\if@restonecol\onecolumn\else\clearpage\fi}
4011 %    \end{macrocode}
4012 % \end{environment}
4013 %
4014 % \begin{macro}{\@idxitem}
4015 % \begin{macro}{\subitem}
4016 % \begin{macro}{\subsubitem}
4017 % 索引項目の字下げ幅です。|\@idxitem|は|\item|の項目の字下げ幅です。
4018 %    \begin{macrocode}
4019 \newcommand{\@idxitem}{\par\hangindent 40\p@}
4020 \newcommand{\subitem}{\@idxitem \hspace*{20\p@}}
4021 \newcommand{\subsubitem}{\@idxitem \hspace*{30\p@}}
4022 %    \end{macrocode}
4023 % \end{macro}
4024 % \end{macro}
4025 % \end{macro}
4026 %
4027 % \begin{macro}{\indexspace}
4028 % 索引の``文字''見出しの前に入るスペースです。
4029 %    \begin{macrocode}
4030 \newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
4031 %    \end{macrocode}
4032 % \end{macro}
4033 %
4034 %
4035 % \subsection{脚注}
4036 %
4037 % \begin{macro}{\footnoterule}
4038 % 本文と脚注の間に引かれる罫線です。
4039 %    \begin{macrocode}
4040 \renewcommand{\footnoterule}{%
4041   \kern-3\p@
4042   \hrule width .4\columnwidth
4043   \kern 2.6\p@}
4044 %    \end{macrocode}
4045 % \end{macro}
4046 %
4047 % \begin{macro}{\c@footnote}
4048 % reportとbookクラスでは、chapterレベルでリセットされます。
4049 %    \begin{macrocode}
4050 %<!article>\@addtoreset{footnote}{chapter}
4051 %    \end{macrocode}
4052 % \end{macro}
4053 %
4054 % \begin{macro}{\@makefntext}
4055 % このマクロにしたがって脚注が組まれます。
4056 %
4057 % |\@makefnmark|は脚注記号を組み立てるマクロです。
4058 %    \begin{macrocode}
4059 %<*tate>
4060 \newcommand\@makefntext[1]{\parindent 1\zw
4061   \noindent\hbox to 2\zw{\hss\@makefnmark}#1}
4062 %</tate>
4063 %<*yoko>
4064 \newcommand\@makefntext[1]{\parindent 1em
4065   \noindent\hbox to 1.8em{\hss\@makefnmark}#1}
4066 %</yoko>
4067 %    \end{macrocode}
4068 % \end{macro}
4069 %
4070 %
4071 % \section{今日の日付}
4072 % 組版時における現在の日付を出力します。
4073 %
4074 % \iffalse  meta-comment!
4075 %  注意:ここで \DisableCrossrefs, \EnableCrossrefs をしているのは、
4076 %        platex jclasses.dtx で dvi を作るときにエラーになるため。
4077 % \fi
4078 % \DisableCrossrefs
4079 % \begin{macro}{\if西暦}
4080 % \begin{macro}{\西暦}
4081 % \begin{macro}{\和暦}
4082 % \changes{v1.0h}{1996/12/17}{Typo:和歴 to 和暦}
4083 % |\today|コマンドの`年'を、
4084 % 西暦か和暦のどちらで出力するかを指定するコマンドです。
4085 %    \begin{macrocode}
4086 \newif\if西暦 \西暦false
4087 \def\西暦{\西暦true}
4088 \def\和暦{\西暦false}
4089 %    \end{macrocode}
4090 % \end{macro}
4091 % \end{macro}
4092 % \end{macro}
4093 % \EnableCrossrefs
4094 %
4095 % \begin{macro}{\heisei}
4096 % \changes{v1.1m}{1998/04/07}{\cs{today}の計算手順を変更}
4097 % |\today|コマンドを|\rightmark|で指定したとき、|\rightmark|を出力する部分
4098 % で和暦のための計算ができないので、クラスファイルを読み込む時点で計算して
4099 % おきます。
4100 %    \begin{macrocode}
4101 \newcount\heisei \heisei\year \advance\heisei-1988\relax
4102 %    \end{macrocode}
4103 % \end{macro}
4104 %
4105 % \begin{macro}{\today}
4106 % 縦組の場合は、漢数字で出力します。
4107 %
4108 % \changes{v1.6-ltj-9}{2015/01/01}{縦組では,この漢数字による日付出力でエラーになりました.
4109 % Lua\TeX-ja では,\cs{kansuji}の後に\cs{number}を続けることは出来ないので\cs{number}を削除しました.}
4110 %    \begin{macrocode}
4111 \def\today{{%
4112   \ifnum\ltjgetparameter{direction}=3
4113     \if西暦
4114       \kansuji\year 年
4115       \kansuji\month 月
4116       \kansuji\day 日
4117     \else
4118       平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
4119       \kansuji\month 月
4120       \kansuji\day 日
4121     \fi
4122   \else
4123     \if西暦
4124       \number\year~年
4125       \number\month~月
4126       \number\day~日
4127     \else
4128       平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
4129       \number\month~月
4130       \number\day~日
4131     \fi
4132   \fi}}
4133 %    \end{macrocode}
4134 % \end{macro}
4135 %
4136 %
4137 %
4138 %
4139 % \section{初期設定}
4140 %
4141 % \begin{macro}{\prepartname}
4142 % \begin{macro}{\postpartname}
4143 % \begin{macro}{\prechaptername}
4144 % \begin{macro}{\postchaptername}
4145 %    \begin{macrocode}
4146 \newcommand{\prepartname}{第}
4147 \newcommand{\postpartname}{部}
4148 %<report|book>\newcommand{\prechaptername}{第}
4149 %<report|book>\newcommand{\postchaptername}{章}
4150 %    \end{macrocode}
4151 % \end{macro}
4152 % \end{macro}
4153 % \end{macro}
4154 % \end{macro}
4155 %
4156 % \begin{macro}{\contentsname}
4157 % \begin{macro}{\listfigurename}
4158 % \begin{macro}{\listtablename}
4159 %    \begin{macrocode}
4160 \newcommand{\contentsname}{目 次}
4161 \newcommand{\listfigurename}{図 目 次}
4162 \newcommand{\listtablename}{表 目 次}
4163 %    \end{macrocode}
4164 % \end{macro}
4165 % \end{macro}
4166 % \end{macro}
4167 %
4168 % \begin{macro}{\refname}
4169 % \begin{macro}{\bibname}
4170 % \begin{macro}{\indexname}
4171 %    \begin{macrocode}
4172 %<article>\newcommand{\refname}{参考文献}
4173 %<report|book>\newcommand{\bibname}{関連図書}
4174 \newcommand{\indexname}{索 引}
4175 %    \end{macrocode}
4176 % \end{macro}
4177 % \end{macro}
4178 % \end{macro}
4179 %
4180 % \begin{macro}{\figurename}
4181 % \begin{macro}{\tablename}
4182 %    \begin{macrocode}
4183 \newcommand{\figurename}{図}
4184 \newcommand{\tablename}{表}
4185 %    \end{macrocode}
4186 % \end{macro}
4187 % \end{macro}
4188 %
4189 % \begin{macro}{\appendixname}
4190 % \begin{macro}{\abstractname}
4191 %    \begin{macrocode}
4192 \newcommand{\appendixname}{付 録}
4193 %<article|report>\newcommand{\abstractname}{概 要}
4194 %    \end{macrocode}
4195 % \end{macro}
4196 % \end{macro}
4197 %
4198 % \changes{v1.0d}{1996/02/29}{articleとreportのデフォルトを
4199 %                              \pstyle{plain}に修正}
4200 % \changes{v1.4}{2002/04/09}{縦組スタイルで\cs{flushbottom}しないようにした}
4201 %    \begin{macrocode}
4202 %<book>\pagestyle{headings}
4203 %<!book>\pagestyle{plain}
4204 \pagenumbering{arabic}
4205 \raggedbottom
4206 \if@twocolumn
4207   \twocolumn
4208   \sloppy
4209 \else
4210   \onecolumn
4211 \fi
4212 %    \end{macrocode}
4213 % |\@mparswitch|は傍注を左右(縦組では上下)どちらのマージンに
4214 % 出力するかの指定です。偽の場合、傍注は一方の側にしか出力されません。
4215 % このスイッチを真とすると、とくに縦組の場合、奇数ページでは本文の上に、
4216 % 偶数ページでは本文の下に傍注が出力されますので、おかしなことになります。
4217 %
4218 % また、縦組のときには、傍注を本文の下に出すようにしています。
4219 % |\reversemarginpar|とすると本文の上側に出力されます。
4220 % ただし、二段組の場合は、つねに隣接するテキスト側のマージンに出力されます。
4221 %    \begin{macrocode}
4222 %<*tate>
4223 \normalmarginpar
4224 \@mparswitchfalse
4225 %</tate>
4226 %<*yoko>
4227 \if@twoside
4228   \@mparswitchtrue
4229 \else
4230   \@mparswitchfalse
4231 \fi
4232 %</yoko>
4233 %</article|report|book>
4234 %    \end{macrocode}
4235 %
4236 %
4237 %
4238 % \Finale
4239 %
4240 \endinput