Elsevier 範本的問題:引用為 [1,2,3,4,5],而非分組為

Elsevier 範本的問題:引用為 [1,2,3,4,5],而非分組為

在裡面愛思唯爾模板,存在問題標題中指出的問題。還有一些其他相關問題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}

在此輸入影像描述

相關內容