OSDN Git Service

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