OSDN Git Service

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