如何解决以下问题?请不要说“\def cs{...}”,而要说“\def\cs{...}”。我插入了一个无法访问的控制序列

如何解决以下问题?请不要说“\def cs{...}”,而要说“\def\cs{...}”。我插入了一个无法访问的控制序列

我正在使用 EngC 模板(剑桥大学出版社)撰写文本。正文看起来不错,但我遇到了一些与参考文献部分相关的错误。有什么建议可以解决吗?

 \NeedsTeXFormat{LaTeX2e}[1996/06/01]


\documentclass{EngC}
   \newcommand\cambridge{EngC}
  \usepackage[usenames,dvipsnames]{xcolor}
  \usepackage{booktabs} 
  \usepackage{graphicx}
  \usepackage{makeidx}
\usepackage{pgfplots}
\usepackage{filecontents}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{patchplots}
\usepgfplotslibrary{colormaps} %
%\usepgfplotslibrary{external} 
%\tikzexternalize
\usepackage{rotating} %sideway table
\usepackage{float}
\usepackage{amssymb}
  \usepackage[numbers,compress]{natbib}
 \usepackage{amsmath}% if you are using this package,
                      % it must be loaded before amsthm.sty
  \usepackage{amsthm}
    \usepackage{subcaption}
 \usepackage{txfonts}% times font (used to produce EngCguide.pdf)
                      % this package must be loaded after amsthm.sty
  \usepackage{graphicx}
%\usepackage{IEEEtran.bst}
%  \usepackage[rightcaption,raggedright]{sidecap}% for side captions
 % \usepackage{framed}         % for floatingboxes
  \usepackage{soul}           
 %\usepackage{harvard}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{bm}
\usepackage{flexisym}
%\usepackage{flushend}
\usepackage{dsfont}
%\usepackage[landscape]{geometry}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{chains,shapes.multipart}
\usetikzlibrary{shapes}
\usetikzlibrary{automata}
\setlength{\jot}{7pt}
\usepackage{multirow}
\usepackage{latexsym}
\usepackage[utf8]{inputenc}

\usetikzlibrary{shapes.geometric,arrows}
\tikzstyle{startstop}=[ellipse, minimum width=0.5cm, minimum height=0.4cm, text centered, draw=black, fill=white!30]
\tikzstyle{io}=[trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=0.5cm, minimum height=0.2cm, text centered, draw=black, fill=white!30]
\tikzstyle{process}=[rectangle, minimum width=1.5cm, minimum height=0.75cm, text badly centered, draw=black, fill=white!30]
\tikzstyle{decision}=[diamond, minimum width=1cm, text width=0.5cm, minimum height=0.2cm, text centered, draw=black, fill=white!30]
\tikzstyle{arrow}=[thick,->,>=stealth]



%\usepackage[dvipsnames]{xcolor}
\definecolor {processblue}{cmyk}{0,0,0,7}
\definecolor{light-gray}{gray}{0.85}
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}{Corollary}[thm]
 \usepackage[usenames,dvipsnames]{pstricks}
%\newcommand{\BigO}[1]{\ensuremath{\operatorname{O}\bigl(#1\bigr)}}
%\usepackage[dvipsnames]{xcolor}
\usepackage{pgfplots}
\usetikzlibrary{shapes.multipart}

\newcommand{\bc}{,\penalty0 \;}
\newcommand{\balpha}{{\boldsymbol \alpha}}
\newcommand{\bPhi}{{\boldsymbol \Phi}}
\newcommand{\bphi}{{\boldsymbol \phi}}
\newcommand{\bzero}{{\boldsymbol 0}}
%\newcommand*{\grayemph}[1]{%
  %\tikz[baseline=(X.base)] \node[rectangle, fill=light-gray, rounded corners, inner sep=1.8mm] (X) {#1};%
%}

% if you are using either vancouver.bst or IEEEtran.bst and wish to remove
% square braces in the reference list, uncomment the line below
%\removesquarebraces
%   \usepackage{amsmath}
  \usepackage{rotating}
  \usepackage{floatpag}
  \rotfloatpagestyle{empty}


% indexes
% uncomment the relevant set of commands

% for a single index
% \usepackage{makeidx}
% \makeindex

% for multiple indexes using multind.sty
 % \usepackage{multind}\ProvidesPackage{multind}
  %\makeindex{authors}
  %\makeindex{subject}

% for multiple indexes using index.sty
% \usepackage{index}
% \newindex{aut}{adx}{and}{Author index}
% \makeindex



% see chapter 3 for details
  \theoremstyle{plain}% default
  \newtheorem{theorem}{Theorem}[chapter]
  \newtheorem{lemma}[theorem]{Lemma}
  \newtheorem*{corollary}{Corollary}
\usepackage{amsfonts}
  \theoremstyle{definition}
  \newtheorem{definition}[theorem]{Definition}
  \newtheorem{condition}[theorem]{Condition}

  \theoremstyle{remark}
  \newtheorem{remark}{Remark}[chapter]
  \newtheorem{notation}[remark]{Notation}
  \newtheorem*{case}{Case}

  \hyphenation{line-break line-breaks docu-ment triangle cambridge amsthdoc
    cambridgemods baseline-skip author authors cambridgestyle en-vir-on-ment polar}

  \setcounter{tocdepth}{2}% the toc normally lists sections;
% for the purposes of this document, this has been extended to subsections

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \includeonly{chap2}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeindex
  \begin{document}

%  \frontmatter
%  \maketitle
  %\tableofcontents
%  \listoffigures
  %\listoftables
%  \listoffloatingboxes
%  \listofcontributors
% \editedlistofcontributors
%  \include{notation}

  \mainmatter

   \author[Doctor X and Doctor Y]
    {Doctor X\footnotemark
    and Doctor Y\footnotemark}

  \chapterauthor{Doctor X\footnotemark\
    and Doctor Y\footnotemark}

 \chapter{Cool Science}
\label{intro}
\section{Section 1}
text text text
\section{Section 2}
text text text
\section{conclusions}
\bibliographystyle{IEEEtran} % uncomment for IEEE style
 %\renewcommand{\refname}{Bibliography}% if you prefer this heading

 \bibliography{percolation.bib}


\printindex
\end{document}

一些错误(使用 overleaf 编译)

Missing control sequence inserted.

<inserted text> 
                \inaccessible 
l.185 

Please don't say `\def cs{...}', say `\def\cs{...}'.
I've inserted an inaccessible control sequence so that your
definition will be completed without mixing me up too badly.
You can recover graciously from this error, if you're
careful; see exercise 27.2 in The TeXbook.

<argument> ...ournal \@empty \let \@bib@Z@journal 
                                                  \@bibibid@ }\endgroup 
l.1107 \end{document}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Argument of \@bibibid@ has an extra }.

<inserted text> 
                \par 
l.1107 \end{document}

I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away

相关内容