2

I have encountered a problem when doing multiple citations using BibTeX and the document class IEEEtran in Mac OS X (Version 10.6.8). The desired effect is similar to this:

References [1, 2, 3].

with thin spaces in-between. Instead, I get

References [1], [2], [3].

For more details, see the attached example code. I tried the package cite and it didn't solve the problem. In fact, using cite (without options) produces this

References [1]-[3]

which is not what I want (I don't want compressed citations, which is a different thing, so this is not a duplicate of this question). The [nocompress] option of cite doesn't help either.

This is the example code:

\documentclass[12pt, draftclsnofoot, onecolumn]{IEEEtran}
\usepackage[T1]{fontenc}
%\usepackage{cite}
\begin{document}
\section{Introduction}
References~\cite{ref1, ref2, ref3}.
\bibliography{mybiblio}{}
\bibliographystyle{ieeetr}
\end{document}

And this is the mybiblio file:

@article{ref1,
    Author = {Surname1, N. and Surname2, N. and Surname3, N.},
    Journal = {Test},
    Number = 0,
    Pages = {1-2},
    Title = {Reference title},
    Volume = 0,
    Year = 2016
    }

@article{ref2,
    Author = {Surname1, N. and Surname2, N.},
    Journal = {Test},
    Number = 0,
    Pages = {1-2},
    Title = {Reference2 title},
    Volume = 0,
    Year = 2016
    }

@article{ref3,
    Author = {Surname1, N.},
    Journal = {Test},
    Number = 0,
    Pages = {1-2},
    Title = {Reference3 title},
    Volume = 0,
    Year = 2016
    }

P.S. I can't use natbib package.

3

IEEEtran explicitly defines citations to be separated into distinct [1],[2],[3] rather than the default [1,2,3] when the cite package is used by the \def\citepunct{], [} command which is used by cite. To over-rule this you can just use \def\citepunct{,} to produce [1,2,3] or insert a manual space, i.e. for a small spacing \, after the comma \def\citepunt{,\,} produces the following.

enter image description here

Produced from

\documentclass[12pt, draftclsnofoot, onecolumn]{IEEEtran}
\usepackage{filecontents}
\begin{filecontents}{mybiblio.bib}
@article{ref1,
    Author = {Surname1, N. and Surname2, N. and Surname3, N.},
    Journal = {Test},
    Number = 0,
    Pages = {1-2},
    Title = {Reference title},
    Volume = 0,
    Year = 2016
    }

@article{ref2,
    Author = {Surname1, N. and Surname2, N.},
    Journal = {Test},
    Number = 0,
    Pages = {1-2},
    Title = {Reference2 title},
    Volume = 0,
    Year = 2016
    }

@article{ref3,
    Author = {Surname1, N.},
    Journal = {Test},
    Number = 0,
    Pages = {1-2},
    Title = {Reference3 title},
    Volume = 0,
    Year = 2016
    }
\end{filecontents}

\usepackage[nocompress]{cite}

\def\citepunct{,\,}

\begin{document}
\section{Introduction}
References~\cite{ref1, ref2, ref3}.
\bibliography{mybiblio}
\bibliographystyle{ieeetr}
\end{document}

It may be worth noting that IEEEtran does the same for the compressed citation by defaulting to \def\citedash{]--[} producing [1]--[3] rather than [1--3] which may be the expected result.

  • 2
    Of course it should probably be noted that IEEEtran do this to make references appear as the IEEE want, so if this is for submission to a journal any such changes will likely be futile. – Dai Bowen Nov 10 '16 at 15:19
  • Hi, I am facing the same problem. Reading your comment I understood that IEEE (when you are using the IEEETran template) wants you to have the references as [1],[2],[3],[4] rather than [1]-[4]. Is that correct? Therefore, is it advised to leave the template as it is? – kalmanIsAGameChanger Oct 3 '18 at 20:05
  • 1
    @kalmanIsAGameChanger yes, the default style of IEEEtran is as intended even if it looks odd. – Dai Bowen Oct 5 '18 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.