OSDN Git Service

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