OSDN Git Service

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