OSDN Git Service

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