OSDN Git Service

fix ticket #36934
[luatex-ja/luatexja.git] / src / ltjtbook.cls
1 %%
2 %% This is file `ltjtbook.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ltjclasses.dtx  (with options: `book,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 ltjtbook.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{ltjtbook}
26   [2017/01/17 v1.7c-ltj-12
27  Standard LuaLaTeX-ja class]
28 \RequirePackage{luatexja}
29 \newcounter{@paper}
30 \newif\if@landscape \@landscapefalse
31 \newcommand{\@ptsize}{}
32 \newif\if@restonecol
33 \newif\if@titlepage
34 \@titlepagetrue
35 \newif\if@openright
36 \newif\if@mainmatter \@mainmattertrue
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 \@openrighttrue
126 \else
127 \DeclareOption{openright}{\@openrighttrue}
128 \DeclareOption{openany}{\@openrightfalse}
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,twoside,onecolumn,final,openright,tate}
160 \ProcessOptions\relax
161 \input{ltjtbk1\@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\ps@plain{\let\@mkboth\@gobbletwo
211    \let\ps@jpl@in\ps@plain
212    \let\@oddhead\@empty
213    \def\@oddfoot{\reset@font\hfil\thepage\hfil}%
214    \let\@evenhead\@empty
215    \let\@evenfoot\@oddfoot}
216 \let\ps@jpl@in\ps@plain
217 \def\ps@headnombre{\let\@mkboth\@gobbletwo
218     \let\ps@jpl@in\ps@headnombre
219   \def\@evenhead{\hfil\thepage}%
220   \def\@oddhead{\thepage\hfil}%
221   \let\@oddfoot\@empty\let\@evenfoot\@empty}
222 \def\ps@footnombre{\let\@mkboth\@gobbletwo
223     \let\ps@jpl@in\ps@footnombre
224   \def\@evenfoot{\hfil\thepage}%
225   \def\@oddfoot{\thepage\hfil}%
226   \let\@oddhead\@empty\let\@evenhead\@empty}
227 \if@twoside
228   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
229     \let\@oddfoot\@empty\let\@evenfoot\@empty
230     \def\@evenhead{{\leftmark}\hfil\thepage}%
231     \def\@oddhead{\thepage\hfil\rightmark}%
232     \let\@mkboth\markboth
233   \def\chaptermark##1{\markboth{%
234      \ifnum \c@secnumdepth >\m@ne
235          \if@mainmatter
236          \@chapapp\thechapter\@chappos\hskip1\zw
237          \fi
238      \fi
239      ##1}{}}%
240   \def\sectionmark##1{\markright{%
241      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
242      ##1}}%
243   }
244 \else % if not twoside
245   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
246     \let\@oddfoot\@empty
247     \def\@oddhead{\thepage\hfil\rightmark}%
248     \let\@mkboth\markboth
249 \def\chaptermark##1{\markright{%
250    \ifnum \c@secnumdepth >\m@ne
251          \if@mainmatter
252        \@chapapp\thechapter\@chappos\hskip1\zw
253          \fi
254    \fi
255    ##1}}%
256   }
257 \fi
258 \if@twoside
259   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
260     \def\@evenhead{\hfil\leftmark}% right page
261     \def\@evenfoot{\hfil\thepage}% right page
262     \def\@oddhead{\rightmark\hfil}% left page
263     \def\@oddfoot{\thepage\hfil}% left page
264   \let\@mkboth\markboth
265 \def\chaptermark##1{\markboth{%
266      \ifnum \c@secnumdepth >\m@ne
267          \if@mainmatter
268          \@chapapp\thechapter\@chappos\hskip1\zw
269          \fi
270      \fi
271      ##1}{}}%
272   \def\sectionmark##1{\markright{%
273      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
274      ##1}}%
275   }
276 \else % if one column
277   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
278     \def\@oddhead{\rightmark\hfil}%
279     \def\@oddfoot{\thepage\hfil}%
280     \let\@mkboth\markboth
281   \def\chaptermark##1{\markright{%
282      \ifnum \c@secnumdepth >\m@ne
283          \if@mainmatter
284          \@chapapp\thechapter\@chappos\hskip1\zw
285          \fi
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       \cleardoublepage
302      \if@twocolumn\@restonecoltrue\onecolumn
303      \else\@restonecolfalse\newpage\fi
304      \thispagestyle{empty}%
305      \setcounter{page}\z@
306     }%
307     {\if@restonecol\twocolumn\else\newpage\fi
308     }
309 \else
310 \newenvironment{titlepage}
311     {%
312       \cleardoublepage
313       \if@twocolumn
314         \@restonecoltrue\onecolumn
315       \else
316         \@restonecolfalse\newpage
317       \fi
318       \thispagestyle{empty}%
319       \setcounter{page}\@ne
320     }%
321     {\if@restonecol\twocolumn \else \newpage \fi
322      \if@twoside\else
323         \setcounter{page}\@ne
324      \fi
325     }
326 \fi
327 \def\p@thanks#1{\footnotemark
328   \protected@xdef\@thanks{\@thanks
329     \protect{\noindent$\m@th^\thefootnote$~#1\protect\par}}}
330 \if@titlepage
331   \newcommand{\maketitle}{\begin{titlepage}%
332   \let\footnotesize\small
333   \let\footnoterule\relax
334   \let\thanks\p@thanks
335   \let\footnote\thanks
336   \vbox to\textheight\bgroup\tate\hsize\textwidth
337   \null\vfil
338   \vskip 60\p@
339   \begin{center}%
340     {\LARGE \@title \par}%
341     \vskip 3em%
342     {\Large
343      \lineskip .75em%
344       \begin{tabular}[t]{c}%
345         \@author
346       \end{tabular}\par}%
347       \vskip 1.5em%
348     {\large \@date \par}%       % Set date in \large size.
349   \end{center}\par
350   \vfil{\centering\@thanks}\vfil\null
351   \egroup
352   \end{titlepage}%
353   \setcounter{footnote}{0}%
354   \global\let\thanks\relax
355   \global\let\maketitle\relax
356   \global\let\p@thanks\relax
357   \global\let\@thanks\@empty
358   \global\let\@author\@empty
359   \global\let\@date\@empty
360   \global\let\@title\@empty
361   \global\let\title\relax
362   \global\let\author\relax
363   \global\let\date\relax
364   \global\let\and\relax
365   }%
366 \else
367   \newcommand{\maketitle}{\par
368   \begingroup
369     \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
370     \def\@makefnmark{\hbox{\unless\ifnum\ltjgetparameter{direction}=3 $\m@th^{\@thefnmark}$
371       \else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}%
372     \long\def\@makefntext##1{\parindent 1\zw\noindent
373        \hb@xt@ 2\zw{\hss\@makefnmark}##1}%
374     \if@twocolumn
375       \ifnum \col@number=\@ne \@maketitle
376       \else \twocolumn[\@maketitle]%
377       \fi
378     \else
379       \newpage
380       \global\@topnum\z@   % Prevents figures from going at top of page.
381       \@maketitle
382     \fi
383      \thispagestyle{jpl@in}\@thanks
384   \endgroup
385   \setcounter{footnote}{0}%
386   \global\let\thanks\relax
387   \global\let\maketitle\relax
388   \global\let\@maketitle\relax
389   \global\let\p@thanks\relax
390   \global\let\@thanks\@empty
391   \global\let\@author\@empty
392   \global\let\@date\@empty
393   \global\let\@title\@empty
394   \global\let\title\relax
395   \global\let\author\relax
396   \global\let\date\relax
397   \global\let\and\relax
398   }
399   \def\@maketitle{%
400   \newpage\null
401   \vskip 2em%
402   \begin{center}%
403   \let\footnote\p@thanks
404     {\LARGE \@title \par}%
405     \vskip 1.5em%
406     {\large
407       \lineskip .5em%
408       \begin{tabular}[t]{c}%
409         \@author
410       \end{tabular}\par}%
411     \vskip 1em%
412     {\large \@date}%
413   \end{center}%
414   \par\vskip 1.5em}
415 \fi
416 \newcommand*{\chaptermark}[1]{}
417 \setcounter{secnumdepth}{2}
418 \newcounter{part}
419 \newcounter{chapter}
420 \newcounter{section}[chapter]
421 \newcounter{subsection}[section]
422 \newcounter{subsubsection}[subsection]
423 \newcounter{paragraph}[subsubsection]
424 \newcounter{subparagraph}[paragraph]
425 \renewcommand{\thepart}{\rensuji{\@Roman\c@part}}
426 \renewcommand{\thechapter}{\rensuji{\@arabic\c@chapter}}
427 \renewcommand{\thesection}{\thechapter・\rensuji{\@arabic\c@section}}
428 \renewcommand{\thesubsection}{\thesection・\rensuji{\@arabic\c@subsection}}
429 \renewcommand{\thesubsubsection}{%
430    \thesubsection・\rensuji{\@arabic\c@subsubsection}}
431 \renewcommand{\theparagraph}{%
432    \thesubsubsection・\rensuji{\@arabic\c@paragraph}}
433 \renewcommand{\thesubparagraph}{%
434    \theparagraph・\rensuji{\@arabic\c@subparagraph}}
435 \newcommand{\@chapapp}{\prechaptername}
436 \newcommand{\@chappos}{\postchaptername}
437 \newcommand{\frontmatter}{%
438   \if@openright \cleardoublepage \else \clearpage \fi
439   \@mainmatterfalse\pagenumbering{roman}}
440 \newcommand{\mainmatter}{%
441   \if@openright \cleardoublepage \else \clearpage \fi
442   \@mainmattertrue\pagenumbering{arabic}}
443 \newcommand{\backmatter}{%
444   \if@openright \cleardoublepage \else \clearpage \fi
445   \@mainmatterfalse}
446 \newcommand{\part}{%
447   \if@openright \cleardoublepage \else \clearpage \fi
448   \thispagestyle{empty}%
449   \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
450   \null\vfil
451   \secdef\@part\@spart}
452 \def\@part[#1]#2{%
453   \ifnum \c@secnumdepth >-2\relax
454     \refstepcounter{part}%
455     \addcontentsline{toc}{part}{%
456        \prepartname\thepart\postpartname\hspace{1em}#1}%
457   \else
458     \addcontentsline{toc}{part}{#1}%
459   \fi
460   \markboth{}{}%
461   {\centering
462    \interlinepenalty\@M\normalfont
463    \ifnum \c@secnumdepth >-2\relax
464      \huge\bfseries\prepartname\thepart\postpartname
465      \par\vskip20\p@
466    \fi
467    \Huge\bfseries#2\par}%
468    \@endpart}
469 \def\@spart#1{{%
470   \centering
471   \interlinepenalty\@M\normalfont
472   \Huge\bfseries#1\par}%
473   \@endpart}
474 \def\@endpart{\vfil\newpage
475    \if@twoside
476     \if@openright %% added (2016/12/18)
477      \null\thispagestyle{empty}\newpage
478     \fi %% added (2016/12/18)
479    \fi
480    \if@tempswa\twocolumn\fi}
481 \newcommand{\chapter}{%
482   \if@openright\cleardoublepage\else\clearpage\fi
483   \thispagestyle{jpl@in}%
484   \global\@topnum\z@
485   \@afterindenttrue
486   \secdef\@chapter\@schapter}
487 \def\@chapter[#1]#2{%
488   \ifnum \c@secnumdepth >\m@ne
489     \if@mainmatter
490     \refstepcounter{chapter}%
491     \typeout{\@chapapp\space\thechapter\space\@chappos}%
492     \addcontentsline{toc}{chapter}%
493       {\protect\numberline{\@chapapp\thechapter\@chappos}#1}%
494     \else\addcontentsline{toc}{chapter}{#1}\fi
495   \else
496     \addcontentsline{toc}{chapter}{#1}%
497   \fi
498   \chaptermark{#1}%
499   \addtocontents{lof}{\protect\addvspace{10\p@}}%
500   \addtocontents{lot}{\protect\addvspace{10\p@}}%
501   \@makechapterhead{#2}\@afterheading}
502 \def\@makechapterhead#1{\hbox{}%
503   \vskip2\Cvs
504   {\parindent\z@
505    \raggedright
506    \normalfont\huge\bfseries
507    \leavevmode
508    \ifnum \c@secnumdepth >\m@ne
509      \setlength\@tempdima{\linewidth}%
510     \if@mainmatter
511      \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1\zw}%
512      \addtolength\@tempdima{-\wd\z@}%
513      \unhbox\z@\nobreak
514     \fi
515      \vtop{\hsize\@tempdima#1}%
516    \else
517      #1\relax
518    \fi}\nobreak\vskip3\Cvs}
519 \def\@schapter#1{%
520   \@makeschapterhead{#1}\@afterheading
521 }
522 \def\@makeschapterhead#1{\hbox{}%
523   \vskip2\Cvs
524   {\parindent\z@
525    \raggedright
526    \normalfont\huge\bfseries
527    \leavevmode
528    \setlength\@tempdima{\linewidth}%
529    \vtop{\hsize\@tempdima#1}}\vskip3\Cvs}
530 \newcommand{\section}{\@startsection{section}{1}{\z@}%
531    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
532    {.5\Cvs \@plus.3\Cvs}%
533    {\normalfont\Large\bfseries}}
534 \newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
535    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
536    {.5\Cvs \@plus.3\Cvs}%
537    {\normalfont\large\bfseries}}
538 \newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
539    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
540    {.5\Cvs \@plus.3\Cvs}%
541    {\normalfont\normalsize\bfseries}}
542 \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
543    {3.25ex \@plus 1ex \@minus .2ex}%
544    {-1em}%
545    {\normalfont\normalsize\bfseries}}
546 \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
547    {3.25ex \@plus 1ex \@minus .2ex}%
548    {-1em}%
549    {\normalfont\normalsize\bfseries}}
550 \newcommand{\appendix}{\par
551   \setcounter{chapter}{0}%
552   \setcounter{section}{0}%
553   \renewcommand{\@chapapp}{\appendixname}%
554   \renewcommand{\@chappos}\space%
555   \renewcommand{\thechapter}{\rensuji{\@Alph\c@chapter}}}
556 \if@twocolumn
557   \setlength\leftmargini {2em}
558 \else
559   \setlength\leftmargini {2.5em}
560 \fi
561 \setlength\leftmarginii  {2.2em}
562 \setlength\leftmarginiii {1.87em}
563 \setlength\leftmarginiv  {1.7em}
564 \if@twocolumn
565   \setlength\leftmarginv {.5em}
566   \setlength\leftmarginvi{.5em}
567 \else
568   \setlength\leftmarginv {1em}
569   \setlength\leftmarginvi{1em}
570 \fi
571 \setlength  \labelsep  {.5em}
572 \setlength  \labelwidth{\leftmargini}
573 \addtolength\labelwidth{-\labelsep}
574 \@beginparpenalty -\@lowpenalty
575 \@endparpenalty   -\@lowpenalty
576 \@itempenalty     -\@lowpenalty
577 \renewcommand{\theenumi}{\rensuji{\@arabic\c@enumi}}
578 \renewcommand{\theenumii}{\rensuji{(\@alph\c@enumii)}}
579 \renewcommand{\theenumiii}{\rensuji{\@roman\c@enumiii}}
580 \renewcommand{\theenumiv}{\rensuji{\@Alph\c@enumiv}}
581 \newcommand{\labelenumi}{\theenumi}
582 \newcommand{\labelenumii}{\theenumii}
583 \newcommand{\labelenumiii}{\theenumiii}
584 \newcommand{\labelenumiv}{\theenumiv}
585 \renewcommand{\p@enumii}{\theenumi}
586 \renewcommand{\p@enumiii}{\theenumi(\theenumii)}
587 \renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
588 \renewenvironment{enumerate}
589   {\ifnum \@enumdepth >\thr@@\@toodeep\else
590    \advance\@enumdepth\@ne
591    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
592    \expandafter \list \csname label\@enumctr\endcsname{%
593       \ifnum\ltjgetparameter{direction}=3
594          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
595            \else\topsep\z@\fi
596          \parskip\z@ \itemsep\z@ \parsep\z@
597          \labelwidth1\zw \labelsep.3\zw
598          \ifnum \@enumdepth=\@ne \leftmargin1\zw\relax
599            \else\leftmargin\leftskip\fi
600          \advance\leftmargin 1\zw
601       \fi
602          \usecounter{\@enumctr}%
603          \def\makelabel##1{\hss\llap{##1}}}%
604    \fi}{\endlist}
605 \newcommand{\labelitemi}{\textbullet}
606 \newcommand{\labelitemii}{%
607   \ifnum\ltjgetparameter{direction}=3
608      {\textcircled{~}}
609   \else
610      {\normalfont\bfseries\textendash}
611   \fi
612 }
613 \newcommand{\labelitemiii}{\textasteriskcentered}
614 \newcommand{\labelitemiv}{\textperiodcentered}
615 \renewenvironment{itemize}
616   {\ifnum \@itemdepth >\thr@@\@toodeep\else
617    \advance\@itemdepth\@ne
618    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
619    \expandafter \list \csname \@itemitem\endcsname{%
620       \ifnum\ltjgetparameter{direction}=3
621          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
622            \else\topsep\z@\fi
623          \parskip\z@ \itemsep\z@ \parsep\z@
624          \labelwidth1\zw \labelsep.3\zw
625          \ifnum \@itemdepth =\@ne \leftmargin1\zw\relax
626            \else\leftmargin\leftskip\fi
627          \advance\leftmargin 1\zw
628       \fi
629          \def\makelabel##1{\hss\llap{##1}}}%
630    \fi}{\endlist}
631 \newenvironment{description}
632   {\list{}{\labelwidth\z@ \itemindent-\leftmargin
633    \ifnum\ltjgetparameter{direction}=3
634      \leftmargin\leftskip \advance\leftmargin3\Cwd
635      \rightmargin\rightskip
636      \labelsep=1\zw \itemsep\z@
637      \listparindent\z@ \topskip\z@ \parskip\z@ \partopsep\z@
638    \fi
639            \let\makelabel\descriptionlabel}}{\endlist}
640 \newcommand{\descriptionlabel}[1]{%
641    \hspace\labelsep\normalfont\bfseries #1}
642 \newenvironment{verse}
643   {\let\\\@centercr
644    \list{}{\itemsep\z@ \itemindent -1.5em%
645            \listparindent\itemindent
646            \rightmargin\leftmargin \advance\leftmargin 1.5em}%
647            \item\relax}{\endlist}
648 \newenvironment{quotation}
649   {\list{}{\listparindent 1.5em%
650            \itemindent\listparindent
651            \rightmargin\leftmargin
652            \parsep\z@ \@plus\p@}%
653            \item\relax}{\endlist}
654 \newenvironment{quote}
655   {\list{}{\rightmargin\leftmargin}%
656            \item\relax}{\endlist}
657 \newcounter{figure}[chapter]
658 \renewcommand{\thefigure}{%
659   \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@figure}}
660 \def\fps@figure{tbp}
661 \def\ftype@figure{1}
662 \def\ext@figure{lof}
663 \def\fnum@figure{\figurename\thefigure}
664 \newenvironment{figure}
665                {\@float{figure}}
666                {\end@float}
667 \newenvironment{figure*}
668                {\@dblfloat{figure}}
669                {\end@dblfloat}
670 \newcounter{table}[chapter]
671 \renewcommand{\thetable}{%
672   \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@table}}
673 \def\fps@table{tbp}
674 \def\ftype@table{2}
675 \def\ext@table{lot}
676 \def\fnum@table{\tablename\thetable}
677 \newenvironment{table}
678                {\@float{table}}
679                {\end@float}
680 \newenvironment{table*}
681                {\@dblfloat{table}}
682                {\end@dblfloat}
683 \newlength\abovecaptionskip
684 \newlength\belowcaptionskip
685 \setlength\abovecaptionskip{10\p@}
686 \setlength\belowcaptionskip{0\p@}
687 \long\def\@makecaption#1#2{%
688   \vskip\abovecaptionskip
689   \ifnum\ltjgetparameter{direction}=3 \sbox\@tempboxa{#1\hskip1\zw#2}%
690     \else\sbox\@tempboxa{#1: #2}%
691   \fi
692   \ifdim \wd\@tempboxa >\hsize
693     \ifnum\ltjgetparameter{direction}=3  #1\hskip1\zw#2\relax\par
694       \else #1: #2\relax\par\fi
695   \else
696     \global \@minipagefalse
697     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
698   \fi
699   \vskip\belowcaptionskip}
700 \setlength\arraycolsep{5\p@}
701 \setlength\tabcolsep{6\p@}
702 \setlength\arrayrulewidth{.4\p@}
703 \setlength\doublerulesep{2\p@}
704 \setlength\tabbingsep{\labelsep}
705 \skip\@mpfootins = \skip\footins
706 \setlength\fboxsep{3\p@}
707 \setlength\fboxrule{.4\p@}
708 \@addtoreset{equation}{chapter}
709 \renewcommand{\theequation}{%
710   \ifnum\c@chapter>\z@\thechapter.\fi \@arabic\c@equation}
711 \if@compatibility\else
712   \DeclareSymbolFont{mincho}{JY3}{mc}{m}{n}
713   \DeclareSymbolFontAlphabet{\mathmc}{mincho}
714   \SetSymbolFont{mincho}{bold}{JY3}{gt}{m}{n}
715   \jfam\symmincho
716   \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n}
717 \fi
718 \if@mathrmmc
719   \AtBeginDocument{%
720   \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
721   \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}
722 }%
723 \fi
724 \DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
725 \DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
726 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
727 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
728 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
729 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
730 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
731 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
732 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
733 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
734 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
735 \setcounter{tocdepth}{2}
736 \newcommand{\@pnumwidth}{1.55em}
737 \newcommand{\@tocrmarg}{2.55em}
738 \newcommand{\@dotsep}{4.5}
739 \newdimen\toclineskip
740 \setlength\toclineskip{2\p@}
741 \newdimen\@lnumwidth
742 \def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}}
743 \def\@dottedtocline#1#2#3#4#5{%
744   \ifnum #1>\c@tocdepth \else
745     \vskip\toclineskip \@plus.2\p@
746     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
747      \parindent #2\relax\@afterindenttrue
748      \interlinepenalty\@M
749      \leavevmode
750      \@lnumwidth #3\relax
751      \advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip
752      {#4}\nobreak
753      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}%
754      \hfill\nobreak
755      \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}%
756      \par}%
757   \fi}
758 \def\addcontentsline#1#2#3{%
759   \protected@write\@auxout
760     {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
761 \@temptokena{\rensuji{\thepage}}}%
762     {\string\@writefile{#1}%
763        {\protect\contentsline{#2}{#3}{\the\@temptokena}}}%
764 }
765 \newcommand{\tableofcontents}{%
766   \if@twocolumn\@restonecoltrue\onecolumn
767   \else\@restonecolfalse\fi
768   \chapter*{\contentsname
769     \@mkboth{\contentsname}{\contentsname}%
770   }\@starttoc{toc}%
771   \if@restonecol\twocolumn\fi
772 }
773 \newcommand*{\l@part}[2]{%
774   \ifnum \c@tocdepth >-2\relax
775     \addpenalty{-\@highpenalty}%
776     \addvspace{2.25em \@plus\p@}%
777     \begingroup
778     \parindent\z@\rightskip\@pnumwidth
779     \parfillskip-\@pnumwidth
780     {\leavevmode\large\bfseries
781      \setlength\@lnumwidth{4\zw}%
782      #1\hfil\nobreak
783      \hb@xt@\@pnumwidth{\hss#2}}\par
784     \nobreak
785     \global\@nobreaktrue
786     \everypar{\global\@nobreakfalse\everypar{}}%
787      \endgroup
788   \fi}
789 \newcommand*{\l@chapter}[2]{%
790   \ifnum \c@tocdepth >\m@ne
791     \addpenalty{-\@highpenalty}%
792     \addvspace{1.0em \@plus\p@}%
793     \begingroup
794       \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
795       \leavevmode\bfseries
796       \setlength\@lnumwidth{4\zw}%
797       \advance\leftskip\@lnumwidth \hskip-\leftskip
798       #1\nobreak\hfil\nobreak\hb@xt@\@pnumwidth{\hss#2}\par
799       \penalty\@highpenalty
800     \endgroup
801   \fi}
802 \newcommand*{\l@section}{\@dottedtocline{1}{1\zw}{4\zw}}
803 \newcommand*{\l@subsection}   {\@dottedtocline{2}{2\zw}{6\zw}}
804 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{3\zw}{8\zw}}
805 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{4\zw}{9\zw}}
806 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{5\zw}{10\zw}}
807 \newcommand{\listoffigures}{%
808   \if@twocolumn\@restonecoltrue\onecolumn
809   \else\@restonecolfalse\fi
810   \chapter*{\listfigurename}%
811   \@mkboth{\listfigurename}{\listfigurename}%
812   \@starttoc{lof}%
813   \if@restonecol\twocolumn\fi
814 }
815 \newcommand*{\l@figure}{\@dottedtocline{1}{1\zw}{4\zw}}
816 \newcommand{\listoftables}{%
817   \if@twocolumn\@restonecoltrue\onecolumn
818   \else\@restonecolfalse\fi
819   \chapter*{\listtablename}%
820   \@mkboth{\listtablename}{\listtablename}%
821   \@starttoc{lot}%
822   \if@restonecol\twocolumn\fi
823 }
824 \let\l@table\l@figure
825 \newdimen\bibindent
826 \setlength\bibindent{1.5em}
827 \newcommand{\newblock}{\hskip .11em\@plus.33em\@minus.07em}
828 \newenvironment{thebibliography}[1]
829 {\chapter*{\bibname}\@mkboth{\bibname}{\bibname}%
830    \list{\@biblabel{\@arabic\c@enumiv}}%
831         {\settowidth\labelwidth{\@biblabel{#1}}%
832          \leftmargin\labelwidth
833          \advance\leftmargin\labelsep
834          \@openbib@code
835          \usecounter{enumiv}%
836          \let\p@enumiv\@empty
837          \renewcommand\theenumiv{\@arabic\c@enumiv}}%
838    \sloppy
839    \clubpenalty4000
840    \@clubpenalty\clubpenalty
841    \widowpenalty4000%
842    \sfcode`\.\@m}
843   {\def\@noitemerr
844     {\@latex@warning{Empty `thebibliography' environment}}%
845    \endlist}
846 \let\@openbib@code\@empty
847 \newenvironment{theindex}
848   {\if@twocolumn\@restonecolfalse\else\@restonecoltrue\fi
849    \twocolumn[\@makeschapterhead{\indexname}]%
850    \@mkboth{\indexname}{\indexname}%
851    \thispagestyle{jpl@in}\parindent\z@
852    \parskip\z@ \@plus .3\p@\relax
853    \columnseprule\z@ \columnsep 35\p@
854    \let\item\@idxitem}
855   {\if@restonecol\onecolumn\else\clearpage\fi}
856 \newcommand{\@idxitem}{\par\hangindent 40\p@}
857 \newcommand{\subitem}{\@idxitem \hspace*{20\p@}}
858 \newcommand{\subsubitem}{\@idxitem \hspace*{30\p@}}
859 \newcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
860 \renewcommand{\footnoterule}{%
861   \kern-3\p@
862   \hrule\@width.4\columnwidth
863   \kern2.6\p@}
864 \@addtoreset{footnote}{chapter}
865 \newcommand\@makefntext[1]{\parindent 1\zw
866   \noindent\hb@xt@ 2\zw{\hss\@makefnmark}#1}
867 \newif\if西暦 \西暦false
868 \def\西暦{\西暦true}
869 \def\和暦{\西暦false}
870 \newcount\heisei \heisei\year \advance\heisei-1988\relax
871 \def\today{{%
872   \ifnum\ltjgetparameter{direction}=3
873     \if西暦
874       \kansuji\year 年
875       \kansuji\month 月
876       \kansuji\day 日
877     \else
878       平成\ifnum\heisei=1 元年\else\kansuji\heisei 年\fi
879       \kansuji\month 月
880       \kansuji\day 日
881     \fi
882   \else
883     \if西暦
884       \number\year~年
885       \number\month~月
886       \number\day~日
887     \else
888       平成\ifnum\heisei=1 元年\else\number\heisei~年\fi
889       \number\month~月
890       \number\day~日
891     \fi
892   \fi}}
893 \newcommand{\prepartname}{第}
894 \newcommand{\postpartname}{部}
895 \newcommand{\prechaptername}{第}
896 \newcommand{\postchaptername}{章}
897 \newcommand{\contentsname}{目 次}
898 \newcommand{\listfigurename}{図 目 次}
899 \newcommand{\listtablename}{表 目 次}
900 \newcommand{\bibname}{関連図書}
901 \newcommand{\indexname}{索 引}
902 \newcommand{\figurename}{図}
903 \newcommand{\tablename}{表}
904 \newcommand{\appendixname}{付 録}
905 \pagestyle{headings}
906 \pagenumbering{arabic}
907 \raggedbottom
908 \if@twocolumn
909   \twocolumn
910   \sloppy
911 \else
912   \onecolumn
913 \fi
914 \normalmarginpar
915 \@mparswitchfalse
916 \endinput
917 %%
918 %% End of file `ltjtbook.cls'.