Elsevier 模板存在问题:引用格式为 [1,2,3,4,5],而不是

Elsevier 模板存在问题:引用格式为 [1,2,3,4,5],而不是

在里面Elsevier 模板,问题标题中提到了一个问题。 上还有一些其他相关问题tex.stackexchange,但是,这里没有用。您知道解决这个问题的方法吗?

模板下载链接:http://mirrors.ctan.org/macros/latex/contrib/elsarticle.zip

以下是针对模板的内容:elsarticle-template-num

\documentclass[preprint,12pt]{elsarticle}


\usepackage{amssymb}

\journal{Nuclear Physics B}

\begin{document}

\begin{frontmatter}
\title{}
\author{}
\address{}
\begin{abstract}    
\end{abstract}

\end{frontmatter}


\section{}
\label{}

%% If you have bibdatabase file and want bibtex to generate the
%% bibitems, please use
%%
%%  \bibliographystyle{elsarticle-num} 
%%  \bibliography{<your bibdatabase>}

\begin{thebibliography}{00}

%% \bibitem{label}
%% Text of bibliographic item

\bibitem{}

\end{thebibliography}
\end{document}
\endinput

答案1

类似这样的方法就可以了

\PassOptionsToPackage{sort&compress}{natbib}
\documentclass[preprint,12pt]{elsarticle}
\usepackage{amssymb}
\journal{Gnus of the World}
\begin{document}
\begin{frontmatter}
\title{Gnus and Gnats, IV.}
\author{John X. Doe}
\address{Nowhere U.}
\begin{abstract}
No need at this stage
\end{abstract}
\end{frontmatter}
\section{Gnus are everywhere}
\begin{filecontents*}{\jobname.bib}
@ARTICLE{Important,
  author       = "Doe, J.",
  title        = "Gnus and Gnats, {I}.",
  journal      = "Gnus of the world",
  year         = "2020",
  volume       = "2456",
  number       = "1",
  pages        = "123--2567",
}
@ARTICLE{Importantb,
  author       = "Doe, J.",
  title        = "Gnus and Gnats, {II}.",
  journal      = "Gnus of the world",
  year         = "2020",
  volume       = "2456",
  number       = "2",
  pages        = "34562--56210",
}
@ARTICLE{Importantbb,
  author       = "Doe, J.",
  title        = "Gnus and Gnats, {III}.",
  journal      = "Gnus of the world",
  year         = "1998",
  volume       = "2",
  number       = "1",
  pages        = "1--3",
}
\end{filecontents*}
\cite{Important,Importantb,Importantbb}
\bibliographystyle{elsarticle-num-names}
\bibliography{\jobname}
\end{document}

在此处输入图片描述

相关内容