OSDN Git Service

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