赞
踩
这个错误是由于系统里面GB.cpx文件是乱码的,所以需要另外下载GB文件放在当前目录或者替换掉系统的文件即可。(把gb.cpx 覆盖到安装路径下,即放到 C:\CTEX\MiKTeX\tex\latex\cjk\GB)
当时网上提供的gb.cap 和gb.cpx下载链接都已经失效,现提供以下解决方案(亲测有效):
在https://github.com/descent/write_os/blob/master/pdf/utf8.cpx
复制粘贴到文本编辑器中,保存为GB.cpx,在linux中默认的编码为utf8
替换C:\CTEX\MiKTeX\tex\latex\cjk\GB\GB.cpx 即可
% This is the file GB.cap of the CJK package % for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e % % created by aloft <aloft@ctex.org> for Standard LaTeX document class. % % Version 4.5.2 (18-May-2003) % % $Id: GB.cpx,v 1.7 2003/05/20 15:51:14 aloft Exp $ % \def\fileversion{4.5.2} \def\filedate{2003/05/18} \ProvidesFile{GB.cap}[\filedate\space\fileversion for Standard LaTeX document class] % Chinese captions % % character set: GB 2312-80 % encoding: EUC \renewcommand\contentsname{目录} \renewcommand\listfigurename{插图} \renewcommand\listtablename{表格} \@ifundefined{chapter} {\renewcommand\refname{参考文献}} {\renewcommand\bibname{参考文献}} \renewcommand\indexname{索引} \renewcommand\figurename{Fig} \newcommand\codename{代码} \renewcommand\tablename{表} \newcommand\CJKprepartname{第} \newcommand\CJKpartname{部分} \newcommand\CJKthepart{\CJKnumber{\@arabic\c@part}} \@ifundefined{chapter}{}{ \newcommand\CJKprechaptername{第} \newcommand\CJKchaptername{章} \newcommand\CJKthechapter{\CJKnumber{\@arabic\c@chapter}}} \renewcommand\appendixname{附录~\@Alph\c@chapter} \@ifundefined{mainmatter} {\renewcommand\abstractname{摘要}}{} % \renewcommand\ccname{} % ? % \renewcommand\enclname{附件} % \newcommand\prepagename{} % ? % \newcommand\postpagename{} % ? % \renewcommand\headtoname{} % ? % \renewcommand\seename{} % ? \let\CJK@todaysave=\today \def\CJK@todaysmall{~\the\year~年~\the\month~月~\the\day~日} \def\CJK@todaybig{\CJKdigits{\the\year}年\CJKnumber{\the\month}月\CJKnumber{\the\day}日} \def\CJK@today{\CJK@todaysmall} \renewcommand\today{\CJK@today} \newcommand\CJKtoday[1][1]{% \ifcase#1\def\CJK@today{\CJK@todaysave} \or\def\CJK@today{\CJK@todaysmall} \or\def\CJK@today{\CJK@todaybig} \fi} % % modify the definitions of Standard LaTeX document class % \@ifundefined{chapter}{ \def\@part[#1]#2{% \ifnum \c@secnumdepth >\m@ne \refstepcounter{part}% % \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \addcontentsline{toc}{part}{\CJKprepartname\expandafter\noexpand\CJKthepart\CJKpartname\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi {\parindent \z@ \raggedright \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >\m@ne % \Large\bfseries \partname\nobreakspace\thepart \Large\bfseries \CJKprepartname\CJKthepart\CJKpartname \par\nobreak \fi \huge \bfseries #2% \markboth{}{}\par}% \nobreak \vskip 3ex \@afterheading} }{ \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}% % \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% \addcontentsline{toc}{part}{\CJKprepartname\expandafter\noexpand\CJKthepart\CJKpartname\hspace{1em}#1}% \else \addcontentsline{toc}{part}{#1}% \fi \markboth{}{}% {\centering \interlinepenalty \@M \normalfont \ifnum \c@secnumdepth >-2\relax % \huge\bfseries \partname\nobreakspace\thepart \huge\bfseries \CJKprepartname\CJKthepart\CJKpartname \par \vskip 20\p@ \fi \Huge \bfseries #2\par}% \@endpart} \if@twoside \def\chaptermark#1{% \markboth {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter % \@chapapp\ \thechapter. \ % \CJKprechaptername\CJKthechapter\CJKchaptername \ % \fi \fi #1}}{}}% \def\sectionmark#1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\z@ % \thesection. \ % \thesection \ % \fi #1}}} \else \def\chaptermark#1{% \markright {\MakeUppercase{% \ifnum \c@secnumdepth >\m@ne \if@mainmatter % \@chapapp\ \thechapter. \ % \CJKprechaptername\CJKthechapter\CJKchaptername \ % \fi \fi #1}}} \fi \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne \if@mainmatter \refstepcounter{chapter}% % \typeout{\@chapapp\space\thechapter.}% \typeout{\CJKprechaptername\CJKthechapter\CJKchaptername}% \addcontentsline{toc}{chapter}% % {\protect\numberline{\thechapter}#1}% {\protect\numberline{}\CJKprechaptername% \expandafter\noexpand\CJKthechapter\CJKchaptername\hspace{0.8em}#1}% \else \addcontentsline{toc}{chapter}{#1}% \fi \else \addcontentsline{toc}{chapter}{#1}% \fi \chaptermark{#1}% \addtocontents{lof}{\protect\addvspace{10\p@}}% \addtocontents{lot}{\protect\addvspace{10\p@}}% \if@twocolumn \@topnewpage[\@makechapterhead{#2}]% \else \@makechapterhead{#2}% \@afterheading \fi} \def\@makechapterhead#1{% \vspace*{50\p@}% {\parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter % \huge\bfseries \@chapapp\space \thechapter \huge\bfseries \CJKprechaptername\CJKthechapter\CJKchaptername \par\nobreak \vskip 20\p@ \fi \fi \interlinepenalty\@M \Huge \bfseries #1\par\nobreak \vskip 40\p@ }} \renewcommand*\l@chapter[2]{% \ifnum \c@tocdepth >\m@ne \addpenalty{-\@highpenalty}% \vskip 1.0em \@plus\p@ % \setlength\@tempdima{1.5em}% \setlength\@tempdima{0em}% \begingroup \parindent \z@ \rightskip \@pnumwidth \parfillskip -\@pnumwidth \leavevmode \bfseries \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par \penalty\@highpenalty \endgroup \fi} \let\@appendix\appendix \renewcommand\appendix{\@appendix% \def\CJKprechaptername{\relax}% \def\CJKthechapter{\relax}% \def\CJKchaptername{\appendixname}} } %end of \@ifundefined{chapter} \def\numberline#1{\ifdim\@tempdima>0pt% \settowidth\@tempdimb{#1\space}% \ifdim\@tempdima<\@tempdimb% \@tempdima=\@tempdimb% \fi% \hb@xt@\@tempdima{#1\hfil}% \fi} \endinput
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。