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]?
5 Answers
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.
-
3Note 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).– luatorFeb 2, 2016 at 15:02
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.
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
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.
-
1This is the only answer that works right away. Using
\documentclass{IEEEtran}
,\usepackage[noadjust]{cite}
, and\bibliographystyle{IEEEtran}
Dec 28, 2016 at 5:27
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)
Output:
And this is the example reference of phaip style
BTW, maybe you should go to the Tex stackexchange site for help.
-
Where did you get these images from? Please provide sources.– animusonFeb 9, 2012 at 18:49
[1, 2, 3]
? IEEE in fact needs[1]--[3]
.