我在使用CASthesis模板,遇到了如下错误:
! Undefined control sequence.
<argument> \CAST
@label@abstract
l.1 \begin{abstract}
\newenvironment{abstract}
{\Nchapter{\CAST@label@abstract}}
{}
\newcommand\keywords[1]{%
\vspace{2ex}\noindent{\heiti \CAST@label@keywords} #1}
\newenvironment{englishabstract}
{\Nchapter{\CAST@label@englishabstract}}
{}
\newcommand\englishkeywords[1]{%
\vspace{2ex}\noindent{\bf \CAST@label@englishkeywords} #1}
或许是版本问题?两个电脑的ctex版本都是2.9.2.164,使用的winedt版本都是10.3。
P.S.主文件如下:
\documentclass{CASthesis}
\usepackage{pdfpages}
\usepackage{enumerate,ebezier,eepic,txfonts}
\usepackage{color,graphicx,graphics,epsf,epsfig,subfigure,calc}
\usepackage{ifthen}
\usepackage{longtable}
\usepackage{appendix}
%\usepackage{float}
\newtheorem{property}{性质}
\newtheorem{definition}{定义}
%\newtheorem{lemma}{引理}
%---------------------------------------------------------
% 可选参数:
% notypeinfo 取消扉页的LaTeX版本信息
% 下面三个选一个:
% dvipdfm 使用 dvipdfm(x) 生成最终的 PDF 文档 (缺省设置)
% dvips 使用 dvips 生成最终的 PS 文档
% pdftex 使用 pdfLaTeX 生成最终的 PDF 文档
\newcommand{\mi}{\mathrm{i}}
\newcommand{\ucite}[1]{\textsuperscript{\cite{#1}}}
\def\NEPS{{\rm NEPS}}
\def\ICG{{\rm ICG}}
\def\mod{{\rm mod}}
\def\gcd{{\rm gcd}}
%% In order to be able to put arrowheads in the middle of directed edges, we need an extra library.
\usetikzlibrary{decorations.markings}
%% The next line says how the "vertex" style of nodes should look: drawn as small circles.
\tikzstyle{vertex}=[circle, draw, inner sep=0pt, minimum size=6pt]
\tikzstyle{directed}=[postaction={decorate,
decoration={markings,mark=at position 0.3 with {\arrow{stealth}}}
%other arrow styles:>, <, |, stealth, latex, stealth reversed
}]%%
%% Next, we make a \vertex command as a shorthand in place of \node[vertex} to get that style.
\newcommand{\vertex}{\node[vertex]}
\graphicspath{{chapter/}{figures/}}
%\hypersetup{colorlinks=false}
\CTEXsetup[format+={\flushleft}]{section}
\allowdisplaybreaks
\begin{document}
% \maketitle
% \makeenglishtitle
\includepdfmerge{cover.pdf,1-6}
\frontmatter
\include{chapter/abstract}
\tableofcontents
\mainmatter
\include{chapter/chap-1}
\include{chapter/chap-2}
\include{chapter/chap-3}
\include{chapter/chap-4}
\include{chapter/chap-5}
\include{chapter/bib}
\include{chapter/project-1}
\include{chapter/paper}
\include{chapter/thanks}
\end{document}
abstract文件内容大概为
\begin{abstract}
...
\end{abstract}
提前感谢!
cfg中有,我在另外一台电脑上运行是没有bug的
@u10401 这就是玄学了,需要看看风水。
找到了解决方法。
这是 ctex 宏包的 Bug,以前没有显现出来,fontspec 2.4 版本以后显现出来了。 暂时的解决办法,在 documentclass 的前面写:
expandafterdefcsname CTEX@spaceCharendcsname{hspace{1em}}