OSDN Git Service

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