OSDN Git Service

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