OSDN Git Service

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