[Tex/LaTex] Multiple references in LaTeX

citingieeetran

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 get :

[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.”

Best Answer

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[noadjust]{cite}
\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}

enter image description here

Related Question