# Multiple references in LaTeX

I'm writing a paper and using the IEEEtran.cls in LaTeX. I need to have my references to appear like:

\cite{test1,test2,test3}
I want : [1-3]


I searched and found that I need to include cite package. However, after I have used cite packages... I got :

[1]-[3]


How can I get [1-3] instead of [1]-[3]? without using new commands ?

Here is an example of what I have :

\documentclass[conference]{IEEEtran}
\usepackage{cite}
\begin{document}
\section{Test}
\cite{test1,test2,test3}.
\bibliographystyle{IEEEtran}
\bibliography{test}
\end{document}


the test.bib file:

@MISC{test1,
title = {Reference test1}
}
@MISC{test2,
title = {Reference test2}
}
@MISC{test3,
title = {Reference test3}
}


output :

       I. TEST
[1]–[3].
REFERENCES
[1] “Reference test1.”
[2] “Reference test2.”
[3] “Reference test3.”

• ...get [1]-[3] instead of [1]-[3]? What's the difference? – nneonneo Feb 16 '13 at 19:40
• sorry, i mean [1-3] instead of [1]-[3]. – Eng.Mohd Feb 16 '13 at 20:14
• @ nneonneo ,check the update!! – Eng.Mohd Feb 16 '13 at 20:15
• @vonbrand . I guess that's why I'm asking ? the real output is different from the expected output. I'm 100% sure that I'm getting [1]-[3] instead of [1-3] ? – Eng.Mohd Feb 16 '13 at 21:46
• I use IEEEtran and in no way does it behave like you say.. If you want help, you'll need to give a minimal example (one I can copy completely into my latex and compile) where the problem occurs. – Nathan G Feb 17 '13 at 1:33

I wouldn't use the conference mode of IEEE but use ieeeconf directly instead if I were you but that's another story.

IEEE has certain standards and all their classes, not surprisingly, obey those standards. What you are asking is something IEEE doesn't want and that's why it's not supported. However for personal use you can override it. Using natbib is not a good idea with IEEE as it's specifically discouraged.

\documentclass{IEEEtran}
\usepackage{filecontents}

\begin{filecontents*}{test.bib}
@MISC{test1,
title = {Reference test1}
}
@MISC{test2,
title = {Reference test2}
}
@MISC{test3,
title = {Reference test3}
}
\end{filecontents*}

\renewcommand{\citedash}{--}

\begin{document}

\section{Test}
\cite{test1,test2,test3}.
\bibliographystyle{IEEEtran}
\bibliography{test}
\end{document}


• thank you it works. Regarding your suggestion to use ieeeconf. I tried to use it directly(\documentclass{ieeeconf}), got an error? Any suggestion ? – EngS Feb 17 '13 at 18:29
• @Eng.Mohd You can simply look at your conference website for the class file. Usually each IEEE community, places one style file for the author kit and place it in your document directory. – percusse Feb 17 '13 at 19:36
• Unfortunately, this what I found on the website. It's IEEEtran where you provide the mode[conference]. – EngS Feb 17 '13 at 20:46

Try

\usepackage[sort&compress]{natbib}


instead of \usepackage{cite} .

• You may also want to provide the option numbers. This tells natbib that it's dealing with a numeric rather than an author-year citation style. – Mico Feb 17 '13 at 13:57
• Jan and Mico. Thank you . But I would like to make it with \cite. @NathanG check the example that I provide to make you believe! – EngS Feb 17 '13 at 15:33
• I much prefer natbib, but unfortunately find myself in positions where cite is required, like with the template for the PLOS One journal. – ryanjdillon Jun 20 '17 at 11:21