在 beamerposter 中使用 cite 包有问题吗?我尝试使用它,以便在调用 \cite{ref1,ref2,ref3} 时我的参考文献是有序的,但我收到错误:
./main.tex:333: Undefined control sequence.
\@cite@n ...mpcnta \m@ne \mathchardef \@cite@incr
\z@ \let \@h@ld \@empty \l...
这是一个将产生错误的示例源文件。要测试这一点,您需要输入自己的 .bib 文件并附上相应的参考资料。
\documentclass[final]{beamer}
\usepackage{cite}
\usepackage[scale=1.24]{beamerposter} % Use the beamerposter package for laying out the poster
\usetheme{confposter} % Use the confposter theme supplied with this template
\newlength{\sepwid}
\newlength{\onecolwid}
\newlength{\twocolwid}
\newlength{\threecolwid}
\setlength{\paperwidth}{48in} % A0 width: 46.8in
\setlength{\paperheight}{36in} % A0 height: 33.1in
\setlength{\sepwid}{0.024\paperwidth} % Separation width (white space) between columns
\setlength{\onecolwid}{0.22\paperwidth} % Width of one column
\setlength{\twocolwid}{0.464\paperwidth} % Width of two columns
\setlength{\threecolwid}{0.708\paperwidth} % Width of three columns
\setlength{\topmargin}{-0.5in} % Reduce the top margin size
%-----------------------------------------------------------
\usepackage{graphicx} % Required for including images
\usepackage{booktabs} % Top and bottom rules for tables
%----------------------------------------------------------------------------------------
% TITLE SECTION
%----------------------------------------------------------------------------------------
\title{TEST} % Poster title
\author{AUTHOR}
\institute{INSTITUTE}
%----------------------------------------------------------------------------------------
\begin{document}
\setlength{\belowcaptionskip}{2ex} % White space under figures
\setlength\belowdisplayshortskip{2ex} % White space under equations
\begin{frame}[t]
\begin{columns}[t]
\begin{column}{\onecolwid} % The first column
\begin{block}{Block}
CITATIONS \cite{ref1,ref2}.
\end{block}
\begin{block}{References}
\bibliographystyle{abbrv}
\bibliography{bibfile}
\end{block}
\end{column}
\end{columns}
\end{frame}
\end{document}
是不是根本就无法将 cite 包与 beamerposter 一起使用?还有其他选择吗?
答案1
使用最新的 TeX Live 2017 不会发生此错误,因此您的某些软件包似乎已过时。如果无法更新,则可以使用以下替代\usepackage{cite}
方法
\usepackage[sort&compress,numbers]{natbib}