OSDN Git Service

新元号対応 (WIP; ltjclasses only)
[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   [2018/10/08 v1.8-ltj-16
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(\number\year-\two@digits\month-\two@digits\day
95      \space\two@digits\hour:\two@digits\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 \AtEndOfPackageFile{everyshi}{%
109   \def\@EveryShipout@Output{%
110     \setbox8\vbox{%
111       \yoko
112       \@EveryShipout@Hook
113       \@EveryShipout@AtNextHook
114       \global\setbox\luatexoutputbox=\box\luatexoutputbox
115     }%
116     \gdef\@EveryShipout@AtNextHook{}%
117     \@EveryShipout@Org@Shipout\box\luatexoutputbox
118   }}
119 \DeclareOption{oneside}{\@twosidefalse}
120 \DeclareOption{twoside}{\@twosidetrue}
121 \DeclareOption{onecolumn}{\@twocolumnfalse}
122 \DeclareOption{twocolumn}{\@twocolumntrue}
123 \DeclareOption{titlepage}{\@titlepagetrue}
124 \DeclareOption{notitlepage}{\@titlepagefalse}
125 \if@compatibility
126 \@openrighttrue
127 \else
128 \DeclareOption{openright}{\@openrighttrue\@openleftfalse}
129 \DeclareOption{openleft}{\@openlefttrue\@openrightfalse}
130 \DeclareOption{openany}{\@openrightfalse\@openleftfalse}
131 \fi
132 \DeclareOption{leqno}{\input{leqno.clo}}
133 \DeclareOption{fleqn}{\input{fleqn.clo}}
134 \DeclareOption{openbib}{%
135   \AtEndOfPackage{%
136    \renewcommand\@openbib@code{%
137       \advance\leftmargin\bibindent
138       \itemindent -\bibindent
139       \listparindent \itemindent
140       \parsep \z@
141       }%
142    \renewcommand\newblock{\par}}}
143 \if@compatibility
144   \@mathrmmctrue
145 \else
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 \def\Cjascale{0.962216}
164 \if@stysize
165   \setlength\columnsep{3\Cwd}
166 \else
167   \setlength\columnsep{10\p@}
168 \fi
169 \setlength\columnseprule{0\p@}
170 \iftombow
171   \newlength{\stockwidth}
172   \newlength{\stockheight}
173   \setlength{\stockwidth}{\paperwidth}
174   \setlength{\stockheight}{\paperheight}
175   \advance \stockwidth 2in
176   \advance \stockheight 2in
177   \ifdefined\pdfpagewidth
178     \setlength{\pdfpagewidth}{\stockwidth}
179     \setlength{\pdfpageheight}{\stockheight}
180   \else
181     \setlength{\pagewidth}{\stockwidth}
182     \setlength{\pageheight}{\stockheight}
183   \fi
184 \else
185   \ifdefined\pdfpagewidth
186     \setlength{\pdfpagewidth}{\paperwidth}
187     \setlength{\pdfpageheight}{\paperheight}
188   \else
189     \setlength{\pagewidth}{\paperwidth}
190     \setlength{\pageheight}{\paperheight}
191   \fi
192 \fi
193 \setlength\lineskip{1\p@}
194 \setlength\normallineskip{1\p@}
195 \renewcommand{\baselinestretch}{}
196 \setlength\parskip{0\p@ \@plus \p@}
197 \setlength\parindent{1\Cwd}
198 \@lowpenalty   51
199 \@medpenalty  151
200 \@highpenalty 301
201 \setcounter{topnumber}{2}
202 \setcounter{bottomnumber}{1}
203 \setcounter{totalnumber}{3}
204 \setcounter{dbltopnumber}{2}
205 \renewcommand{\topfraction}{.7}
206 \renewcommand{\bottomfraction}{.3}
207 \renewcommand{\textfraction}{.2}
208 \renewcommand{\floatpagefraction}{.5}
209 \renewcommand{\dbltopfraction}{.7}
210 \renewcommand{\dblfloatpagefraction}{.5}
211 \def\pltx@cleartorightpage{\clearpage\if@twoside
212   \unless\ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax
213     \hbox{}\thispagestyle{empty}\newpage
214     \if@twocolumn\hbox{}\newpage\fi
215   \fi\fi}
216 \def\pltx@cleartoleftpage{\clearpage\if@twoside
217   \ifodd\numexpr\c@page+\ltjgetparameter{direction}\relax
218     \hbox{}\thispagestyle{empty}\newpage
219     \if@twocolumn\hbox{}\newpage\fi
220   \fi\fi}
221 \def\pltx@cleartooddpage{\clearpage\if@twoside
222   \ifodd\c@page\else
223     \hbox{}\thispagestyle{empty}\newpage
224     \if@twocolumn\hbox{}\newpage\fi
225   \fi\fi}
226 \def\pltx@cleartoevenpage{\clearpage\if@twoside
227   \ifodd\c@page
228     \hbox{}\thispagestyle{empty}\newpage
229     \if@twocolumn\hbox{}\newpage\fi
230   \fi\fi}
231 \if@openleft
232   \let\cleardoublepage\pltx@cleartoleftpage
233 \else\if@openright
234   \let\cleardoublepage\pltx@cleartorightpage
235 \fi\fi
236 \def\ps@plain{\let\@mkboth\@gobbletwo
237    \let\ps@jpl@in\ps@plain
238    \let\@oddhead\@empty
239    \def\@oddfoot{\reset@font\hfil\thepage\hfil}%
240    \let\@evenhead\@empty
241    \let\@evenfoot\@oddfoot}
242 \let\ps@jpl@in\ps@plain
243 \def\ps@headnombre{\let\@mkboth\@gobbletwo
244     \let\ps@jpl@in\ps@headnombre
245   \def\@evenhead{\hfil\thepage}%
246   \def\@oddhead{\thepage\hfil}%
247   \let\@oddfoot\@empty\let\@evenfoot\@empty}
248 \def\ps@footnombre{\let\@mkboth\@gobbletwo
249     \let\ps@jpl@in\ps@footnombre
250   \def\@evenfoot{\hfil\thepage}%
251   \def\@oddfoot{\thepage\hfil}%
252   \let\@oddhead\@empty\let\@evenhead\@empty}
253 \if@twoside
254   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
255     \let\@oddfoot\@empty\let\@evenfoot\@empty
256     \def\@evenhead{{\leftmark}\hfil\thepage}%
257     \def\@oddhead{\thepage\hfil\rightmark}%
258     \let\@mkboth\markboth
259   \def\chaptermark##1{\markboth{%
260      \ifnum \c@secnumdepth >\m@ne
261        \if@mainmatter
262          \@chapapp\thechapter\@chappos\hskip1\zw
263        \fi
264      \fi
265      ##1}{}}%
266   \def\sectionmark##1{\markright{%
267      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
268      ##1}}%
269   }
270 \else % if not twoside
271   \def\ps@headings{\let\ps@jpl@in\ps@headnombre
272     \let\@oddfoot\@empty
273     \def\@oddhead{\thepage\hfil\rightmark}%
274     \let\@mkboth\markboth
275 \def\chaptermark##1{\markright{%
276    \ifnum \c@secnumdepth >\m@ne
277      \if@mainmatter
278        \@chapapp\thechapter\@chappos\hskip1\zw
279      \fi
280    \fi
281    ##1}}%
282   }
283 \fi
284 \if@twoside
285   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
286     \def\@evenhead{\hfil\leftmark}% right page
287     \def\@evenfoot{\hfil\thepage}% right page
288     \def\@oddhead{\rightmark\hfil}% left page
289     \def\@oddfoot{\thepage\hfil}% left page
290   \let\@mkboth\markboth
291 \def\chaptermark##1{\markboth{%
292      \ifnum \c@secnumdepth >\m@ne
293        \if@mainmatter
294          \@chapapp\thechapter\@chappos\hskip1\zw
295        \fi
296      \fi
297      ##1}{}}%
298   \def\sectionmark##1{\markright{%
299      \ifnum \c@secnumdepth >\z@ \thesection.\hskip1\zw\fi
300      ##1}}%
301   }
302 \else % if one column
303   \def\ps@bothstyle{\let\ps@jpl@in\ps@footnombre
304     \def\@oddhead{\rightmark\hfil}%
305     \def\@oddfoot{\thepage\hfil}%
306     \let\@mkboth\markboth
307   \def\chaptermark##1{\markright{%
308      \ifnum \c@secnumdepth >\m@ne
309        \if@mainmatter
310          \@chapapp\thechapter\@chappos\hskip1\zw
311        \fi
312      \fi
313      ##1}}%
314   }
315 \fi
316 \def\ps@myheadings{\let\ps@jpl@in\ps@plain%
317   \let\@oddfoot\@empty\let\@evenfoot\@empty
318   \def\@evenhead{{\leftmark}\hfil\thepage}%
319   \def\@oddhead{\thepage\hfil\rightmark}%
320   \let\@mkboth\@gobbletwo
321   \let\chaptermark\@gobble
322   \let\sectionmark\@gobble
323 }
324 \if@compatibility
325 \newenvironment{titlepage}
326     {%
327      \cleardoublepage
328      \if@twocolumn\@restonecoltrue\onecolumn
329      \else\@restonecolfalse\newpage\fi
330      \thispagestyle{empty}%
331      \setcounter{page}\z@
332     }%
333     {\if@restonecol\twocolumn\else\newpage\fi
334     }
335 \else
336 \newenvironment{titlepage}
337     {%
338       \pltx@cleartooddpage %% 2017/02/15
339       \if@twocolumn
340         \@restonecoltrue\onecolumn
341       \else
342         \@restonecolfalse\newpage
343       \fi
344       \thispagestyle{empty}%
345       \ifodd\c@page\setcounter{page}\@ne\else\setcounter{page}\z@\fi %% 2017/02/15
346     }%
347     {\if@restonecol\twocolumn \else \newpage \fi
348      \if@twoside\else
349         \setcounter{page}\@ne
350      \fi
351     }
352 \fi
353 \def\p@thanks#1{\footnotemark
354   \protected@xdef\@thanks{\@thanks
355     \protect{\noindent\hbox{\yoko$\m@th^\thefootnote$}#1\protect\par}}}
356 \if@titlepage
357   \newcommand{\maketitle}{\begin{titlepage}%
358   \let\footnotesize\small
359   \let\footnoterule\relax
360   \let\thanks\p@thanks
361   \let\footnote\thanks
362   \vbox to\textheight\bgroup\tate\hsize\textwidth
363   \null\vfil
364   \vskip 60\p@
365   \begin{center}%
366     {\LARGE \@title \par}%
367     \vskip 3em%
368     {\Large
369      \lineskip .75em%
370       \begin{tabular}[t]{c}%
371         \@author
372       \end{tabular}\par}%
373       \vskip 1.5em%
374     {\large \@date \par}%       % Set date in \large size.
375   \end{center}\par
376   \vfil{\centering\@thanks}\vfil\null
377   \egroup
378   \end{titlepage}%
379   \setcounter{footnote}{0}%
380   \global\let\thanks\relax
381   \global\let\maketitle\relax
382   \global\let\p@thanks\relax
383   \global\let\@thanks\@empty
384   \global\let\@author\@empty
385   \global\let\@date\@empty
386   \global\let\@title\@empty
387   \global\let\title\relax
388   \global\let\author\relax
389   \global\let\date\relax
390   \global\let\and\relax
391   }%
392 \else
393   \newcommand{\maketitle}{\par
394   \begingroup
395     \renewcommand{\thefootnote}{\fnsymbol{footnote}}%
396     \def\@makefnmark{\hbox{\unless\ifnum\ltjgetparameter{direction}=3 $\m@th^{\@thefnmark}$
397       \else\hbox{\yoko$\m@th^{\@thefnmark}$}\fi}}%
398     \long\def\@makefntext##1{\parindent 1\zw\noindent
399        \hb@xt@ 2\zw{\hss\@makefnmark}##1}%
400     \if@twocolumn
401       \ifnum \col@number=\@ne \@maketitle
402       \else \twocolumn[\@maketitle]%
403       \fi
404     \else
405       \newpage
406       \global\@topnum\z@   % Prevents figures from going at top of page.
407       \@maketitle
408     \fi
409      \thispagestyle{jpl@in}\@thanks
410   \endgroup
411   \setcounter{footnote}{0}%
412   \global\let\thanks\relax
413   \global\let\maketitle\relax
414   \global\let\@maketitle\relax
415   \global\let\p@thanks\relax
416   \global\let\@thanks\@empty
417   \global\let\@author\@empty
418   \global\let\@date\@empty
419   \global\let\@title\@empty
420   \global\let\title\relax
421   \global\let\author\relax
422   \global\let\date\relax
423   \global\let\and\relax
424   }
425   \def\@maketitle{%
426   \newpage\null
427   \vskip 2em%
428   \begin{center}%
429   \let\footnote\p@thanks
430     {\LARGE \@title \par}%
431     \vskip 1.5em%
432     {\large
433       \lineskip .5em%
434       \begin{tabular}[t]{c}%
435         \@author
436       \end{tabular}\par}%
437     \vskip 1em%
438     {\large \@date}%
439   \end{center}%
440   \par\vskip 1.5em}
441 \fi
442 \newcommand*{\chaptermark}[1]{}
443 \setcounter{secnumdepth}{2}
444 \newcounter{part}
445 \newcounter{chapter}
446 \newcounter{section}[chapter]
447 \newcounter{subsection}[section]
448 \newcounter{subsubsection}[subsection]
449 \newcounter{paragraph}[subsubsection]
450 \newcounter{subparagraph}[paragraph]
451 \renewcommand{\thepart}{\rensuji{\@Roman\c@part}}
452 \renewcommand{\thechapter}{\rensuji{\@arabic\c@chapter}}
453 \renewcommand{\thesection}{\thechapter・\rensuji{\@arabic\c@section}}
454 \renewcommand{\thesubsection}{\thesection・\rensuji{\@arabic\c@subsection}}
455 \renewcommand{\thesubsubsection}{%
456    \thesubsection・\rensuji{\@arabic\c@subsubsection}}
457 \renewcommand{\theparagraph}{%
458    \thesubsubsection・\rensuji{\@arabic\c@paragraph}}
459 \renewcommand{\thesubparagraph}{%
460    \theparagraph・\rensuji{\@arabic\c@subparagraph}}
461 \newcommand{\@chapapp}{\prechaptername}
462 \newcommand{\@chappos}{\postchaptername}
463 \newcommand{\frontmatter}{%
464   \pltx@cleartooddpage
465   \@mainmatterfalse\pagenumbering{roman}}
466 \newcommand{\mainmatter}{%
467   \pltx@cleartooddpage
468   \@mainmattertrue\pagenumbering{arabic}}
469 \newcommand{\backmatter}{%
470   \if@openleft \cleardoublepage \else
471   \if@openright \cleardoublepage \else \clearpage \fi \fi
472   \@mainmatterfalse}
473 \newcommand{\part}{%
474   \if@openleft \cleardoublepage \else
475   \if@openright \cleardoublepage \else \clearpage \fi \fi
476   \thispagestyle{empty}%
477   \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi
478   \null\vfil
479   \secdef\@part\@spart}
480 \def\@part[#1]#2{%
481   \ifnum \c@secnumdepth >-2\relax
482     \refstepcounter{part}%
483     \addcontentsline{toc}{part}{%
484        \prepartname\thepart\postpartname\hspace{1em}#1}%
485   \else
486     \addcontentsline{toc}{part}{#1}%
487   \fi
488   \markboth{}{}%
489   {\centering
490    \interlinepenalty\@M\normalfont
491    \ifnum \c@secnumdepth >-2\relax
492      \huge\bfseries\prepartname\thepart\postpartname
493      \par\vskip20\p@
494    \fi
495    \Huge\bfseries#2\par}%
496    \@endpart}
497 \def\@spart#1{{%
498   \centering
499   \interlinepenalty\@M\normalfont
500   \Huge\bfseries#1\par}%
501   \@endpart}
502 \def\@endpart{\vfil\newpage
503    \if@twoside
504     \if@openleft %% \if@openleft added (2017/02/15)
505      \null\thispagestyle{empty}\newpage
506     \else\if@openright %% \if@openright added (2016/12/18)
507      \null\thispagestyle{empty}\newpage
508     \fi\fi %% added (2016/12/18, 2017/02/15)
509    \fi
510    \if@tempswa\twocolumn\fi}
511 \newcommand{\chapter}{%
512   \if@openleft \cleardoublepage \else
513   \if@openright \cleardoublepage \else \clearpage \fi \fi
514   \thispagestyle{jpl@in}%
515   \global\@topnum\z@
516   \@afterindenttrue
517   \secdef\@chapter\@schapter}
518 \def\@chapter[#1]#2{%
519   \ifnum \c@secnumdepth >\m@ne
520     \if@mainmatter
521     \refstepcounter{chapter}%
522     \typeout{\@chapapp\space\thechapter\space\@chappos}%
523     \addcontentsline{toc}{chapter}%
524       {\protect\numberline{\@chapapp\thechapter\@chappos}#1}%
525     \else\addcontentsline{toc}{chapter}{#1}\fi
526   \else
527     \addcontentsline{toc}{chapter}{#1}%
528   \fi
529   \chaptermark{#1}%
530   \addtocontents{lof}{\protect\addvspace{10\p@}}%
531   \addtocontents{lot}{\protect\addvspace{10\p@}}%
532   \@makechapterhead{#2}\@afterheading}
533 \def\@makechapterhead#1{\hbox{}%
534   \vskip2\Cvs
535   {\parindent\z@
536    \raggedright
537    \normalfont\huge\bfseries
538    \leavevmode
539    \ifnum \c@secnumdepth >\m@ne
540      \setlength\@tempdima{\linewidth}%
541     \if@mainmatter
542      \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1\zw}%
543      \addtolength\@tempdima{-\wd\z@}%
544      \unhbox\z@\nobreak
545     \fi
546      \vtop{\hsize\@tempdima#1}%
547    \else
548      #1\relax
549    \fi}\nobreak\vskip3\Cvs}
550 \def\@schapter#1{%
551   \@makeschapterhead{#1}\@afterheading
552 }
553 \def\@makeschapterhead#1{\hbox{}%
554   \vskip2\Cvs
555   {\parindent\z@
556    \raggedright
557    \normalfont\huge\bfseries
558    \leavevmode
559    \setlength\@tempdima{\linewidth}%
560    \vtop{\hsize\@tempdima#1}}\vskip3\Cvs}
561 \newcommand{\section}{\@startsection{section}{1}{\z@}%
562    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
563    {.5\Cvs \@plus.3\Cvs}%
564    {\normalfont\Large\bfseries}}
565 \newcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
566    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
567    {.5\Cvs \@plus.3\Cvs}%
568    {\normalfont\large\bfseries}}
569 \newcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
570    {1.5\Cvs \@plus.5\Cvs \@minus.2\Cvs}%
571    {.5\Cvs \@plus.3\Cvs}%
572    {\normalfont\normalsize\bfseries}}
573 \newcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
574    {3.25ex \@plus 1ex \@minus .2ex}%
575    {-1em}%
576    {\normalfont\normalsize\bfseries}}
577 \newcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
578    {3.25ex \@plus 1ex \@minus .2ex}%
579    {-1em}%
580    {\normalfont\normalsize\bfseries}}
581 \newcommand{\appendix}{\par
582   \setcounter{chapter}{0}%
583   \setcounter{section}{0}%
584   \renewcommand{\@chapapp}{\appendixname}%
585   \renewcommand{\@chappos}\space%
586   \renewcommand{\thechapter}{\rensuji{\@Alph\c@chapter}}}
587 \if@twocolumn
588   \setlength\leftmargini {2em}
589 \else
590   \setlength\leftmargini {2.5em}
591 \fi
592 \setlength\leftmarginii  {2.2em}
593 \setlength\leftmarginiii {1.87em}
594 \setlength\leftmarginiv  {1.7em}
595 \if@twocolumn
596   \setlength\leftmarginv {.5em}
597   \setlength\leftmarginvi{.5em}
598 \else
599   \setlength\leftmarginv {1em}
600   \setlength\leftmarginvi{1em}
601 \fi
602 \setlength  \labelsep  {.5em}
603 \setlength  \labelwidth{\leftmargini}
604 \addtolength\labelwidth{-\labelsep}
605 \@beginparpenalty -\@lowpenalty
606 \@endparpenalty   -\@lowpenalty
607 \@itempenalty     -\@lowpenalty
608 \renewcommand{\theenumi}{\rensuji{\@arabic\c@enumi}}
609 \renewcommand{\theenumii}{\rensuji{(\@alph\c@enumii)}}
610 \renewcommand{\theenumiii}{\rensuji{\@roman\c@enumiii}}
611 \renewcommand{\theenumiv}{\rensuji{\@Alph\c@enumiv}}
612 \newcommand{\labelenumi}{\theenumi}
613 \newcommand{\labelenumii}{\theenumii}
614 \newcommand{\labelenumiii}{\theenumiii}
615 \newcommand{\labelenumiv}{\theenumiv}
616 \renewcommand{\p@enumii}{\theenumi}
617 \renewcommand{\p@enumiii}{\theenumi(\theenumii)}
618 \renewcommand{\p@enumiv}{\p@enumiii\theenumiii}
619 \renewenvironment{enumerate}
620   {\ifnum \@enumdepth >\thr@@\@toodeep\else
621    \advance\@enumdepth\@ne
622    \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
623    \expandafter \list \csname label\@enumctr\endcsname{%
624       \ifnum\ltjgetparameter{direction}=3
625          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
626            \else\topsep\z@\fi
627          \parskip\z@ \itemsep\z@ \parsep\z@
628          \labelwidth1\zw \labelsep.3\zw
629          \ifnum \@enumdepth=\@ne \leftmargin1\zw\relax
630            \else\leftmargin\leftskip\fi
631          \advance\leftmargin 1\zw
632       \fi
633          \usecounter{\@enumctr}%
634          \def\makelabel##1{\hss\llap{##1}}}%
635    \fi}{\endlist}
636 \newcommand{\labelitemi}{\textbullet}
637 \newcommand{\labelitemii}{%
638   \ifnum\ltjgetparameter{direction}=3
639      {\textcircled{~}}
640   \else
641      {\normalfont\bfseries\textendash}
642   \fi
643 }
644 \newcommand{\labelitemiii}{\textasteriskcentered}
645 \newcommand{\labelitemiv}{\textperiodcentered}
646 \renewenvironment{itemize}
647   {\ifnum \@itemdepth >\thr@@\@toodeep\else
648    \advance\@itemdepth\@ne
649    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
650    \expandafter \list \csname \@itemitem\endcsname{%
651       \ifnum\ltjgetparameter{direction}=3
652          \ifnum \@listdepth=\@ne \topsep.5\normalbaselineskip
653            \else\topsep\z@\fi
654          \parskip\z@ \itemsep\z@ \parsep\z@
655          \labelwidth1\zw \labelsep.3\zw
656          \ifnum \@itemdepth =\@ne \leftmargin1\zw\relax
657            \else\leftmargin\leftskip\fi
658          \advance\leftmargin 1\zw
659       \fi
660          \def\makelabel##1{\hss\llap{##1}}}%
661    \fi}{\endlist}
662 \newenvironment{description}
663   {\list{}{\labelwidth\z@ \itemindent-\leftmargin
664    \ifnum\ltjgetparameter{direction}=3
665      \leftmargin\leftskip \advance\leftmargin3\Cwd
666      \rightmargin\rightskip
667      \labelsep=1\zw \itemsep\z@
668      \listparindent\z@ \topskip\z@ \parskip\z@ \partopsep\z@
669    \fi
670            \let\makelabel\descriptionlabel}}{\endlist}
671 \newcommand{\descriptionlabel}[1]{%
672    \hspace\labelsep\normalfont\bfseries #1}
673 \newenvironment{verse}
674   {\let\\\@centercr
675    \list{}{\itemsep\z@ \itemindent -1.5em%
676            \listparindent\itemindent
677            \rightmargin\leftmargin \advance\leftmargin 1.5em}%
678            \item\relax}{\endlist}
679 \newenvironment{quotation}
680   {\list{}{\listparindent 1.5em%
681            \itemindent\listparindent
682            \rightmargin\leftmargin
683            \parsep\z@ \@plus\p@}%
684            \item\relax}{\endlist}
685 \newenvironment{quote}
686   {\list{}{\rightmargin\leftmargin}%
687            \item\relax}{\endlist}
688 \newcounter{figure}[chapter]
689 \renewcommand{\thefigure}{%
690   \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@figure}}
691 \def\fps@figure{tbp}
692 \def\ftype@figure{1}
693 \def\ext@figure{lof}
694 \def\fnum@figure{\figurename\thefigure}
695 \newenvironment{figure}
696                {\@float{figure}}
697                {\end@float}
698 \newenvironment{figure*}
699                {\@dblfloat{figure}}
700                {\end@dblfloat}
701 \newcounter{table}[chapter]
702 \renewcommand{\thetable}{%
703   \ifnum\c@chapter>\z@\thechapter{}・\fi\rensuji{\@arabic\c@table}}
704 \def\fps@table{tbp}
705 \def\ftype@table{2}
706 \def\ext@table{lot}
707 \def\fnum@table{\tablename\thetable}
708 \newenvironment{table}
709                {\@float{table}}
710                {\end@float}
711 \newenvironment{table*}
712                {\@dblfloat{table}}
713                {\end@dblfloat}
714 \newlength\abovecaptionskip
715 \newlength\belowcaptionskip
716 \setlength\abovecaptionskip{10\p@}
717 \setlength\belowcaptionskip{0\p@}
718 \long\def\@makecaption#1#2{%
719   \vskip\abovecaptionskip
720   \ifnum\ltjgetparameter{direction}=3 \sbox\@tempboxa{#1\hskip1\zw#2}%
721     \else\sbox\@tempboxa{#1: #2}%
722   \fi
723   \ifdim \wd\@tempboxa >\hsize
724     \ifnum\ltjgetparameter{direction}=3  #1\hskip1\zw#2\relax\par
725       \else #1: #2\relax\par\fi
726   \else
727     \global \@minipagefalse
728     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
729   \fi
730   \vskip\belowcaptionskip}
731 \setlength\arraycolsep{5\p@}
732 \setlength\tabcolsep{6\p@}
733 \setlength\arrayrulewidth{.4\p@}
734 \setlength\doublerulesep{2\p@}
735 \setlength\tabbingsep{\labelsep}
736 \skip\@mpfootins = \skip\footins
737 \setlength\fboxsep{3\p@}
738 \setlength\fboxrule{.4\p@}
739 \@addtoreset{equation}{chapter}
740 \renewcommand{\theequation}{%
741   \ifnum\c@chapter>\z@\thechapter.\fi \@arabic\c@equation}
742 \unless\ifltj@disablejfam
743 \if@compatibility\else
744   \DeclareSymbolFont{mincho}{JY3}{mc}{m}{n}
745   \DeclareSymbolFontAlphabet{\mathmc}{mincho}
746   \SetSymbolFont{mincho}{bold}{JY3}{gt}{m}{n}
747   \jfam\symmincho
748   \DeclareMathAlphabet{\mathgt}{JY3}{gt}{m}{n}
749 \fi
750 \if@mathrmmc
751   \AtBeginDocument{%
752   \reDeclareMathAlphabet{\mathrm}{\mathrm}{\mathmc}
753   \reDeclareMathAlphabet{\mathbf}{\mathbf}{\mathgt}
754 }%
755 \fi
756 \fi
757 \DeclareOldFontCommand{\mc}{\normalfont\mcfamily}{\mathmc}
758 \DeclareOldFontCommand{\gt}{\normalfont\gtfamily}{\mathgt}
759 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
760 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
761 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
762 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
763 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
764 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
765 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
766 \DeclareRobustCommand*{\cal}{\@fontswitch\relax\mathcal}
767 \DeclareRobustCommand*{\mit}{\@fontswitch\relax\mathnormal}
768 \setcounter{tocdepth}{2}
769 \newcommand{\@pnumwidth}{1.55em}
770 \newcommand{\@tocrmarg}{2.55em}
771 \newcommand{\@dotsep}{4.5}
772 \newdimen\toclineskip
773 \setlength\toclineskip{2\p@}
774 \newdimen\@lnumwidth
775 \def\numberline#1{\hb@xt@\@lnumwidth{#1\hfil}}
776 \def\@dottedtocline#1#2#3#4#5{%
777   \ifnum #1>\c@tocdepth \else
778     \vskip\toclineskip \@plus.2\p@
779     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
780      \parindent #2\relax\@afterindenttrue
781      \interlinepenalty\@M
782      \leavevmode
783      \@lnumwidth #3\relax
784      \advance\leftskip \@lnumwidth \null\nobreak\hskip -\leftskip
785      {#4}\nobreak
786      \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}%
787      \hfill\nobreak
788      \hb@xt@\@pnumwidth{\hss\normalfont \normalcolor #5}%
789      \par}%
790   \fi}
791 \providecommand*\protected@file@percent{}
792 \def\addcontentsline#1#2#3{%
793   \protected@write\@auxout
794     {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble
795 \@temptokena{\rensuji{\thepage}}}%
796     {\string\@writefile{#1}%
797        {\protect\contentsline{#2}{#3}{\the\@temptokena}%
798 \protected@file@percent}}%
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\zw}{4\zw}}
838 \newcommand*{\l@subsection}   {\@dottedtocline{2}{2\zw}{6\zw}}
839 \newcommand*{\l@subsubsection}{\@dottedtocline{3}{3\zw}{8\zw}}
840 \newcommand*{\l@paragraph}    {\@dottedtocline{4}{4\zw}{9\zw}}
841 \newcommand*{\l@subparagraph} {\@dottedtocline{5}{5\zw}{10\zw}}
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\zw}{4\zw}}
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 1\zw
901   \noindent\hb@xt@ 2\zw{\hss\@makefnmark}#1}
902 \newif\if西暦 \西暦true
903 \def\西暦{\西暦true}
904 \def\和暦{\西暦false}
905 \def\pltx@today@year@#1{%
906   \ifnum\numexpr\year-#1=1 元\else
907 \ifnum\ltjgetparameter{direction}=3 \kansuji\numexpr\year-#1\relax
908 \else \number\numexpr\year-#1\relax\fi
909   \fi 年
910 }
911 \def\pltx@today@year{%
912   \ifnum\numexpr\year*10000+\month*100+\day<19890108
913 昭和\pltx@today@year@{1925}%
914   \else\ifnum\numexpr\year*10000+\month*100+\day<20190501
915 平成\pltx@today@year@{1988}%
916   \else
917 〓〓\pltx@today@year@{2018}%
918   \fi\fi}
919 \def\today{{%
920   \if西暦
921     \ifnum\ltjgetparameter{direction}=3 \kansuji\year\else\number\year\fi 年
922   \else
923 \pltx@today@year
924   \fi
925   \ifnum\ltjgetparameter{direction}=3
926 \kansuji\month 月
927     \kansuji\day 日
928   \else
929     \number\month~月
930     \number\day~日
931   \fi}}
932 \newcommand{\prepartname}{第}
933 \newcommand{\postpartname}{部}
934 \newcommand{\prechaptername}{第}
935 \newcommand{\postchaptername}{章}
936 \newcommand{\contentsname}{目 次}
937 \newcommand{\listfigurename}{図 目 次}
938 \newcommand{\listtablename}{表 目 次}
939 \newcommand{\bibname}{関連図書}
940 \newcommand{\indexname}{索 引}
941 \newcommand{\figurename}{図}
942 \newcommand{\tablename}{表}
943 \newcommand{\appendixname}{付 録}
944 \pagestyle{headings}
945 \pagenumbering{arabic}
946 \raggedbottom
947 \fnfixbottomtrue % 2017-02-19
948 \IfFileExists{stfloats.sty}{\RequirePackage{stfloats}\fnbelowfloat}{}
949 \if@twocolumn
950   \twocolumn
951   \sloppy
952 \else
953   \onecolumn
954 \fi
955 \normalmarginpar
956 \@mparswitchfalse
957 \AtBeginOfPackageFile*{ftnright}{\let\ltjt@orig@@makefntext=\@makefntext}
958 \AtEndOfPackageFile*{ftnright}{\let\@makefntext=\ltjt@orig@@makefntext}
959 \endinput
960 %%
961 %% End of file `ltjtbook.cls'.