OSDN Git Service

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