OSDN Git Service

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