OSDN Git Service

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