OSDN Git Service

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