OSDN Git Service

removed web2c version of PUTeX.
[putex/putex.git] / texmf / latex / putex / taiwan.sty
1 %% This is file 'taiwan.sty'
2 %%
3 %%    NOTE: This file is obsoleted. Do not use it for new documents.
4 %%
5 %% Copyright 1998-1999
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 \NeedsTeXFormat{LaTeX2e}[1998/06/01]
16 \ProvidesPackage{taiwan}[1999/03/20 1.0 PULaTeX standard package]
17 \RequirePackage{twbase}[1998/03/20]
18 \RequirePackage{twnames}[1998/03/20]
19 \def\@tw@setref#1#2#3{%
20   \ifx#1\relax
21    \protect\G@refundefinedtrue
22    \nfss@text{\reset@font\bfseries ??}%
23    \@latex@warning{Reference `#3' on page \thepage \space
24              undefined}%
25   \else
26    \pu@chapcnum\expandafter#2#1\null
27   \fi}
28 \newcommand*{\twref}[1]{\expandafter\@tw@setref\csname r@#1\endcsname\@firstoftwo{#1}}
29 \@ifundefined{chapter}{}{%
30 \@ifundefined{if@mainmatter}{\newif\if@mainmatter \@mainmattertrue}{}% for report.cls
31 \renewcommand*{\chaptername}{³¹}
32 \newcommand*{\tw@chapname}{²Ä\PUXcnumber\c@chapter \chaptername}
33 \if@twoside
34   \def\ps@headings{%
35       \let\@oddfoot\@empty\let\@evenfoot\@empty
36       \def\@evenhead{\thepage\hfil\slshape\leftmark}%
37       \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
38       \let\@mkboth\markboth
39     \def\chaptermark##1{%
40       \markboth {\MakeUppercase{%
41         \ifnum \c@secnumdepth >\m@ne
42           \if@mainmatter
43             \tw@chapname\ \ 
44           \fi
45         \fi
46         ##1}}{}}%
47     \def\sectionmark##1{%
48       \markright {\MakeUppercase{%
49         \ifnum \c@secnumdepth >\z@
50           \thesection. \ 
51         \fi
52         ##1}}}}
53 \else
54   \def\ps@headings{%
55     \let\@oddfoot\@empty
56     \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
57     \let\@mkboth\markboth
58     \def\chaptermark##1{%
59       \markright {\MakeUppercase{%
60         \ifnum \c@secnumdepth >\m@ne
61           \if@mainmatter
62              \tw@chapname\ \ 
63           \fi
64         \fi
65         ##1}}}}
66 \fi
67 \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
68                        \if@mainmatter
69                          \refstepcounter{chapter}%
70                          \typeout{\tw@chapname.}%
71                          \addcontentsline{toc}{chapter}%
72                                    {\protect\numberline{\thechapter}#1}%
73                        \else
74                          \addcontentsline{toc}{chapter}{#1}%
75                        \fi
76                     \else
77                       \addcontentsline{toc}{chapter}{#1}%
78                     \fi
79                     \chaptermark{#1}%
80                     \addtocontents{lof}{\protect\addvspace{10\p@}}%
81                     \addtocontents{lot}{\protect\addvspace{10\p@}}%
82                     \if@twocolumn
83                       \@topnewpage[\@makechapterhead{#2}]%
84                     \else
85                       \@makechapterhead{#2}%
86                       \@afterheading
87                     \fi}
88 \def\@makechapterhead#1{%
89   \vspace*{50\p@}%
90   {\parindent \z@ \raggedright \normalfont
91     \ifnum \c@secnumdepth >\m@ne
92       \if@mainmatter
93         \Huge\bfseries \tw@chapname
94         \par\nobreak
95         \vskip 20\p@
96       \fi
97     \fi
98     \interlinepenalty\@M
99     \Huge \bfseries #1\par\nobreak
100     \vskip 40\p@
101   }}%
102 \renewcommand\appendix{\par
103   \setcounter{chapter}{0}%
104   \setcounter{section}{0}%
105   \renewcommand\@chapapp{\appendixname}%
106   \renewcommand\thechapter{\@Alph\c@chapter}%
107   \renewcommand\tw@chapname{\appendixname \thechapter}}%
108 }% \@ifundefined{chapter}
109 \endinput