OSDN Git Service

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