OSDN Git Service

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