OSDN Git Service

removed web2c version of PUTeX.
[putex/putex.git] / src / putex / latex / putex / chinesebook.inc
1 %% This is file 'chinesebook.inc'
2 %%
3 %% Copyright 2004
4 %% The PUTeX Project and any individual authors listed elsewhere
5 %% in this file.
6 %% This file is part of the PUTeX system. You are NOT allowed to
7 %% distribute a modified version of this file.
8 %% ----------------------------------------
9 %%   This system is distributed in the hope that it will be useful,
10 %%   but WITHOUT ANY WARRANTY; without even the implied warranty of
11 %%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 %%
13 \InputIfFileExists{chineserbopts.inc}{}{%
14     \ClassError{pu@classname}{%
15       Can't load chineserbopts.inc}{}}
16 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
17 \ProcessOptions
18 \LoadClass{book}
19 \InputIfFileExists{chineserbcomm.inc}{}{%
20     \ClassError{pu@classname}{%
21       Can't load chineserbcomm.inc}{}}
22 \if@twoside
23   \def\ps@headings{%
24       \let\@oddfoot\@empty\let\@evenfoot\@empty
25       \def\@evenhead{\thepage\hfil\slshape\leftmark}%
26       \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
27       \let\@mkboth\markboth
28     \def\chaptermark##1{%
29       \markboth {\MakeUppercase{%
30         \ifnum \c@secnumdepth >\m@ne
31           \if@mainmatter
32              \twchaptername\ \ \
33           \fi
34         \fi
35         ##1}}{}}%
36     \def\sectionmark##1{%
37       \markright {\MakeUppercase{%
38         \ifnum \c@secnumdepth >\z@
39           \thesection. \ %
40         \fi
41         ##1}}}}
42 \else
43   \def\ps@headings{%
44     \let\@oddfoot\@empty
45     \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
46     \let\@mkboth\markboth
47     \def\chaptermark##1{%
48       \markright {\MakeUppercase{%
49         \ifnum \c@secnumdepth >\m@ne
50           \if@mainmatter
51             \twchaptername\ \ \
52           \fi
53         \fi
54         ##1}}}}
55 \fi
56 \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
57                        \if@mainmatter
58                          \refstepcounter{chapter}%
59                          \typeout{\twchaptername.}%
60                          \addcontentsline{toc}{chapter}%
61                                    {\protect\numberline{\twchaptername}#1}%
62                        \else
63                          \addcontentsline{toc}{chapter}{#1}%
64                        \fi
65                     \else
66                       \addcontentsline{toc}{chapter}{#1}%
67                     \fi
68                     \chaptermark{#1}%
69                     \addtocontents{lof}{\protect\addvspace{10\p@}}%
70                     \addtocontents{lot}{\protect\addvspace{10\p@}}%
71                     \if@twocolumn
72                       \@topnewpage[\@makechapterhead{#2}]%
73                     \else
74                       \@makechapterhead{#2}%
75                       \@afterheading
76                     \fi}
77 \def\@makechapterhead#1{%
78   \vspace*{50\p@}%
79   {\parindent \z@ \pu@chhdalign \TWchapHeadingFont
80     \ifnum \c@secnumdepth >\m@ne
81       \if@mainmatter
82         \twchaptername
83         \par\nobreak
84         \vskip 20\p@
85       \fi
86     \fi
87     \interlinepenalty\@M
88     \pu@chhdalign #1\par\nobreak
89     \vskip 40\p@
90   }}
91 \pagestyle{headings}
92 \endinput