OSDN Git Service

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