summaryrefslogtreecommitdiff
path: root/language/japanese/japanese-otf/sty/redeffont.sty
blob: 5582db0162040765f0c2abace40ffef7d754abda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{redeffont}[2019/04/01 v1.2.3 psitau]

\newif\if@asciiclasses \@asciiclassesfalse 
\newif\if@articleclass \@articleclassfalse
\newif\if@bookclass \@bookclassfalse
\@ifclassloaded{jarticle}{\@asciiclassestrue\@articleclasstrue}{}
\@ifclassloaded{jbook}{\@asciiclassestrue\@bookclasstrue}{}
\@ifclassloaded{jreport}{\@asciiclassestrue}{}
\@ifclassloaded{tarticle}{\@asciiclassestrue\@articleclasstrue}{}
\@ifclassloaded{tbook}{\@asciiclassestrue\@bookclasstrue}{}
\@ifclassloaded{treport}{\@asciiclassestrue}{}

\if@asciiclasses \else \endinput\fi
\def\otf@tmp{\newif\if@mainmatter}
\if@articleclass\otf@tmp\fi

\def\headfont{\gtfamily\bfseries}
\def\part@head@font{\headfont}
\def\chapter@head@font{\headfont}
\def\section@head@font{\headfont}
\def\subsection@head@font{\headfont}
\def\subsubsection@head@font{\headfont}
\def\paragraph@head@font{\headfont}
\def\subparagraph@head@font{\headfont}
\def\abstract@head@font{\headfont}
\def\description@label@font{\headfont}
\def\toc@part@font{\headfont}
\def\toc@chapter@font{\headfont}
\def\toc@section@font{\headfont}
\renewcommand{\section}{\@startsection{section}{1}{\z@}%
   {1.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
   {.5\Cvs \@plus.3\Cdp}%
   {\reset@font\Large\section@head@font}}%changed
\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
   {1.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
   {.5\Cvs \@plus.3\Cdp}%
   {\reset@font\large\subsection@head@font}}%changed
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}%
   {1.5\Cvs \@plus.5\Cdp \@minus.2\Cdp}%
   {.5\Cvs \@plus.3\Cdp}%
   {\reset@font\normalsize\subsubsection@head@font}}%changed
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
   {3.25ex \@plus 1ex \@minus .2ex}%
   {-1em}%
   {\reset@font\normalsize\paragraph@head@font}}%changed
\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
   {3.25ex \@plus 1ex \@minus .2ex}%
   {-1em}%
   {\reset@font\normalsize\subparagraph@head@font}}%changed
\renewcommand{\descriptionlabel}[1]{%
   \hspace\labelsep\normalfont\description@label@font#1}%changed

\if@bookclass \relax\else
	\if@titlepage
	  \renewenvironment{abstract}{%
	      \titlepage
	      \null\vfil
	      \@beginparpenalty\@lowpenalty
	      \begin{center}%
	        {\abstract@head@font\abstractname}%changed
	        \@endparpenalty\@M
	      \end{center}}%
	      {\par\vfil\null\endtitlepage}
	\else
	  \renewenvironment{abstract}{%
	    \if@twocolumn
	      \section*{\abstractname}%
	    \else
	      \small
	      \begin{center}%
	        {\abstract@head@font\abstractname\vspace{-.5em}\vspace{\z@}}%changed
	      \end{center}%
	      \quotation
	    \fi}{\if@twocolumn\else\endquotation\fi}
	\fi
\fi%end of \if@bookclass

\if@articleclass
\def\@part[#1]#2{%
  \ifnum \c@secnumdepth >\m@ne
    \refstepcounter{part}%
    \addcontentsline{toc}{part}{%
       \prepartname\thepart\postpartname\hspace{1zw}#1}%
  \else
    \addcontentsline{toc}{part}{#1}%
  \fi
  \markboth{}{}%
  {\parindent\z@\raggedright
   \interlinepenalty\@M\reset@font
   \ifnum \c@secnumdepth >\m@ne
     \Large\part@head@font\prepartname\thepart\postpartname%changed
     \par\nobreak
   \fi
   \huge\part@head@font#2\par}%changed
  \nobreak\vskip3ex\@afterheading}
\def\@spart#1{{%
  \parindent\z@\raggedright
  \interlinepenalty\@M\reset@font
  \huge\part@head@font#1\par}%changed
  \nobreak\vskip3ex\@afterheading}
\renewcommand*{\l@part}[2]{%
  \ifnum \c@tocdepth >-2\relax
    \addpenalty{\@secpenalty}%
    \addvspace{2.25em \@plus\p@}%
    \begingroup
    \parindent\z@\rightskip\@pnumwidth
    \parfillskip-\@pnumwidth
    {\leavevmode\large\toc@part@font%changed
     \setlength\@lnumwidth{4zw}%
     #1\hfil\nobreak
     \hbox to\@pnumwidth{\hss#2}}\par
    \nobreak
    \if@compatibility
    \global\@nobreaktrue
    \everypar{\global\@nobreakfalse\everypar{}}%
    \fi
     \endgroup
  \fi}
\renewcommand*{\l@section}[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty{\@secpenalty}%
    \addvspace{1.0em \@plus\p@}%
    \begingroup
      \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
      \leavevmode\toc@section@font%changed
      \setlength\@lnumwidth{1.5em}%
      \advance\leftskip\@lnumwidth \hskip-\leftskip
      #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par
    \endgroup
  \fi}

\else%\if@articleclass-->false

\def\@part[#1]#2{%
  \ifnum \c@secnumdepth >-2\relax
    \refstepcounter{part}%
    \addcontentsline{toc}{part}{%
       \prepartname\thepart\postpartname\hspace{1em}#1}%
  \else
    \addcontentsline{toc}{part}{#1}%
  \fi
  \markboth{}{}%
  {\centering
   \interlinepenalty\@M\reset@font
   \ifnum \c@secnumdepth >-2\relax
     \huge\part@head@font\prepartname\thepart\postpartname%changed
     \par\vskip20\p@
   \fi
   \Huge\part@head@font#2\par}%changed
   \@endpart}
\def\@spart#1{{%
  \centering
  \interlinepenalty\@M\reset@font
  \Huge\part@head@font#1\par}%changed
  \@endpart}
\renewcommand*{\l@part}[2]{%
  \ifnum \c@tocdepth >-2\relax
    \addpenalty{-\@highpenalty}%
    \addvspace{2.25em \@plus\p@}%
    \begingroup
    \parindent\z@\rightskip\@pnumwidth
    \parfillskip-\@pnumwidth
    {\leavevmode\large\toc@part@font%changed
     \setlength\@lnumwidth{4zw}%
     #1\hfil\nobreak
     \hbox to\@pnumwidth{\hss#2}}\par
    \nobreak
    \global\@nobreaktrue
    \everypar{\global\@nobreakfalse\everypar{}}%
     \endgroup
  \fi}
\renewcommand*{\l@chapter}[2]{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \addvspace{1.0em \@plus\p@}%
    \begingroup
      \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip
      \leavevmode\toc@chapter@font%changed
      \setlength\@lnumwidth{4zw}%
      \advance\leftskip\@lnumwidth \hskip-\leftskip
      #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par
      \penalty\@highpenalty
    \endgroup
  \fi}
\def\@makechapterhead#1{\hbox{}%
  \vskip2\Cvs
  {\parindent\z@
   \raggedright
   \reset@font\huge\chapter@head@font%changed
   \leavevmode
   \ifnum \c@secnumdepth >\m@ne
     \setlength\@tempdima{\linewidth}%
    \if@mainmatter
     \setbox\z@\hbox{\@chapapp\thechapter\@chappos\hskip1zw}%
     \addtolength\@tempdima{-\wd\z@}%
     \unhbox\z@\nobreak
    \fi
     \vtop{\hsize\@tempdima#1}%
   \else
     #1\relax
   \fi}\nobreak\vskip3\Cvs}
\def\@makeschapterhead#1{\hbox{}%
  \vskip2\Cvs
  {\parindent\z@
   \raggedright
   \reset@font\huge\chapter@head@font%changed
   \leavevmode
   \setlength\@tempdima{\linewidth}%
   \vtop{\hsize\@tempdima#1}}\vskip3\Cvs}
\fi%end of \if@articleclass