1

I am working on a presentation using beamer. I have a bl.bib file that has several entries in it. I'm also using the cite package but when I try to cite several references together, i.e., \cite{ref1, ref2,ref3}, the result looks like [1,2,3] and not 1-[3]. Does anybody know how to make it look like 1-[3]? Is this by purpose because it is not common to cite like this in presentations?

Minimal working example: Tex file:

\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 file:

@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} }

result:

enter image description here

Thanks!

1 Answers1

1

Solved by using \usepackage[numbers,sort&compress]{natbib} instead of the cite package.