我正在使用 beamer 制作演示文稿。我有一个bl.bib
文件,里面有几个条目。我也在使用 cite 包,但当我尝试同时引用多个参考文献时,即,\cite{ref1, ref2,ref3}
结果看起来像 [1,2,3],而不是1-[3]. 有人知道怎么做才能让它看起来像1-[3]?这是故意的吗,因为在演示文稿中引用这种内容并不常见?
最小工作示例:Tex 文件:
\documentclass{beamer}
\bibliographystyle{ieeetr}
\usepackage{cite}
%Information to be included in the title page:
\title{Sample title}
\author{Anonymous}
\institute{Overleaf}
\date{2021}
\begin{document}
\frame{\titlepage}
\begin{frame}
\frametitle{Sample frame title}
Test \cite{a,b,c}
\end{frame}
\begin{frame}[allowframebreaks]{References}
\bibliography{bibliography}
\end{frame}
\end{document}
bibliography.bib 文件:
@article{a,
title = {a},
author = {a},
journal = {I},
volume = {7},
pages = {6},
year = {6},
publisher = {IEEE}
}
@inproceedings{b,
title = {b},
author = {c},
booktitle = {d},
pages = {123},
year = {2018}
}
@article{c,
author = {c},
journal = {d},
title = {e},
year = {2004},
volume = {50},
number = {11},
pages = {1234}
}
结果:
谢谢!
答案1
通过使用\usepackage[numbers,sort&compress]{natbib}
而不是cite
包来解决。