OSDN Git Service

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