OSDN Git Service

sync lltjext.sty with platex/7c56cb02
[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/11/24 v1.7b-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\null\thispagestyle{empty}\newpage\fi
453    \if@tempswa\twocolumn\fi}
454 \newcommand{\chapter}{%
455   \if@openright\cleardoublepage\else\clearpage\fi
456   \thispagestyle{jpl@in}%
457   \global\@topnum\z@
458   \@afterindenttrue
459   \secdef\@chapter\@schapter}
460 \def\@chapter[#1]#2{%
461   \ifnum \c@secnumdepth >\m@ne
462     \if@mainmatter
463     \refstepcounter{chapter}%
464     \typeout{\@chapapp\space\thechapter\space\@chappos}%
465     \addcontentsline{toc}{chapter}%
466       {\protect\numberline{\@chapapp\thechapter\@chappos}#1}%
467     \else\addcontentsline{toc}{chapter}{#1}\fi
468   \else
469     \addcontentsline{toc}{chapter}{#1}%
470   \fi
471   \chaptermark{#1}%
472   \addtocontents{lof}{\protect\addvspace{10\p@}}%
473   \addtocontents{lot}{\protect\addvspace{10\p@}}%
474   \@makechapterhead{#2}\@afterheading}
475 \def\@makechapterhead#1{\hbox{}%
476   \vskip2\Cvs
477   {\parindent\z@
478    \raggedright
479    \normalfont\huge\bfseries
480    \leavevmode
481    \ifnum \c@secnumdepth >\m@ne
482      \setlength\@tempdima{\linewidth}%
483     \if@mainmatter
484      \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1\zw}%
485      \addtolength\@tempdima{-\wd\z@}%
486      \unhbox\z@\nobreak
487     \fi
488      \vtop{\hsize\@tempdima#1}%
489    \else
490      #1\relax
491    \fi}\nobreak\vskip3\Cvs}
492 \def\@schapter#1{%
493   \@makeschapterhead{#1}\@afterheading
494 }
495 \def\@makeschapterhead#1{\hbox{}%
496   \vskip2\Cvs
497   {\parindent\z@
498    \raggedright
499    \normalfont\huge\bfseries
500    \leavevmode
501    \setlength\@tempdima{\linewidth}%
502    \vtop{\hsize\@tempdima#1}}\vskip3\Cvs}
503 \newcommand{\section}{\@startsection{section}{1}{\z@}%
504    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
505    {.5\Cvs \@plus.3\Cvs}%
506    {\normalfont\Large\bfseries}}
507 \newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
508    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
509    {.5\Cvs \@plus.3\Cvs}%
510    {\normalfont\large\bfseries}}
511 \newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
512    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
513    {.5\Cvs \@plus.3\Cvs}%
514    {\normalfont\normalsize\bfseries}}
515 \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
516    {3.25ex \@plus 1ex \@minus .2ex}%
517    {-1em}%
518    {\normalfont\normalsize\bfseries}}
519 \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
520    {3.25ex \@plus 1ex \@minus .2ex}%
521    {-1em}%
522    {\normalfont\normalsize\bfseries}}
523 \newcommand{\appendix}{\par
524   \setcounter{chapter}{0}%
525   \setcounter{section}{0}%
526   \renewcommand{\@chapapp}{\appendixname}%
527   \renewcommand{\@chappos}\space%
528   \renewcommand{\thechapter}{\@Alph\c@chapter}}
529 \if@twocolumn
530   \setlength\leftmargini {2em}
531 \else
532   \setlength\leftmargini {2.5em}
533 \fi
534 \setlength\leftmarginii  {2.2em}
535 \setlength\leftmarginiii {1.87em}
536 \setlength\leftmarginiv  {1.7em}
537 \if@twocolumn
538   \setlength\leftmarginv {.5em}
539   \setlength\leftmarginvi{.5em}
540 \else
541   \setlength\leftmarginv {1em}
542   \setlength\leftmarginvi{1em}
543 \fi
544 \setlength  \labelsep  {.5em}
545 \setlength  \labelwidth{\leftmargini}
546 \addtolength\labelwidth{-\labelsep}
547 \@beginparpenalty -\@lowpenalty
548 \@endparpenalty   -\@lowpenalty
549 \@itempenalty     -\@lowpenalty
550 \renewcommand{\theenumi}{\@arabic\c@enumi}
551 \renewcommand{\theenumii}{\@alph\c@enumii}
552 \renewcommand{\theenumiii}{\@roman\c@enumiii}
553 \renewcommand{\theenumiv}{\@Alph\c@enumiv}
554 \newcommand{\labelenumi}{\theenumi.}
555 \newcommand{\labelenumii}{(\theenumii)}
556 \newcommand{\labelenumiii}{\theenumiii.}
557 \newcommand{\labelenumiv}{\theenumiv.}
558 \renewcommand{\p@enumii}{\theenumi}
559 \renewcommand{\p@enumiii}{\theenumi(\theenumii)}
560 \renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
561 \renewenvironment{enumerate}
562   {\ifnum \@enumdepth >\thr@@\@toodeep\else
563    \advance\@enumdepth\@ne
564    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
565    \expandafter \list \csname label\@enumctr\endcsname{%
566       \ifnum\ltjgetparameter{direction}=3
567          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
568            \else\topsep\z@\fi
569          \parskip\z@ \itemsep\z@ \parsep\z@
570          \labelwidth1\zw \labelsep.3\zw
571          \ifnum \@enumdepth=\@ne \leftmargin1\zw\relax
572            \else\leftmargin\leftskip\fi
573          \advance\leftmargin 1\zw
574       \fi
575          \usecounter{\@enumctr}%
576          \def\makelabel##1{\hss\llap{##1}}}%
577    \fi}{\endlist}
578 \newcommand{\labelitemi}{\textbullet}
579 \newcommand{\labelitemii}{%
580   \ifnum\ltjgetparameter{direction}=3
581      {\textcircled{~}}
582   \else
583      {\normalfont\bfseries\textendash}
584   \fi
585 }
586 \newcommand{\labelitemiii}{\textasteriskcentered}
587 \newcommand{\labelitemiv}{\textperiodcentered}
588 \renewenvironment{itemize}
589   {\ifnum \@itemdepth >\thr@@\@toodeep\else
590    \advance\@itemdepth\@ne
591    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
592    \expandafter \list \csname \@itemitem\endcsname{%
593       \ifnum\ltjgetparameter{direction}=3
594          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
595            \else\topsep\z@\fi
596          \parskip\z@ \itemsep\z@ \parsep\z@
597          \labelwidth1\zw \labelsep.3\zw
598          \ifnum \@itemdepth =\@ne \leftmargin1\zw\relax
599            \else\leftmargin\leftskip\fi
600          \advance\leftmargin 1\zw
601       \fi
602          \def\makelabel##1{\hss\llap{##1}}}%
603    \fi}{\endlist}
604 \newenvironment{description}
605   {\list{}{\labelwidth\z@ \itemindent-\leftmargin
606    \ifnum\ltjgetparameter{direction}=3
607      \leftmargin\leftskip \advance\leftmargin3\Cwd
608      \rightmargin\rightskip
609      \labelsep=1\zw \itemsep\z@
610      \listparindent\z@ \topskip\z@ \parskip\z@ \partopsep\z@
611    \fi
612            \let\makelabel\descriptionlabel}}{\endlist}
613 \newcommand{\descriptionlabel}[1]{%
614    \hspace\labelsep\normalfont\bfseries #1}
615 \newenvironment{verse}
616   {\let\\\@centercr
617    \list{}{\itemsep\z@ \itemindent -1.5em%
618            \listparindent\itemindent
619            \rightmargin\leftmargin \advance\leftmargin 1.5em}%
620            \item\relax}{\endlist}
621 \newenvironment{quotation}
622   {\list{}{\listparindent 1.5em%
623            \itemindent\listparindent
624            \rightmargin\leftmargin
625            \parsep\z@ \@plus\p@}%
626            \item\relax}{\endlist}
627 \newenvironment{quote}
628   {\list{}{\rightmargin\leftmargin}%
629            \item\relax}{\endlist}
630 \newcounter{figure}[chapter]
631 \renewcommand{\thefigure}{%
632   \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@figure}
633 \def\fps@figure{tbp}
634 \def\ftype@figure{1}
635 \def\ext@figure{lof}
636 \def\fnum@figure{\figurename~\thefigure}
637 \newenvironment{figure}
638                {\@float{figure}}
639                {\end@float}
640 \newenvironment{figure*}
641                {\@dblfloat{figure}}
642                {\end@dblfloat}
643 \newcounter{table}[chapter]
644 \renewcommand{\thetable}{%
645   \ifnum\c@chapter>\z@\thechapter.\fi\@arabic\c@table}
646 \def\fps@table{tbp}
647 \def\ftype@table{2}
648 \def\ext@table{lot}
649 \def\fnum@table{\tablename~\thetable}
650 \newenvironment{table}
651                {\@float{table}}
652                {\end@float}
653 \newenvironment{table*}
654                {\@dblfloat{table}}
655                {\end@dblfloat}
656 \newlength\abovecaptionskip
657 \newlength\belowcaptionskip
658 \setlength\abovecaptionskip{10\p@}
659 \setlength\belowcaptionskip{0\p@}
660 \long\def\@makecaption#1#2{%
661   \vskip\abovecaptionskip
662   \ifnum\ltjgetparameter{direction}=3 \sbox\@tempboxa{#1\hskip1\zw#2}%
663     \else\sbox\@tempboxa{#1: #2}%
664   \fi
665   \ifdim \wd\@tempboxa >\hsize
666     \ifnum\ltjgetparameter{direction}=3  #1\hskip1\zw#2\relax\par
667       \else #1: #2\relax\par\fi
668   \else
669     \global \@minipagefalse
670     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
671   \fi
672   \vskip\belowcaptionskip}
673 \setlength\arraycolsep{5\p@}
674 \setlength\tabcolsep{6\p@}
675 \setlength\arrayrulewidth{.4\p@}
676 \setlength\doublerulesep{2\p@}
677 \setlength\tabbingsep{\labelsep}
678 \skip\@mpfootins = \skip\footins
679 \setlength\fboxsep{3\p@}
680 \setlength\fboxrule{.4\p@}
681 \@addtoreset{equation}{chapter}
682 \renewcommand{\theequation}{%
683   \ifnum\c@chapter>\z@\thechapter.\fi \@arabic\c@equation}
684 \if@compatibility\else
685   \DeclareSymbolFont{mincho}{JY3}{mc}{m}{n}
686   \DeclareSymbolFontAlphabet{\mathmc}{mincho}
687   \SetSymbolFont{mincho}{bold}{JY3}{gt}{m}{n}
688   \jfam\symmincho
689   \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n}
690 \fi
691 \if@mathrmmc
692   \AtBeginDocument{%
693   \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
694   \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}
695 }%
696 \fi
697 \DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
698 \DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
699 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
700 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
701 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
702 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
703 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
704 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
705 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
706 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
707 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
708 \setcounter{tocdepth}{2}
709 \newcommand{\@pnumwidth}{1.55em}
710 \newcommand{\@tocrmarg}{2.55em}
711 \newcommand{\@dotsep}{4.5}
712 \newdimen\toclineskip
713 \setlength\toclineskip{\z@}
714 \newdimen\@lnumwidth
715 \def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}}
716 \def\@dottedtocline#1#2#3#4#5{%
717   \ifnum #1>\c@tocdepth \else
718     \vskip\toclineskip \@plus.2\p@
719     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
720      \parindent #2\relax\@afterindenttrue
721      \interlinepenalty\@M
722      \leavevmode
723      \@lnumwidth #3\relax
724      \advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip
725      {#4}\nobreak
726      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}%
727      \hfill\nobreak
728      \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}%
729      \par}%
730   \fi}
731 \def\addcontentsline#1#2#3{%
732   \protected@write\@auxout
733     {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
734 \@temptokena{\thepage}}%
735     {\string\@writefile{#1}%
736        {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
737 }
738 \newcommand{\tableofcontents}{%
739   \if@twocolumn\@restonecoltrue\onecolumn
740   \else\@restonecolfalse\fi
741   \chapter*{\contentsname
742     \@mkboth{\contentsname}{\contentsname}%
743   }\@starttoc{toc}%
744   \if@restonecol\twocolumn\fi
745 }
746 \newcommand*{\l@part}[2]{%
747   \ifnum \c@tocdepth >-2\relax
748     \addpenalty{-\@highpenalty}%
749     \addvspace{2.25em \@plus\p@}%
750     \begingroup
751     \parindent\z@\rightskip\@pnumwidth
752     \parfillskip-\@pnumwidth
753     {\leavevmode\large\bfseries
754      \setlength\@lnumwidth{4\zw}%
755      #1\hfil\nobreak
756      \hb@xt@\@pnumwidth{\hss#2}}\par
757     \nobreak
758     \global\@nobreaktrue
759     \everypar{\global\@nobreakfalse\everypar{}}%
760      \endgroup
761   \fi}
762 \newcommand*{\l@chapter}[2]{%
763   \ifnum \c@tocdepth >\m@ne
764     \addpenalty{-\@highpenalty}%
765     \addvspace{1.0em \@plus\p@}%
766     \begingroup
767       \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
768       \leavevmode\bfseries
769       \setlength\@lnumwidth{4\zw}%
770       \advance\leftskip\@lnumwidth \hskip-\leftskip
771       #1\nobreak\hfil\nobreak\hb@xt@\@pnumwidth{\hss#2}\par
772       \penalty\@highpenalty
773     \endgroup
774   \fi}
775 \newcommand*{\l@section}{\@dottedtocline{1}{1.5em}{2.3em}}
776 \newcommand*{\l@subsection}   {\@dottedtocline{2}{3.8em}{3.2em}}
777 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{7.0em}{4.1em}}
778 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{10em}{5em}}
779 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{12em}{6em}}
780 \newcommand{\listoffigures}{%
781   \if@twocolumn\@restonecoltrue\onecolumn
782   \else\@restonecolfalse\fi
783   \chapter*{\listfigurename}%
784   \@mkboth{\listfigurename}{\listfigurename}%
785   \@starttoc{lof}%
786   \if@restonecol\twocolumn\fi
787 }
788 \newcommand*{\l@figure}{\@dottedtocline{1}{1.5em}{2.3em}}
789 \newcommand{\listoftables}{%
790   \if@twocolumn\@restonecoltrue\onecolumn
791   \else\@restonecolfalse\fi
792   \chapter*{\listtablename}%
793   \@mkboth{\listtablename}{\listtablename}%
794   \@starttoc{lot}%
795   \if@restonecol\twocolumn\fi
796 }
797 \let\l@table\l@figure
798 \newdimen\bibindent
799 \setlength\bibindent{1.5em}
800 \newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
801 \newenvironment{thebibliography}[1]
802 {\chapter*{\bibname}\@mkboth{\bibname}{\bibname}%
803    \list{\@biblabel{\@arabic\c@enumiv}}%
804         {\settowidth\labelwidth{\@biblabel{#1}}%
805          \leftmargin\labelwidth
806          \advance\leftmargin\labelsep
807          \@openbib@code
808          \usecounter{enumiv}%
809          \let\p@enumiv\@empty
810          \renewcommand\theenumiv{\@arabic\c@enumiv}}%
811    \sloppy
812    \clubpenalty4000
813    \@clubpenalty\clubpenalty
814    \widowpenalty4000%
815    \sfcode`\.\@m}
816   {\def\@noitemerr
817     {\@latex@warning{Empty `thebibliography' environment}}%
818    \endlist}
819 \let\@openbib@code\@empty
820 \newenvironment{theindex}
821   {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi
822    \twocolumn[\@makeschapterhead{\indexname}]%
823    \@mkboth{\indexname}{\indexname}%
824    \thispagestyle{jpl@in}\parindent\z@
825    \parskip\z@ \@plus .3\p@\relax
826    \columnseprule\z@ \columnsep 35\p@
827    \let\item\@idxitem}
828   {\if@restonecol\onecolumn\else\clearpage\fi}
829 \newcommand{\@idxitem}{\par\hangindent 40\p@}
830 \newcommand{\subitem}{\@idxitem \hspace*{20\p@}}
831 \newcommand{\subsubitem}{\@idxitem \hspace*{30\p@}}
832 \newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
833 \renewcommand{\footnoterule}{%
834   \kern-3\p@
835   \hrule\@width.4\columnwidth
836   \kern2.6\p@}
837 \@addtoreset{footnote}{chapter}
838 \newcommand\@makefntext[1]{\parindent 1em
839   \noindent\hb@xt@ 1.8em{\hss\@makefnmark}#1}
840 \newif\if西暦 \西暦false
841 \def\西暦{\西暦true}
842 \def\和暦{\西暦false}
843 \newcount\heisei \heisei\year \advance\heisei-1988\relax
844 \def\today{{%
845   \ifnum\ltjgetparameter{direction}=3
846     \if西暦
847       \kansuji\year 年
848       \kansuji\month 月
849       \kansuji\day 日
850     \else
851       平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
852       \kansuji\month 月
853       \kansuji\day 日
854     \fi
855   \else
856     \if西暦
857       \number\year~年
858       \number\month~月
859       \number\day~日
860     \else
861       平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
862       \number\month~月
863       \number\day~日
864     \fi
865   \fi}}
866 \newcommand{\prepartname}{第}
867 \newcommand{\postpartname}{部}
868 \newcommand{\prechaptername}{第}
869 \newcommand{\postchaptername}{章}
870 \newcommand{\contentsname}{目 次}
871 \newcommand{\listfigurename}{図 目 次}
872 \newcommand{\listtablename}{表 目 次}
873 \newcommand{\bibname}{関連図書}
874 \newcommand{\indexname}{索 引}
875 \newcommand{\figurename}{図}
876 \newcommand{\tablename}{表}
877 \newcommand{\appendixname}{付 録}
878 \pagestyle{headings}
879 \pagenumbering{arabic}
880 \raggedbottom
881 \if@twocolumn
882   \twocolumn
883   \sloppy
884 \else
885   \onecolumn
886 \fi
887 \if@twoside
888   \@mparswitchtrue
889 \else
890   \@mparswitchfalse
891 \fi
892 \endinput
893 %%
894 %% End of file `ltjbook.cls'.