OSDN Git Service

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