OSDN Git Service

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