OSDN Git Service

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