OSDN Git Service

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