OSDN Git Service

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