OSDN Git Service

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