OSDN Git Service

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