OSDN Git Service

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