I'm wondering if anyone can suggest a better way to tweak natbib
to generate numeric references that follow IEEE's citation reference guide and style manual. Specifically, IEEE wants each of a group of citations in separate brackets (like this: [1], [2]), but natbib
seems to insist on grouping them (like so: [1, 2]).
The cite
package handles this correctly, and I know the natbib
IEEE templates are "not recommended" for IEEE submission, but I like being able to pull the name of the author(s) into the text sometimes, which natbib
lets me do with \citet
. Using natbib
also lets me switch to author-year citations, if I end up having to change publications, without going through and changing every citation, which is also nice.
I can get close in natbib
by setting the separator punctuation to ], [
(using \bibpunct
), but natbib
appears to add a hard-coded space after the separator (looks like this: [1], [ 2] (note the space in front of the 2; it looks more prominent in my typeset copy)). My solution at this point is to override one of the macros in natbib.sty
in my own document, to remove the space (which can be put onto the end of the separator string if it's needed):
\makeatletter
\def\NAT@def@citea{\def\@citea{\NAT@separator}}% removed \NAT@space
\makeatother
Is there a more elegant and robust solution, with either cite
or natbib
? Or should I start looking into biblatex
(which I've just found out about) for future work?
Best Answer
Your solution can't be improved very well. I recommend switching to
biblatex
.However @Werner suggested a separate
\cite
command for each reference.To avoid this you can use something like this:
Note that with this way you lose the optional argument of
\cite
.