OSDN Git Service

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