37

I'm writing a paper in LaTeX with the IEEE style and when citing multiple references with \cite{ref_A,ref_B,ref_C}, it produces [1],[2],[3]. How can I change that to [1,2,3]?

4
  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question.
    – Werner
    Commented Feb 9, 2012 at 19:00
  • 4
    Does the the publication venue allow you to make this change to the standard IEEE style?
    – Toymakerii
    Commented Feb 10, 2012 at 3:40
  • 6
    Are you sure you want [1, 2, 3]? IEEE in fact needs [1]--[3]. Commented Jun 16, 2012 at 16:10
  • IEEE style with non-IEEE templates ([1]-[3], i.e. multiple cite with separate brackets) can be achieved like this: tex.stackexchange.com/a/340927/178758 Commented Jul 5, 2023 at 9:43

5 Answers 5

24

Assuming that you are using the Transactions style with

\documentclass[final]{IEEEtran} %or draft etc.

Using the following line in the preamble

\usepackage[noadjust]{cite}

and also using the house style of IEEEtran with

\bibliographystyle{IEEEtran}

passed the IEEE check more than once.

1
  • 3
    Note that this does not generate [1,2,3] but [1]-[3] (which is good, though, as it is in line with the IEEE style guide).
    – luator
    Commented Feb 2, 2016 at 15:02
14

Is your work meant for IEEE transactions? The IEEEtran class says:

Citations are made with the \cite command as usual. IEEEtran will produce citation numbers that are individually bracketed in IEEE style. (“[1], [5]” as opposed to the more common “[1, 5]” form.) The base IEEEtran does not sort or produce compressed “ranges” when there are three or more adjacent citation numbers. However, IEEEtran pre-defines some format control macros to facilitate easy use with Donald Arseneau’s cite.sty package. So, all an author has to do is to call cite.sty.

10

IEEE has redefined the \citepunct macro, which determines what is inserted between citations. You can see this by using the \citen command, which doesn't insert the surrounding brackets, instead of \cite.

You can redefine this back to the standard comma, penalty and thin space as follows:

\usepackage[noadjust]{cite}
\renewcommand{\citepunct}{,\penalty\citepunctpenalty\,}
\renewcommand{\citedash}{--}% optionally

I don't know if IEEE publication venues are okay with this change or not.

To control the appearance of three or more references, you may have to change the \citedash command as well. I haven't played with this, see the reference below for information about the \cite command.

Source: http://mirror.hmc.edu/ctan/macros/latex/contrib/cite/cite.pdf

6

go to IEEEtran.cls and replace \def\citepunct{],[} and \def\citedash{]--[} with \def\citepunct{,} and \def\citedash{--}, respectively. This is if you intend to use the IEEEtrans class in a custom citation format, understanding that it is not suitable for IEEE conferences.

1
  • 1
    This is the only answer that works right away. Using \documentclass{IEEEtran}, \usepackage[noadjust]{cite}, and \bibliographystyle{IEEEtran} Commented Dec 28, 2016 at 5:27
4

Not sure what marco package you're using, but if your bib style is something like "ieeetr" or "phaip".And it will works.

Code:

\documentclass{article}
%\usepackage{mcite} Optional if you want mcite feature.
\begin{document}
Insulator\cite{ref1,ref2} does not conduct electricity.
\bibliography{mydata}
\bibliographystyle{ieeetr}
\end{document}

and mydata.bib is:

@ARTICLE{ref1,
AUTHOR = "Zdzislaw Pawlak",
TITLE = "Rough sets",
JOURNAL = "International Journal of Computer Infomation Science",
YEAR = "1982",
volume = "5",
pages = "341-356",
}

@ARTICLE{ref2,
AUTHOR = "Zdzislaw Pawlak Jr.",
TITLE = "Rough sets",
JOURNAL = "International Journal of Computer Infomation Science",
YEAR = "1982",
volume = "5",
pages = "341-356",
}    

Here is example from a tutorial
from latex editor(In Chinese)

Input code

Output:

Tex output

And this is the example reference of phaip style

BTW, maybe you should go to the Tex stackexchange site for help.

1
  • Where did you get these images from? Please provide sources.
    – animuson
    Commented Feb 9, 2012 at 18:49

You must log in to answer this question.

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