Undefined control sequence \begin{abstract}

发布于 2022-09-06 10:39:36

我在使用CASthesis模板,遇到了如下错误:

! Undefined control sequence.
<argument> \CAST 
                 @label@abstract
l.1 \begin{abstract}
                    
  1. 我尝试删除了.aux文件等,依旧有这种报错。
  2. 我在其他的电脑上可以成功运行此文件。
  3. .cls文件中定义如下:
\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}

提前感谢!

查看更多

关注者
0
被浏览
1.5k
LaTeXStudio
LaTeXStudio 2022-09-06
这家伙很懒,什么也没写!

那个label 就是中文名字,看看 cfg 文件里有没有定义。如果没有加上去就好了。

\def\CAST@label@abstract{摘要}

看看

1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览