OSDN Git Service

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