OSDN Git Service

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