OSDN Git Service

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