OSDN Git Service

removed web2c version of PUTeX.
[putex/putex.git] / src / putex / latex / putex / chineserbcomm.inc
1 %% This is file 'chineserbcomm.inc'
2 %%
3 %%   Common parts for chinese report and book
4 %%
5 %% Copyright 1999-2004
6 %% The PUTeX Project and any individual authors listed elsewhere
7 %% in this file.
8 %% This file is part of the PUTeX system. You are NOT allowed to
9 %% distribute a modified version of this file.
10 %% ----------------------------------------
11 %%   This system is distributed in the hope that it will be useful,
12 %%   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 %%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 %%
15 \usepackage{chinesenames}
16 \def\@pu@setref#1#2#3{%
17   \ifx#1\relax
18    \protect\G@refundefinedtrue
19    \nfss@text{\reset@font\bfseries ??}%
20    \@latex@warning{Reference `#3' on page \thepage \space
21              undefined}%
22   \else
23    \pu@chapcnum\expandafter#2#1\null
24   \fi}
25 \newcommand*{\twref}[1]{\expandafter\@pu@setref\csname r@#1\endcsname\@firstoftwo{#1}}
26 \newcommand*{\TWchapHeadingFont}{\normalfont\Huge\bfseries}
27 \newcommand*{\TWchapContentFont}{\large\bfseries}
28 \ifnum\the\puxCharSet=1 % Big5
29   \renewcommand*{\chaptername}{³¹}
30   \newcommand*{\twchaptername}{²Ä\pu@chapcnum\c@chapter \chaptername}
31 \else % GBK
32   \renewcommand*{\chaptername}{ÕÂ}
33   \newcommand*{\twchaptername}{µÚ\pu@chapcnum\c@chapter \chaptername}
34 \fi
35 \def\@makeschapterhead#1{%
36   \vspace*{50\p@}%
37   {\parindent \z@ \pu@chhdalign
38     \TWchapHeadingFont
39     \interlinepenalty\@M
40     #1\par\nobreak
41     \vskip 40\p@
42   }}
43 \renewcommand\appendix{\par
44   \setcounter{chapter}{0}%
45   \setcounter{section}{0}%
46   \renewcommand\@chapapp{\appendixname}%
47   \renewcommand\thechapter{\@Alph\c@chapter}%
48   \renewcommand\twchaptername{\appendixname \thechapter}}
49 \let\tw@numberline\numberline
50 \renewcommand*\l@chapter[2]{%
51   \ifnum \c@tocdepth >\m@ne
52     \addpenalty{-\@highpenalty}%
53     \vskip 1.0em \@plus\p@
54     \begingroup
55       \parindent \z@ \rightskip \@pnumwidth
56       \parfillskip -\@pnumwidth
57       \leavevmode \TWchapContentFont
58       \def\numberline##1{%
59         \settowidth{\@tempdima}{##1}%
60         \addtolength{\@tempdima}{0.6em}%
61         \advance\leftskip \@tempdima
62         \hskip -\leftskip
63         \tw@numberline{##1}}%
64       #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss\normalsize #2}\par
65       \vskip 0.4em \@plus\p@
66       \penalty\@highpenalty
67     \endgroup
68   \fi}
69 \if@twsec
70   \InputIfFileExists{chinesesection.inc}{}{%
71     \ClassError{\pu@classname}{%
72       Can't load chinesesection.inc}{}}
73 \fi
74 \endinput