OSDN Git Service

Merge branch 'vert_vrt2' into kitagawa_test
[luatex-ja/luatexja.git] / src / ltjbook.cls
1 %%
2 %% This is file `ltjbook.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ltjclasses.dtx  (with options: `book,yoko')
8 %% 
9 %% IMPORTANT NOTICE:
10 %% 
11 %% For the copyright see the source file.
12 %% 
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from ltjbook.cls.
15 %% 
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file ltjclasses.dtx.
18 %% 
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
23 %% File: ltjclasses.dtx
24 \NeedsTeXFormat{LaTeX2e}
25 \ProvidesClass{ltjbook}
26   [2017/08/28 v1.7e-ltj-15
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{disablejfam}{%
136     \ClassWarningNoLine{\@currname}{The class option 'disablejfam' is obsolete}}
137   \DeclareOption{mathrmmc}{\@mathrmmctrue}
138 \fi
139 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
140 \DeclareOption{final}{\setlength\overfullrule{0pt}}
141 \directlua{luatexbase.add_to_callback('luatexja.load_jfm',
142   function (ji, jn) ji.chars['parbdd'] = 0; return ji end,
143   'ltj.jclasses_load_jfm', 1)}
144 {\jfont\g=\ltj@stdmcfont:jfm=min } % loading jfm-min.lua
145 \expandafter\let\csname JY3/mc/m/n/10\endcsname\relax
146 \DeclareFontShape{JY3}{mc}{m}{n}{<-> s * [0.962216] \ltj@stdmcfont:jfm=min}{}
147 \DeclareFontShape{JY3}{gt}{m}{n}{<-> s * [0.962216] \ltj@stdgtfont:jfm=min;jfmvar=goth}{}
148 \ltjglobalsetparameter{differentjfm=both}
149 \directlua{luatexbase.remove_from_callback('luatexja.load_jfm', 'ltj.jclasses_load_jfm')}
150 \ExecuteOptions{a4paper,10pt,twoside,onecolumn,final,openright}
151 \ProcessOptions\relax
152 \input{ltjbk1\@ptsize.clo}
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 \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 \DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
742 \DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
743 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
744 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
745 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
746 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
747 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
748 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
749 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
750 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
751 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
752 \setcounter{tocdepth}{2}
753 \newcommand{\@pnumwidth}{1.55em}
754 \newcommand{\@tocrmarg}{2.55em}
755 \newcommand{\@dotsep}{4.5}
756 \newdimen\toclineskip
757 \setlength\toclineskip{\z@}
758 \newdimen\@lnumwidth
759 \def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}}
760 \def\@dottedtocline#1#2#3#4#5{%
761   \ifnum #1>\c@tocdepth \else
762     \vskip\toclineskip \@plus.2\p@
763     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
764      \parindent #2\relax\@afterindenttrue
765      \interlinepenalty\@M
766      \leavevmode
767      \@lnumwidth #3\relax
768      \advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip
769      {#4}\nobreak
770      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}%
771      \hfill\nobreak
772      \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}%
773      \par}%
774   \fi}
775 \def\addcontentsline#1#2#3{%
776   \protected@write\@auxout
777     {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
778 \@temptokena{\thepage}}%
779     {\string\@writefile{#1}%
780        {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
781 }
782 \newcommand{\tableofcontents}{%
783   \if@twocolumn\@restonecoltrue\onecolumn
784   \else\@restonecolfalse\fi
785   \chapter*{\contentsname
786     \@mkboth{\contentsname}{\contentsname}%
787   }\@starttoc{toc}%
788   \if@restonecol\twocolumn\fi
789 }
790 \newcommand*{\l@part}[2]{%
791   \ifnum \c@tocdepth >-2\relax
792     \addpenalty{-\@highpenalty}%
793     \addvspace{2.25em \@plus\p@}%
794     \begingroup
795     \parindent\z@\rightskip\@pnumwidth
796     \parfillskip-\@pnumwidth
797     {\leavevmode\large\bfseries
798      \setlength\@lnumwidth{4\zw}%
799      #1\hfil\nobreak
800      \hb@xt@\@pnumwidth{\hss#2}}\par
801     \nobreak
802     \global\@nobreaktrue
803     \everypar{\global\@nobreakfalse\everypar{}}%
804      \endgroup
805   \fi}
806 \newcommand*{\l@chapter}[2]{%
807   \ifnum \c@tocdepth >\m@ne
808     \addpenalty{-\@highpenalty}%
809     \addvspace{1.0em \@plus\p@}%
810     \begingroup
811       \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
812       \leavevmode\bfseries
813       \setlength\@lnumwidth{4\zw}%
814       \advance\leftskip\@lnumwidth \hskip-\leftskip
815       #1\nobreak\hfil\nobreak\hb@xt@\@pnumwidth{\hss#2}\par
816       \penalty\@highpenalty
817     \endgroup
818   \fi}
819 \newcommand*{\l@section}{\@dottedtocline{1}{1.5em}{2.3em}}
820 \newcommand*{\l@subsection}   {\@dottedtocline{2}{3.8em}{3.2em}}
821 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{7.0em}{4.1em}}
822 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{10em}{5em}}
823 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{12em}{6em}}
824 \newcommand{\listoffigures}{%
825   \if@twocolumn\@restonecoltrue\onecolumn
826   \else\@restonecolfalse\fi
827   \chapter*{\listfigurename}%
828   \@mkboth{\listfigurename}{\listfigurename}%
829   \@starttoc{lof}%
830   \if@restonecol\twocolumn\fi
831 }
832 \newcommand*{\l@figure}{\@dottedtocline{1}{1.5em}{2.3em}}
833 \newcommand{\listoftables}{%
834   \if@twocolumn\@restonecoltrue\onecolumn
835   \else\@restonecolfalse\fi
836   \chapter*{\listtablename}%
837   \@mkboth{\listtablename}{\listtablename}%
838   \@starttoc{lot}%
839   \if@restonecol\twocolumn\fi
840 }
841 \let\l@table\l@figure
842 \newdimen\bibindent
843 \setlength\bibindent{1.5em}
844 \newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
845 \newenvironment{thebibliography}[1]
846 {\chapter*{\bibname}\@mkboth{\bibname}{\bibname}%
847    \list{\@biblabel{\@arabic\c@enumiv}}%
848         {\settowidth\labelwidth{\@biblabel{#1}}%
849          \leftmargin\labelwidth
850          \advance\leftmargin\labelsep
851          \@openbib@code
852          \usecounter{enumiv}%
853          \let\p@enumiv\@empty
854          \renewcommand\theenumiv{\@arabic\c@enumiv}}%
855    \sloppy
856    \clubpenalty4000
857    \@clubpenalty\clubpenalty
858    \widowpenalty4000%
859    \sfcode`\.\@m}
860   {\def\@noitemerr
861     {\@latex@warning{Empty `thebibliography' environment}}%
862    \endlist}
863 \let\@openbib@code\@empty
864 \newenvironment{theindex}
865   {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi
866    \twocolumn[\@makeschapterhead{\indexname}]%
867    \@mkboth{\indexname}{\indexname}%
868    \thispagestyle{jpl@in}\parindent\z@
869    \parskip\z@ \@plus .3\p@\relax
870    \columnseprule\z@ \columnsep 35\p@
871    \let\item\@idxitem}
872   {\if@restonecol\onecolumn\else\clearpage\fi}
873 \newcommand{\@idxitem}{\par\hangindent 40\p@}
874 \newcommand{\subitem}{\@idxitem \hspace*{20\p@}}
875 \newcommand{\subsubitem}{\@idxitem \hspace*{30\p@}}
876 \newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
877 \renewcommand{\footnoterule}{%
878   \kern-3\p@
879   \hrule\@width.4\columnwidth
880   \kern2.6\p@}
881 \@addtoreset{footnote}{chapter}
882 \newcommand\@makefntext[1]{\parindent 1em
883   \noindent\hb@xt@ 1.8em{\hss\@makefnmark}#1}
884 \newif\if西暦 \西暦false
885 \def\西暦{\西暦true}
886 \def\和暦{\西暦false}
887 \newcount\heisei \heisei\year \advance\heisei-1988\relax
888 \def\today{{%
889   \ifnum\ltjgetparameter{direction}=3
890     \if西暦
891       \kansuji\year 年
892       \kansuji\month 月
893       \kansuji\day 日
894     \else
895       平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
896       \kansuji\month 月
897       \kansuji\day 日
898     \fi
899   \else
900     \if西暦
901       \number\year~年
902       \number\month~月
903       \number\day~日
904     \else
905       平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
906       \number\month~月
907       \number\day~日
908     \fi
909   \fi}}
910 \newcommand{\prepartname}{第}
911 \newcommand{\postpartname}{部}
912 \newcommand{\prechaptername}{第}
913 \newcommand{\postchaptername}{章}
914 \newcommand{\contentsname}{目 次}
915 \newcommand{\listfigurename}{図 目 次}
916 \newcommand{\listtablename}{表 目 次}
917 \newcommand{\bibname}{関連図書}
918 \newcommand{\indexname}{索 引}
919 \newcommand{\figurename}{図}
920 \newcommand{\tablename}{表}
921 \newcommand{\appendixname}{付 録}
922 \pagestyle{headings}
923 \pagenumbering{arabic}
924 \raggedbottom
925 \fnfixbottomtrue % 2017-02-19
926 \IfFileExists{stfloats.sty}{\RequirePackage{stfloats}\fnbelowfloat}{}
927 \if@twocolumn
928   \twocolumn
929   \sloppy
930 \else
931   \onecolumn
932 \fi
933 \if@twoside
934   \@mparswitchtrue
935 \else
936   \@mparswitchfalse
937 \fi
938 \AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
939 \AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
940 \endinput
941 %%
942 %% End of file `ltjbook.cls'.