OSDN Git Service

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