OSDN Git Service

Add ltjclasses and ltjsclasses.
[luatex-ja/luatexja.git] / src / ltjclasses / ltjbook.cls
1 %%
2 %% This is file `ltjbook.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ltjclasses.dtx  (with options: `book,yoko')
8 %% 
9 %% IMPORTANT NOTICE:
10 %% 
11 %% For the copyright see the source file.
12 %% 
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from ltjbook.cls.
15 %% 
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file ltjclasses.dtx.
18 %% 
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
23 %% File: ltjclasses.dtx
24 %% \CharacterTable
25 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
26 %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
27 %%   Digits        \0\1\2\3\4\5\6\7\8\9
28 %%   Exclamation   \!     Double quote  \"     Hash (number) \#
29 %%   Dollar        \$     Percent       \%     Ampersand     \&
30 %%   Acute accent  \'     Left paren    \(     Right paren   \)
31 %%   Asterisk      \*     Plus          \+     Comma         \,
32 %%   Minus         \-     Point         \.     Solidus       \/
33 %%   Colon         \:     Semicolon     \;     Less than     \<
34 %%   Equals        \=     Greater than  \>     Question mark \?
35 %%   Commercial at \@     Left bracket  \[     Backslash     \\
36 %%   Right bracket \]     Circumflex    \^     Underscore    \_
37 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
38 %%   Right brace   \}     Tilde         \~}
39 %%
40 \NeedsTeXFormat{LaTeX2e}
41 \ProvidesClass{ltjbook}
42   [2011/10/03 v1.6-ltj
43  Standard LuaLaTeX-ja class]
44 \RequirePackage{luatexja}
45 \newcounter{@paper}
46 \newif\if@landscape \@landscapefalse
47 \newcommand{\@ptsize}{}
48 \newif\if@restonecol
49 \newif\if@titlepage
50 \@titlepagetrue
51 \newif\if@openright
52 \newif\if@mainmatter \@mainmattertrue
53 \hour\time \divide\hour by 60\relax
54 \@tempcnta\hour \multiply\@tempcnta 60\relax
55 \minute\time \advance\minute-\@tempcnta
56 \newif\if@stysize \@stysizefalse
57 \newif\if@enablejfam \@enablejfamtrue
58 \newif\if@mathrmmc \@mathrmmcfalse
59 \DeclareOption{a4paper}{\setcounter{@paper}{1}%
60   \setlength\paperheight {297mm}%
61   \setlength\paperwidth  {210mm}}
62 \DeclareOption{a5paper}{\setcounter{@paper}{2}%
63   \setlength\paperheight {210mm}
64   \setlength\paperwidth  {148mm}}
65 \DeclareOption{b4paper}{\setcounter{@paper}{3}%
66   \setlength\paperheight {364mm}
67   \setlength\paperwidth  {257mm}}
68 \DeclareOption{b5paper}{\setcounter{@paper}{4}%
69   \setlength\paperheight {257mm}
70   \setlength\paperwidth  {182mm}}
71 \DeclareOption{a4j}{\setcounter{@paper}{1}\@stysizetrue
72   \setlength\paperheight {297mm}%
73   \setlength\paperwidth  {210mm}}
74 \DeclareOption{a5j}{\setcounter{@paper}{2}\@stysizetrue
75   \setlength\paperheight {210mm}
76   \setlength\paperwidth  {148mm}}
77 \DeclareOption{b4j}{\setcounter{@paper}{3}\@stysizetrue
78   \setlength\paperheight {364mm}
79   \setlength\paperwidth  {257mm}}
80 \DeclareOption{b5j}{\setcounter{@paper}{4}\@stysizetrue
81   \setlength\paperheight {257mm}
82   \setlength\paperwidth  {182mm}}
83 \DeclareOption{a4p}{\setcounter{@paper}{1}\@stysizetrue
84   \setlength\paperheight {297mm}%
85   \setlength\paperwidth  {210mm}}
86 \DeclareOption{a5p}{\setcounter{@paper}{2}\@stysizetrue
87   \setlength\paperheight {210mm}
88   \setlength\paperwidth  {148mm}}
89 \DeclareOption{b4p}{\setcounter{@paper}{3}\@stysizetrue
90   \setlength\paperheight {364mm}
91   \setlength\paperwidth  {257mm}}
92 \DeclareOption{b5p}{\setcounter{@paper}{4}\@stysizetrue
93   \setlength\paperheight {257mm}
94   \setlength\paperwidth  {182mm}}
95 \if@compatibility
96   \renewcommand{\@ptsize}{0}
97 \else
98   \DeclareOption{10pt}{\renewcommand{\@ptsize}{0}}
99 \fi
100 \DeclareOption{11pt}{\renewcommand{\@ptsize}{1}}
101 \DeclareOption{12pt}{\renewcommand{\@ptsize}{2}}
102 \DeclareOption{landscape}{\@landscapetrue
103   \setlength\@tempdima{\paperheight}%
104   \setlength\paperheight{\paperwidth}%
105   \setlength\paperwidth{\@tempdima}}
106 \DeclareOption{tombow}{%
107   \tombowtrue \tombowdatetrue
108   \setlength{\@tombowwidth}{.1\p@}%
109   \@bannertoken{%
110      \jobname\space:\space\number\year/\number\month/\number\day
111       (\number\hour:\number\minute)}
112   \maketombowbox}
113 \DeclareOption{tombo}{%
114   \tombowtrue \tombowdatefalse
115   \setlength{\@tombowwidth}{.1\p@}%
116   \maketombowbox}
117 \DeclareOption{mentuke}{%
118   \tombowtrue \tombowdatefalse
119   \setlength{\@tombowwidth}{\z@}%
120   \maketombowbox}
121 %% \DeclareOption{tate}{%
122 %%   \AtBeginDocument{\tate\message{《縦組モード》}%
123 %%                    \adjustbaseline}%
124 %% }
125 \DeclareOption{oneside}{\@twosidefalse}
126 \DeclareOption{twoside}{\@twosidetrue}
127 \DeclareOption{onecolumn}{\@twocolumnfalse}
128 \DeclareOption{twocolumn}{\@twocolumntrue}
129 \DeclareOption{titlepage}{\@titlepagetrue}
130 \DeclareOption{notitlepage}{\@titlepagefalse}
131 \if@compatibility
132 \@openrighttrue
133 \else
134 \DeclareOption{openright}{\@openrighttrue}
135 \DeclareOption{openany}{\@openrightfalse}
136 \fi
137 \DeclareOption{leqno}{\input{leqno.clo}}
138 \DeclareOption{fleqn}{\input{fleqn.clo}}
139 \DeclareOption{openbib}{%
140   \AtEndOfPackage{%
141    \renewcommand\@openbib@code{%
142       \advance\leftmargin\bibindent
143       \itemindent -\bibindent
144       \listparindent \itemindent
145       \parsep \z@
146       }%
147    \renewcommand\newblock{\par}}}
148 \if@compatibility
149   \@mathrmmctrue
150 \else
151   \DeclareOption{disablejfam}{\@enablejfamfalse}
152   \DeclareOption{mathrmmc}{\@mathrmmctrue}
153 \fi
154 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
155 \DeclareOption{final}{\setlength\overfullrule{0pt}}
156 \ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright}
157 \ProcessOptions\relax
158 \input{ltjbk1\@ptsize.clo}
159 \if@stysize
160   \setlength\columnsep{2\Cwd}
161 \else
162   \setlength\columnsep{10\p@}
163 \fi
164 \setlength\columnseprule{0\p@}
165 \setlength{\@tempdima}{\paperwidth}
166 \setlength{\@tempdimb}{\paperheight}
167 \iftombow
168   \advance \@tempdima 2in
169   \advance \@tempdimb 2in
170 \fi
171 \setlength{\pdfpagewidth}{\@tempdima}
172 \setlength{\pdfpageheight}{\@tempdimb}
173 \setlength\lineskip{1\p@}
174 \setlength\normallineskip{1\p@}
175 \renewcommand{\baselinestretch}{}
176 \setlength\parskip{0\p@ \@plus \p@}
177 \setlength\parindent{1\Cwd}
178 \@lowpenalty   51
179 \@medpenalty  151
180 \@highpenalty 301
181 \setcounter{topnumber}{2}
182 \setcounter{bottomnumber}{1}
183 \setcounter{totalnumber}{3}
184 \setcounter{dbltopnumber}{2}
185 \renewcommand{\topfraction}{.7}
186 \renewcommand{\bottomfraction}{.3}
187 \renewcommand{\textfraction}{.2}
188 \renewcommand{\floatpagefraction}{.5}
189 \renewcommand{\dbltopfraction}{.7}
190 \renewcommand{\dblfloatpagefraction}{.5}
191 \def\ps@plain{\let\@mkboth\@gobbletwo
192    \let\ps@jpl@in\ps@plain
193    \let\@oddhead\@empty
194    \def\@oddfoot{\reset@font\hfil\thepage\hfil}%
195    \let\@evenhead\@empty
196    \let\@evenfoot\@oddfoot}
197 \let\ps@jpl@in\ps@plain
198 \def\ps@headnombre{\let\@mkboth\@gobbletwo
199     \let\ps@jpl@in\ps@headnombre
200   \def\@evenhead{\thepage\hfil}%
201   \def\@oddhead{\hfil\thepage}%
202   \let\@oddfoot\@empty\let\@evenfoot\@empty}
203 \def\ps@footnombre{\let\@mkboth\@gobbletwo
204     \let\ps@jpl@in\ps@footnombre
205   \def\@evenfoot{\thepage\hfil}%
206   \def\@oddfoot{\hfil\thepage}%
207   \let\@oddhead\@empty\let\@evenhead\@empty}
208 \if@twoside
209   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
210     \let\@oddfoot\@empty\let\@evenfoot\@empty
211     \def\@evenhead{\thepage\hfil\leftmark}%
212     \def\@oddhead{{\rightmark}\hfil\thepage}%
213     \let\@mkboth\markboth
214   \def\chaptermark##1{\markboth{%
215      \ifnum \c@secnumdepth >\m@ne
216          \if@mainmatter
217          \@chapapp\thechapter\@chappos\hskip1\zw
218          \fi
219      \fi
220      ##1}{}}%
221   \def\sectionmark##1{\markright{%
222      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
223      ##1}}%
224   }
225 \else % if not twoside
226   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
227     \let\@oddfoot\@empty
228     \def\@oddhead{{\rightmark}\hfil\thepage}%
229     \let\@mkboth\markboth
230 \def\chaptermark##1{\markright{%
231    \ifnum \c@secnumdepth >\m@ne
232          \if@mainmatter
233        \@chapapp\thechapter\@chappos\hskip1\zw
234          \fi
235    \fi
236    ##1}}%
237   }
238 \fi
239 \if@twoside
240   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
241     \def\@evenhead{\leftmark\hfil}% right page
242     \def\@evenfoot{\thepage\hfil}% right page
243     \def\@oddhead{\hfil\rightmark}% left page
244     \def\@oddfoot{\hfil\thepage}% left page
245   \let\@mkboth\markboth
246 \def\chaptermark##1{\markboth{%
247      \ifnum \c@secnumdepth >\m@ne
248          \if@mainmatter
249          \@chapapp\thechapter\@chappos\hskip1\zw
250          \fi
251      \fi
252      ##1}{}}%
253   \def\sectionmark##1{\markright{%
254      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
255      ##1}}%
256   }
257 \else % if one column
258   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
259     \def\@oddhead{\hfil\rightmark}%
260     \def\@oddfoot{\hfil\thepage}%
261     \let\@mkboth\markboth
262   \def\chaptermark##1{\markright{%
263      \ifnum \c@secnumdepth >\m@ne
264          \if@mainmatter
265          \@chapapp\thechapter\@chappos\hskip1\zw
266          \fi
267      \fi
268      ##1}}%
269   }
270 \fi
271 \def\ps@myheadings{\let\ps@jpl@in\ps@plain%
272   \let\@oddfoot\@empty\let\@evenfoot\@empty
273   \def\@evenhead{\thepage\hfil\leftmark}%
274   \def\@oddhead{{\rightmark}\hfil\thepage}%
275   \let\@mkboth\@gobbletwo
276   \let\chaptermark\@gobble
277   \let\sectionmark\@gobble
278 }
279 \if@compatibility
280 \newenvironment{titlepage}
281     {%
282       \cleardoublepage
283      \if@twocolumn\@restonecoltrue\onecolumn
284      \else\@restonecolfalse\newpage\fi
285      \thispagestyle{empty}%
286      \setcounter{page}\z@
287     }%
288     {\if@restonecol\twocolumn\else\newpage\fi
289     }
290 \else
291 \newenvironment{titlepage}
292     {%
293       \cleardoublepage
294       \if@twocolumn
295         \@restonecoltrue\onecolumn
296       \else
297         \@restonecolfalse\newpage
298       \fi
299       \thispagestyle{empty}%
300       \setcounter{page}\@ne
301     }%
302     {\if@restonecol\twocolumn \else \newpage \fi
303      \if@twoside\else
304         \setcounter{page}\@ne
305      \fi
306     }
307 \fi
308 \def\p@thanks#1{\footnotemark
309   \protected@xdef\@thanks{\@thanks
310     \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}}
311 \if@titlepage
312   \newcommand{\maketitle}{\begin{titlepage}%
313   \let\footnotesize\small
314   \let\footnoterule\relax
315   \let\footnote\thanks
316   \null\vfil
317   \vskip 60\p@
318   \begin{center}%
319     {\LARGE \@title \par}%
320     \vskip 3em%
321     {\Large
322      \lineskip .75em%
323       \begin{tabular}[t]{c}%
324         \@author
325       \end{tabular}\par}%
326       \vskip 1.5em%
327     {\large \@date \par}%       % Set date in \large size.
328   \end{center}\par
329   \@thanks\vfil\null
330   \end{titlepage}%
331   \setcounter{footnote}{0}%
332   \global\let\thanks\relax
333   \global\let\maketitle\relax
334   \global\let\p@thanks\relax
335   \global\let\@thanks\@empty
336   \global\let\@author\@empty
337   \global\let\@date\@empty
338   \global\let\@title\@empty
339   \global\let\title\relax
340   \global\let\author\relax
341   \global\let\date\relax
342   \global\let\and\relax
343   }%
344 \else
345   \newcommand{\maketitle}{\par
346   \begingroup
347     \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
348     \def\@makefnmark{\hbox{\ifydir $\m@th^{\@thefnmark}$
349       \else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}%
350      \long\def\@makefntext##1{\parindent 1em\noindent
351        \hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
352     \if@twocolumn
353       \ifnum \col@number=\@ne \@maketitle
354       \else \twocolumn[\@maketitle]%
355       \fi
356     \else
357       \newpage
358       \global\@topnum\z@   % Prevents figures from going at top of page.
359       \@maketitle
360     \fi
361      \thispagestyle{jpl@in}\@thanks
362   \endgroup
363   \setcounter{footnote}{0}%
364   \global\let\thanks\relax
365   \global\let\maketitle\relax
366   \global\let\p@thanks\relax
367   \global\let\@thanks\@empty
368   \global\let\@author\@empty
369   \global\let\@date\@empty
370   \global\let\@title\@empty
371   \global\let\title\relax
372   \global\let\author\relax
373   \global\let\date\relax
374   \global\let\and\relax
375   }
376   \def\@maketitle{%
377   \newpage\null
378   \vskip 2em%
379   \begin{center}%
380   \let\footnote\thanks
381     {\LARGE \@title \par}%
382     \vskip 1.5em%
383     {\large
384       \lineskip .5em%
385       \begin{tabular}[t]{c}%
386         \@author
387       \end{tabular}\par}%
388     \vskip 1em%
389     {\large \@date}%
390   \end{center}%
391   \par\vskip 1.5em}
392 \fi
393 \newcommand*{\chaptermark}[1]{}
394 \setcounter{secnumdepth}{2}
395 \newcounter{part}
396 \newcounter{chapter}
397 \newcounter{section}[chapter]
398 \newcounter{subsection}[section]
399 \newcounter{subsubsection}[subsection]
400 \newcounter{paragraph}[subsubsection]
401 \newcounter{subparagraph}[paragraph]
402 \renewcommand{\thepart}{\@Roman\c@part}
403 \renewcommand{\thechapter}{\@arabic\c@chapter}
404 \renewcommand{\thesection}{\thechapter.\@arabic\c@section}
405 \renewcommand{\thesubsection}{\thesection.\@arabic\c@subsection}
406 \renewcommand{\thesubsubsection}{%
407    \thesubsection.\@arabic\c@subsubsection}
408 \renewcommand{\theparagraph}{%
409    \thesubsubsection.\@arabic\c@paragraph}
410 \renewcommand{\thesubparagraph}{%
411    \theparagraph.\@arabic\c@subparagraph}
412 \newcommand{\@chapapp}{\prechaptername}
413 \newcommand{\@chappos}{\postchaptername}
414 \newcommand\frontmatter{%
415   \if@openright \cleardoublepage \else \clearpage \fi
416   \@mainmatterfalse\pagenumbering{roman}}
417 \newcommand{\mainmatter}{%
418   \if@openright \cleardoublepage \else \clearpage \fi
419   \@mainmattertrue\pagenumbering{arabic}}
420 \newcommand{\backmatter}{%
421   \if@openright \cleardoublepage \else \clearpage \fi
422   \@mainmatterfalse}
423 \newcommand{\part}{%
424   \if@openright \cleardoublepage \else \clearpage \fi
425   \thispagestyle{empty}%
426   \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
427   \null\vfil
428   \secdef\@part\@spart}
429 \def\@part[#1]#2{%
430   \ifnum \c@secnumdepth >-2\relax
431     \refstepcounter{part}%
432     \addcontentsline{toc}{part}{%
433        \prepartname\thepart\postpartname\hspace{1em}#1}%
434   \else
435     \addcontentsline{toc}{part}{#1}%
436   \fi
437   \markboth{}{}%
438   {\centering
439    \interlinepenalty\@M\reset@font
440    \ifnum \c@secnumdepth >-2\relax
441      \huge\bfseries\prepartname\thepart\postpartname
442      \par\vskip20\p@
443    \fi
444    \Huge\bfseries#2\par}%
445    \@endpart}
446 \def\@spart#1{{%
447   \centering
448   \interlinepenalty\@M\reset@font
449   \Huge\bfseries#1\par}%
450   \@endpart}
451 \def\@endpart{\vfil\newpage
452    \if@twoside\null\thispagestyle{empty}\newpage\fi
453    \if@tempswa\twocolumn\fi}
454 \newcommand{\chapter}{%
455   \if@openright\cleardoublepage\else\clearpage\fi
456   \thispagestyle{jpl@in}%
457   \global\@topnum\z@
458   \@afterindenttrue
459   \secdef\@chapter\@schapter}
460 \def\@chapter[#1]#2{%
461   \ifnum \c@secnumdepth >\m@ne
462     \if@mainmatter
463     \refstepcounter{chapter}%
464     \typeout{\@chapapp\space\thechapter\space\@chappos}%
465     \addcontentsline{toc}{chapter}%
466       {\protect\numberline{\@chapapp\thechapter\@chappos}#1}%
467     \else\addcontentsline{toc}{chapter}{#1}\fi
468   \else
469     \addcontentsline{toc}{chapter}{#1}%
470   \fi
471   \chaptermark{#1}%
472   \addtocontents{lof}{\protect\addvspace{10\p@}}%
473   \addtocontents{lot}{\protect\addvspace{10\p@}}%
474   \@makechapterhead{#2}\@afterheading}
475 \def\@makechapterhead#1{\hbox{}%
476   \vskip2\Cvs
477   {\parindent\z@
478    \raggedright
479    \reset@font\huge\bfseries
480    \leavevmode
481    \ifnum \c@secnumdepth >\m@ne
482      \setlength\@tempdima{\linewidth}%
483     \if@mainmatter
484      \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1\zw}%
485      \addtolength\@tempdima{-\wd\z@}%
486      \unhbox\z@\nobreak
487     \fi
488      \vtop{\hsize\@tempdima#1}%
489    \else
490      #1\relax
491    \fi}\nobreak\vskip3\Cvs}
492 \def\@schapter#1{%
493   \@makeschapterhead{#1}\@afterheading
494 }
495 \def\@makeschapterhead#1{\hbox{}%
496   \vskip2\Cvs
497   {\parindent\z@
498    \raggedright
499    \reset@font\huge\bfseries
500    \leavevmode
501    \setlength\@tempdima{\linewidth}%
502    \vtop{\hsize\@tempdima#1}}\vskip3\Cvs}
503 \newcommand{\section}{\@startsection{section}{1}{\z@}%
504    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
505    {.5\Cvs \@plus.3\Cvs}%
506    {\reset@font\Large\bfseries}}
507 \newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
508    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
509    {.5\Cvs \@plus.3\Cvs}%
510    {\reset@font\large\bfseries}}
511 \newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
512    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
513    {.5\Cvs \@plus.3\Cvs}%
514    {\reset@font\normalsize\bfseries}}
515 \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
516    {3.25ex \@plus 1ex \@minus .2ex}%
517    {-1em}%
518    {\reset@font\normalsize\bfseries}}
519 \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
520    {3.25ex \@plus 1ex \@minus .2ex}%
521    {-1em}%
522    {\reset@font\normalsize\bfseries}}
523 \newcommand{\appendix}{\par
524   \setcounter{chapter}{0}%
525   \setcounter{section}{0}%
526   \renewcommand{\@chapapp}{\appendixname}%
527   \renewcommand{\@chappos}\space%
528   \renewcommand{\thechapter}{\@Alph\c@chapter}}
529 \if@twocolumn
530   \setlength\leftmargini {2em}
531 \else
532   \setlength\leftmargini {2.5em}
533 \fi
534 \setlength\leftmarginii  {2.2em}
535 \setlength\leftmarginiii {1.87em}
536 \setlength\leftmarginiv  {1.7em}
537 \if@twocolumn
538   \setlength\leftmarginv {.5em}
539   \setlength\leftmarginvi{.5em}
540 \else
541   \setlength\leftmarginv {1em}
542   \setlength\leftmarginvi{1em}
543 \fi
544 \setlength  \labelsep  {.5em}
545 \setlength  \labelwidth{\leftmargini}
546 \addtolength\labelwidth{-\labelsep}
547 \@beginparpenalty -\@lowpenalty
548 \@endparpenalty   -\@lowpenalty
549 \@itempenalty     -\@lowpenalty
550 \renewcommand{\theenumi}{\@arabic\c@enumi}
551 \renewcommand{\theenumii}{\@alph\c@enumii}
552 \renewcommand{\theenumiii}{\@roman\c@enumiii}
553 \renewcommand{\theenumiv}{\@Alph\c@enumiv}
554 \newcommand{\labelenumi}{\theenumi.}
555 \newcommand{\labelenumii}{(\theenumii)}
556 \newcommand{\labelenumiii}{\theenumiii.}
557 \newcommand{\labelenumiv}{\theenumiv.}
558 \renewcommand{\p@enumii}{\theenumi}
559 \renewcommand{\p@enumiii}{\theenumi(\theenumii)}
560 \renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
561 \renewenvironment{enumerate}
562   {\ifnum \@enumdepth >\thr@@\@toodeep\else
563    \advance\@enumdepth\@ne
564    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
565    \list{\csname label\@enumctr\endcsname}{%
566       \iftdir
567          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
568            \else\topsep\z@\fi
569          \parskip\z@ \itemsep\z@ \parsep\z@
570          \labelwidth1\zw \labelsep.3\zw
571          \ifnum \@enumdepth=\@ne \leftmargin1\zw\relax
572            \else\leftmargin\leftskip\fi
573          \advance\leftmargin 1\zw
574       \fi
575          \usecounter{\@enumctr}%
576          \def\makelabel##1{\hss\llap{##1}}}%
577    \fi}{\endlist}
578 \newcommand{\labelitemi}{\textbullet}
579 \newcommand{\labelitemii}{%
580   \iftdir
581      {\textcircled{~}}
582   \else
583      {\normalfont\bfseries\textendash}
584   \fi
585 }
586 \newcommand{\labelitemiii}{\textasteriskcentered}
587 \newcommand{\labelitemiv}{\textperiodcentered}
588 \renewenvironment{itemize}
589   {\ifnum \@itemdepth >\thr@@\@toodeep\else
590    \advance\@itemdepth\@ne
591    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
592    \expandafter
593    \list{\csname \@itemitem\endcsname}{%
594       \iftdir
595          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
596            \else\topsep\z@\fi
597          \parskip\z@ \itemsep\z@ \parsep\z@
598          \labelwidth1\zw \labelsep.3\zw
599          \ifnum \@itemdepth =\@ne \leftmargin1\zw\relax
600            \else\leftmargin\leftskip\fi
601          \advance\leftmargin 1\zw
602       \fi
603          \def\makelabel##1{\hss\llap{##1}}}%
604    \fi}{\endlist}
605 \newenvironment{description}
606   {\list{}{\labelwidth\z@ \itemindent-\leftmargin
607    \iftdir
608      \leftmargin\leftskip \advance\leftmargin3\Cwd
609      \rightmargin\rightskip
610      \labelsep=1\zw \itemsep\z@
611      \listparindent\z@ \topskip\z@ \parskip\z@ \partopsep\z@
612    \fi
613            \let\makelabel\descriptionlabel}}{\endlist}
614 \newcommand{\descriptionlabel}[1]{%
615    \hspace\labelsep\normalfont\bfseries #1}
616 \newenvironment{verse}
617   {\let\\\@centercr
618    \list{}{\itemsep\z@ \itemindent -1.5em%
619            \listparindent\itemindent
620            \rightmargin\leftmargin \advance\leftmargin 1.5em}%
621            \item\relax}{\endlist}
622 \newenvironment{quotation}
623   {\list{}{\listparindent 1.5em%
624            \itemindent\listparindent
625            \rightmargin\leftmargin
626            \parsep\z@ \@plus\p@}%
627            \item\relax}{\endlist}
628 \newenvironment{quote}
629   {\list{}{\rightmargin\leftmargin}%
630            \item\relax}{\endlist}
631 \newcounter{figure}[chapter]
632 \renewcommand{\thefigure}{%
633   \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@figure}
634 \def\fps@figure{tbp}
635 \def\ftype@figure{1}
636 \def\ext@figure{lof}
637 \def\fnum@figure{\figurename~\thefigure}
638 \newenvironment{figure}
639                {\@float{figure}}
640                {\end@float}
641 \newenvironment{figure*}
642                {\@dblfloat{figure}}
643                {\end@dblfloat}
644 \newcounter{table}[chapter]
645 \renewcommand{\thetable}{%
646   \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@table}
647 \def\fps@table{tbp}
648 \def\ftype@table{2}
649 \def\ext@table{lot}
650 \def\fnum@table{\tablename~\thetable}
651 \newenvironment{table}
652                {\@float{table}}
653                {\end@float}
654 \newenvironment{table*}
655                {\@dblfloat{table}}
656                {\end@dblfloat}
657 \newlength\abovecaptionskip
658 \newlength\belowcaptionskip
659 \setlength\abovecaptionskip{10\p@}
660 \setlength\belowcaptionskip{0\p@}
661 \long\def\@makecaption#1#2{%
662   \vskip\abovecaptionskip
663   \iftdir\sbox\@tempboxa{#1\hskip1\zw#2}%
664     \else\sbox\@tempboxa{#1: #2}%
665   \fi
666   \ifdim \wd\@tempboxa >\hsize
667     \iftdir #1\hskip1\zw#2\relax\par
668       \else #1: #2\relax\par\fi
669   \else
670     \global \@minipagefalse
671     \hbox to\hsize{\hfil\box\@tempboxa\hfil}%
672   \fi
673   \vskip\belowcaptionskip}
674 \setlength\arraycolsep{5\p@}
675 \setlength\tabcolsep{6\p@}
676 \setlength\arrayrulewidth{.4\p@}
677 \setlength\doublerulesep{2\p@}
678 \setlength\tabbingsep{\labelsep}
679 \skip\@mpfootins = \skip\footins
680 \setlength\fboxsep{3\p@}
681 \setlength\fboxrule{.4\p@}
682 \@addtoreset{equation}{chapter}
683 \renewcommand{\theequation}{%
684   \ifnum\c@chapter>\z@\thechapter.\fi \@arabic\c@equation}
685 \if@compatibility\else
686   \DeclareSymbolFont{mincho}{JY3}{mc}{m}{n}
687   \DeclareSymbolFontAlphabet{\mathmc}{mincho}
688   \SetSymbolFont{mincho}{bold}{JY3}{gt}{m}{n}
689   \jfam\symmincho
690   \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n}
691 \fi
692 \if@mathrmmc
693   \AtBeginDocument{%
694   \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
695   \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}
696 }%
697 \fi
698 \DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
699 \DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
700 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
701 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
702 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
703 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
704 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
705 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
706 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
707 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
708 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
709 \setcounter{tocdepth}{2}
710 \newcommand{\@pnumwidth}{1.55em}
711 \newcommand{\@tocrmarg}{2.55em}
712 \newcommand{\@dotsep}{4.5}
713 \newdimen\toclineskip
714 \setlength\toclineskip{\z@}
715 \newdimen\@lnumwidth
716 \def\numberline#1{\hbox to\@lnumwidth{#1\hfil}}
717 \def\@dottedtocline#1#2#3#4#5{%
718   \ifnum #1>\c@tocdepth \else
719     \vskip\toclineskip \@plus.2\p@
720     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
721      \parindent #2\relax\@afterindenttrue
722      \interlinepenalty\@M
723      \leavevmode
724      \@lnumwidth #3\relax
725      \advance\leftskip \@lnumwidth \hbox{}\hskip -\leftskip
726      {#4}\nobreak
727      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}%
728      \hfill\nobreak
729      \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}%
730      \par}%
731   \fi}
732 \def\addcontentsline#1#2#3{%
733   \protected@write\@auxout
734     {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
735 \@temptokena{\thepage}}%
736     {\string\@writefile{#1}%
737        {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
738 }
739 \newcommand{\tableofcontents}{%
740   \if@twocolumn\@restonecoltrue\onecolumn
741   \else\@restonecolfalse\fi
742   \chapter*{\contentsname
743     \@mkboth{\contentsname}{\contentsname}%
744   }\@starttoc{toc}%
745   \if@restonecol\twocolumn\fi
746 }
747 \newcommand*{\l@part}[2]{%
748   \ifnum \c@tocdepth >-2\relax
749     \addpenalty{-\@highpenalty}%
750     \addvspace{2.25em \@plus\p@}%
751     \begingroup
752     \parindent\z@\rightskip\@pnumwidth
753     \parfillskip-\@pnumwidth
754     {\leavevmode\large\bfseries
755      \setlength\@lnumwidth{4\zw}%
756      #1\hfil\nobreak
757      \hbox to\@pnumwidth{\hss#2}}\par
758     \nobreak
759     \global\@nobreaktrue
760     \everypar{\global\@nobreakfalse\everypar{}}%
761      \endgroup
762   \fi}
763 \newcommand*{\l@chapter}[2]{%
764   \ifnum \c@tocdepth >\m@ne
765     \addpenalty{-\@highpenalty}%
766     \addvspace{1.0em \@plus\p@}%
767     \begingroup
768       \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
769       \leavevmode\bfseries
770       \setlength\@lnumwidth{4\zw}%
771       \advance\leftskip\@lnumwidth \hskip-\leftskip
772       #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par
773       \penalty\@highpenalty
774     \endgroup
775   \fi}
776 \newcommand*{\l@section}{\@dottedtocline{1}{1.5em}{2.3em}}
777 \newcommand*{\l@subsection}   {\@dottedtocline{2}{3.8em}{3.2em}}
778 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{7.0em}{4.1em}}
779 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{10em}{5em}}
780 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{12em}{6em}}
781 \newcommand{\listoffigures}{%
782   \if@twocolumn\@restonecoltrue\onecolumn
783   \else\@restonecolfalse\fi
784   \chapter*{\listfigurename
785   \@mkboth{\listfigurename}{\listfigurename}}%
786   \@starttoc{lof}%
787   \if@restonecol\twocolumn\fi
788 }
789 \newcommand*{\l@figure}{\@dottedtocline{1}{1.5em}{2.3em}}
790 \newcommand{\listoftables}{%
791   \if@twocolumn\@restonecoltrue\onecolumn
792   \else\@restonecolfalse\fi
793   \chapter*{\listtablename
794   \@mkboth{\listtablename}{\listtablename}}%
795   \@starttoc{lot}%
796   \if@restonecol\twocolumn\fi
797 }
798 \let\l@table\l@figure
799 \newdimen\bibindent
800 \setlength\bibindent{1.5em}
801 \newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
802 \newenvironment{thebibliography}[1]
803 {\chapter*{\bibname\@mkboth{\bibname}{\bibname}}%
804    \list{\@biblabel{\@arabic\c@enumiv}}%
805         {\settowidth\labelwidth{\@biblabel{#1}}%
806          \leftmargin\labelwidth
807          \advance\leftmargin\labelsep
808          \@openbib@code
809          \usecounter{enumiv}%
810          \let\p@enumiv\@empty
811          \renewcommand\theenumiv{\@arabic\c@enumiv}}%
812    \sloppy
813    \clubpenalty4000
814    \@clubpenalty\clubpenalty
815    \widowpenalty4000%
816    \sfcode`\.\@m}
817   {\def\@noitemerr
818     {\@latex@warning{Empty `thebibliography' environment}}%
819    \endlist}
820 \let\@openbib@code\@empty
821 \newenvironment{theindex}
822   {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi
823    \columnseprule\z@ \columnsep 35\p@
824    \twocolumn[\@makeschapterhead{\indexname}]%
825    \@mkboth{\indexname}{\indexname}%
826    \thispagestyle{jpl@in}\parindent\z@
827    \parskip\z@ \@plus .3\p@\relax
828    \let\item\@idxitem}
829   {\if@restonecol\onecolumn\else\clearpage\fi}
830 \newcommand{\@idxitem}{\par\hangindent 40\p@}
831 \newcommand{\subitem}{\@idxitem \hspace*{20\p@}}
832 \newcommand{\subsubitem}{\@idxitem \hspace*{30\p@}}
833 \newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
834 \renewcommand{\footnoterule}{%
835   \kern-3\p@
836   \hrule width .4\columnwidth
837   \kern 2.6\p@}
838 \@addtoreset{footnote}{chapter}
839 \newcommand\@makefntext[1]{\parindent 1em
840   \noindent\hbox to 1.8em{\hss\@makefnmark}#1}
841 \newif\ifSeireki \Seirekifalse
842 \def\Seireki{\Seirekitrue}
843 \def\Wareki{\Seirekifalse}
844 \newcount\heisei \heisei\year \advance\heisei-1988\relax
845 \def\today{{%
846   \iftdir
847     \ifSeireki
848       \kansuji\number\year 年
849       \kansuji\number\month 月
850       \kansuji\number\day 日
851     \else
852       平成\ifnum\heisei=1 元年\else\kansuji\number\heisei 年\fi
853       \kansuji\number\month 月
854       \kansuji\number\day 日
855     \fi
856   \else
857     \ifSeireki
858       \number\year~年
859       \number\month~月
860       \number\day~日
861     \else
862       平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
863       \number\month~月
864       \number\day~日
865     \fi
866   \fi}}
867 \newcommand{\prepartname}{第}
868 \newcommand{\postpartname}{部}
869 \newcommand{\prechaptername}{第}
870 \newcommand{\postchaptername}{章}
871 \newcommand{\contentsname}{目 次}
872 \newcommand{\listfigurename}{図 目 次}
873 \newcommand{\listtablename}{表 目 次}
874 \newcommand{\bibname}{関連図書}
875 \newcommand{\indexname}{索 引}
876 \newcommand{\figurename}{図}
877 \newcommand{\tablename}{表}
878 \newcommand{\appendixname}{付 録}
879 \pagestyle{headings}
880 \pagenumbering{arabic}
881 \raggedbottom
882 \if@twocolumn
883   \twocolumn
884   \sloppy
885 \else
886   \onecolumn
887 \fi
888 \if@twoside
889   \@mparswitchtrue
890 \else
891   \@mparswitchfalse
892 \fi
893 \endinput
894 %%
895 %% End of file `ltjbook.cls'.