2

First post here so I don't know if I'm doing anything wrong, but here it goes:

Like this post, I seem to struggle with putting multiple citations into the same brackets. The solution that's presented

\renewcommand\citepunct{, }

only works for 2 citations. If I add more it still does it like this:

[1]-[3]

In the ieeetran documentation it states that if the "cite" package is used, this should be fixed, however I am using the cite package and it still does not work. How do I get this to work?

Im using BibTex and work in overleaf btw.

Example code:

\documentclass[conference]{IEEEtran}
\usepackage{cite}
\begin{document}
\cite{dummy1,dummy2,dummy3}
\bibliographystyle{IEEEtran}
\bibliography{References}
\end{document}

Will result in:

[1]-[3]

1
  • Welcome to TeX.SE.
    – Mico
    Feb 2, 2022 at 15:40

1 Answer 1

1

I'd like to suggest that you switch from using the cite citation management package to using the natbib package with the options numbers and sort&compress.

A side-benefit you'll get from using the natbib package is that, among all BibTeX-based citation management packages, it's most compatible with the hyperref package.

enter image description here

\documentclass[conference]{IEEEtran}

\begin{filecontents}[overwrite]{References.bib}
@misc{dummy1,author="A",title="X",year=3001}
@misc{dummy2,author="B",title="Y",year=3002}
@misc{dummy3,author="C",title="Z",year=3003}
\end{filecontents}

\usepackage[numbers,sort&compress]{natbib}
\bibliographystyle{IEEEtran}

\usepackage[colorlinks,allcolors=blue]{hyperref} % optional

\begin{document}
\cite{dummy1,dummy2,dummy3}
\bibliography{References}
\end{document}
2
  • Awesome, this works! Thanks man! For the uninitiated: just replace \usepackage{cite} with \usepackage[numbers,sort&compress]{natbib} Feb 2, 2022 at 16:06
  • As Mico has said, replacing \usepackage{cite} by \usepackage[numbers,sort&compress]{natbib} fixes the issue. Feb 2, 2022 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .