|
| 1 | + |
| 2 | +% This is the file GB.cap of the CJK package |
| 3 | +% for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e |
| 4 | +% |
| 5 | +% created by aloft < [email protected]> for Standard LaTeX document class. |
| 6 | +% |
| 7 | +% Version 4.5.2 (18-May-2003) |
| 8 | +% |
| 9 | +% $Id: GB.cpx,v 1.7 2003/05/20 15:51:14 aloft Exp $ |
| 10 | +% |
| 11 | + |
| 12 | + |
| 13 | +\def\fileversion{4.5.2} |
| 14 | +\def\filedate{2003/05/18} |
| 15 | +\ProvidesFile{GB.cap}[\filedate\space\fileversion |
| 16 | + for Standard LaTeX document class] |
| 17 | + |
| 18 | + |
| 19 | +% Chinese captions |
| 20 | +% |
| 21 | +% character set: GB 2312-80 |
| 22 | +% encoding: EUC |
| 23 | + |
| 24 | +\@ifundefined{CJKnumber} |
| 25 | + {\def\CJKnumber#1{\ifcase#1\or |
| 26 | + 一\or二\or三\or四\or五\or |
| 27 | + 六\or七\or八\or九\or十\or十一\fi}}{} |
| 28 | + |
| 29 | +\renewcommand\contentsname{目录} |
| 30 | +\renewcommand\listfigurename{插图} |
| 31 | +\renewcommand\listtablename{表格} |
| 32 | + |
| 33 | +\@ifundefined{chapter} |
| 34 | + {\renewcommand\refname{参考文献}} |
| 35 | + {\renewcommand\bibname{参考文献}} |
| 36 | + |
| 37 | +\renewcommand\indexname{索引} |
| 38 | + |
| 39 | +\renewcommand\figurename{图} |
| 40 | + |
| 41 | +\renewcommand\tablename{表} |
| 42 | + |
| 43 | +\newcommand\CJKprepartname{第} |
| 44 | +\newcommand\CJKpartname{部分} |
| 45 | +\newcommand\CJKthepart{\CJKnumber{\@arabic\c@part}} |
| 46 | + |
| 47 | +\@ifundefined{chapter}{}{ |
| 48 | + \newcommand\CJKprechaptername{第} |
| 49 | + \newcommand\CJKchaptername{章} |
| 50 | + \newcommand\CJKthechapter{\thechapter}} |
| 51 | + %\CJKnumber{\@arabic\c@chapter}}} |
| 52 | + |
| 53 | +\renewcommand\appendixname{附录~\@Alph\c@chapter} |
| 54 | + |
| 55 | +\@ifundefined{mainmatter} |
| 56 | + {\renewcommand\abstractname{摘要}}{} |
| 57 | + |
| 58 | +% \renewcommand\ccname{} % ? |
| 59 | +% \renewcommand\enclname{附件} |
| 60 | +% \newcommand\prepagename{} % ? |
| 61 | +% \newcommand\postpagename{} % ? |
| 62 | +% \renewcommand\headtoname{} % ? |
| 63 | +% \renewcommand\seename{} % ? |
| 64 | + |
| 65 | +\let\CJK@todaysave=\today |
| 66 | +\def\CJK@todaysmall{~\the\year~年~\the\month~月~\the\day~日} |
| 67 | +\def\CJK@todaybig{\CJKdigits{\the\year}年\CJKnumber{\the\month}月\CJKnumber{\the\day}日} |
| 68 | +\def\CJK@today{\CJK@todaysmall} |
| 69 | +\renewcommand\today{\CJK@today} |
| 70 | +\newcommand\CJKtoday[1][1]{% |
| 71 | + \ifcase#1\def\CJK@today{\CJK@todaysave} |
| 72 | + \or\def\CJK@today{\CJK@todaysmall} |
| 73 | + \or\def\CJK@today{\CJK@todaybig} |
| 74 | + \fi} |
| 75 | + |
| 76 | +% |
| 77 | +% modify the definitions of Standard LaTeX document class |
| 78 | +% |
| 79 | +\@ifundefined{chapter}{ |
| 80 | + \def\@part[#1]#2{% |
| 81 | + \ifnum \c@secnumdepth >\m@ne |
| 82 | + \refstepcounter{part}% |
| 83 | +% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% |
| 84 | + \addcontentsline{toc}{part}{\CJKprepartname\expandafter\noexpand\CJKthepart\CJKpartname\hspace{1em}#1}% |
| 85 | + \else |
| 86 | + \addcontentsline{toc}{part}{#1}% |
| 87 | + \fi |
| 88 | + {\parindent \z@ \raggedright |
| 89 | + \interlinepenalty \@M |
| 90 | + \normalfont |
| 91 | + \ifnum \c@secnumdepth >\m@ne |
| 92 | +% \Large\bfseries \partname\nobreakspace\thepart |
| 93 | + \Large\bfseries \CJKprepartname\CJKthepart\CJKpartname |
| 94 | + \par\nobreak |
| 95 | + \fi |
| 96 | + \huge \bfseries #2% |
| 97 | + \markboth{}{}\par}% |
| 98 | + \nobreak |
| 99 | + \vskip 3ex |
| 100 | + \@afterheading} |
| 101 | +}{ |
| 102 | + \def\@part[#1]#2{% |
| 103 | + \ifnum \c@secnumdepth >-2\relax |
| 104 | + \refstepcounter{part}% |
| 105 | +% \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% |
| 106 | + \addcontentsline{toc}{part}{\CJKprepartname\expandafter\noexpand\CJKthepart\CJKpartname\hspace{1em}#1}% |
| 107 | + \else |
| 108 | + \addcontentsline{toc}{part}{#1}% |
| 109 | + \fi |
| 110 | + \markboth{}{}% |
| 111 | + {\centering |
| 112 | + \interlinepenalty \@M |
| 113 | + \normalfont |
| 114 | + \ifnum \c@secnumdepth >-2\relax |
| 115 | +% \huge\bfseries \partname\nobreakspace\thepart |
| 116 | + \huge\bfseries \CJKprepartname\CJKthepart\CJKpartname |
| 117 | + \par |
| 118 | + \vskip 20\p@ |
| 119 | + \fi |
| 120 | + \Huge \bfseries #2\par}% |
| 121 | + \@endpart} |
| 122 | + \if@twoside |
| 123 | + \def\chaptermark#1{% |
| 124 | + \markboth {\MakeUppercase{% |
| 125 | + \ifnum \c@secnumdepth >\m@ne |
| 126 | + \if@mainmatter |
| 127 | +% \@chapapp\ \thechapter. \ % |
| 128 | + \CJKprechaptername\CJKthechapter\CJKchaptername \ % |
| 129 | + \fi |
| 130 | + \fi |
| 131 | + #1}}{}}% |
| 132 | + \def\sectionmark#1{% |
| 133 | + \markright {\MakeUppercase{% |
| 134 | + \ifnum \c@secnumdepth >\z@ |
| 135 | +% \thesection. \ % |
| 136 | + \thesection \ % |
| 137 | + \fi |
| 138 | + #1}}} |
| 139 | + \else |
| 140 | + \def\chaptermark#1{% |
| 141 | + \markright {\MakeUppercase{% |
| 142 | + \ifnum \c@secnumdepth >\m@ne |
| 143 | + \if@mainmatter |
| 144 | +% \@chapapp\ \thechapter. \ % |
| 145 | + \CJKprechaptername\CJKthechapter\CJKchaptername \ % |
| 146 | + \fi |
| 147 | + \fi |
| 148 | + #1}}} |
| 149 | + \fi |
| 150 | + \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne |
| 151 | + \if@mainmatter |
| 152 | + \refstepcounter{chapter}% |
| 153 | +% \typeout{\@chapapp\space\thechapter.}% |
| 154 | + \typeout{\CJKprechaptername\CJKthechapter\CJKchaptername}% |
| 155 | + \addcontentsline{toc}{chapter}% |
| 156 | +% {\protect\numberline{\thechapter}#1}% |
| 157 | + {\protect\numberline{}\CJKprechaptername% |
| 158 | + \expandafter\noexpand\CJKthechapter\CJKchaptername\hspace{0.8em}#1}% |
| 159 | + \else |
| 160 | + \addcontentsline{toc}{chapter}{#1}% |
| 161 | + \fi |
| 162 | + \else |
| 163 | + \addcontentsline{toc}{chapter}{#1}% |
| 164 | + \fi |
| 165 | + \chaptermark{#1}% |
| 166 | + \addtocontents{lof}{\protect\addvspace{10\p@}}% |
| 167 | + \addtocontents{lot}{\protect\addvspace{10\p@}}% |
| 168 | + \if@twocolumn |
| 169 | + \@topnewpage[\@makechapterhead{#2}]% |
| 170 | + \else |
| 171 | + \@makechapterhead{#2}% |
| 172 | + \@afterheading |
| 173 | + \fi} |
| 174 | + \def\@makechapterhead#1{% |
| 175 | + \vspace*{50\p@}% |
| 176 | + {\parindent \z@ \raggedright \normalfont |
| 177 | + \ifnum \c@secnumdepth >\m@ne |
| 178 | + \if@mainmatter |
| 179 | +% \huge\bfseries \@chapapp\space \thechapter |
| 180 | + \huge\bfseries \CJKprechaptername\CJKthechapter\CJKchaptername |
| 181 | + \par\nobreak |
| 182 | + \vskip 20\p@ |
| 183 | + \fi |
| 184 | + \fi |
| 185 | + \interlinepenalty\@M |
| 186 | + \Huge \bfseries #1\par\nobreak |
| 187 | + \vskip 40\p@ |
| 188 | + }} |
| 189 | + \renewcommand*\l@chapter[2]{% |
| 190 | + \ifnum \c@tocdepth >\m@ne |
| 191 | + \addpenalty{-\@highpenalty}% |
| 192 | + \vskip 1.0em \@plus\p@ |
| 193 | +% \setlength\@tempdima{1.5em}% |
| 194 | + \setlength\@tempdima{0em}% |
| 195 | + \begingroup |
| 196 | + \parindent \z@ \rightskip \@pnumwidth |
| 197 | + \parfillskip -\@pnumwidth |
| 198 | + \leavevmode \bfseries |
| 199 | + \advance\leftskip\@tempdima |
| 200 | + \hskip -\leftskip |
| 201 | + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par |
| 202 | + \penalty\@highpenalty |
| 203 | + \endgroup |
| 204 | + \fi} |
| 205 | +\let\@appendix\appendix |
| 206 | +\renewcommand\appendix{\@appendix% |
| 207 | + \def\CJKprechaptername{\relax}% |
| 208 | + \def\CJKthechapter{\relax}% |
| 209 | + \def\CJKchaptername{\appendixname}} |
| 210 | +} %end of \@ifundefined{chapter} |
| 211 | + |
| 212 | +\def\numberline#1{\ifdim\@tempdima>0pt% |
| 213 | + \settowidth\@tempdimb{#1\space}% |
| 214 | + \ifdim\@tempdima<\@tempdimb% |
| 215 | + \@tempdima=\@tempdimb% |
| 216 | + \fi% |
| 217 | + \hb@xt@\@tempdima{#1\hfil}% |
| 218 | + \fi} |
| 219 | + |
| 220 | +\endinput |
0 commit comments