OSDN Git Service

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