0

There are plenty of questions asking for the other way around (which are usually answered by "use natbib"). I use natbib for a different reason: I use IEEEtran and need \citet-style referencing, so I load natbib like \usepackage[numbers]{natbib}.

However, if I use \cite{ref1, ref2}, I get references like [1,2], but what I need is [1], [2], which I would get if I wouldn't load natbib. How can I enforce references in the form of [1], [2] using natbib?

kostrykin
  • 185
  • Using \setcitestyle{citesep={], [}} I can produce a hacky "[1], [ 2]"-style citing, but how to get rid of the extra whitespace? – kostrykin Jul 18 '21 at 23:13
  • 2
    The IEEEtran styles are designed to be used with the cite package not natbib. – Alan Munn Jul 18 '21 at 23:14
  • @AlanMunn No, this is exactly the opposite case I mentioned in the first sentence. I do get citations like [1,2,3], but what I want is [1], [2], [3] – kostrykin Jul 18 '21 at 23:17
  • @AlanMunn I know, but the "cite" package has no \citet right? – kostrykin Jul 18 '21 at 23:20
  • 1
    True, the answer undoes what you want, but what you want is what the OP in that question is getting with the cite package, which is what you need to use for IEEEtran. The citet vs. citep distinction only makes sense with author/year styles. So just use \cite. – Alan Munn Jul 18 '21 at 23:20
  • @AlanMunn But how can I print the name of the authors without using natbib? Is there some minimal package I get load aside of cite which allows printing author names? What I essentially want is printing something like "Skywalker et al. [2] proposed XXX" – kostrykin Jul 18 '21 at 23:23
  • You ask, "How can I enforce references in the form of [1], [2] using natbib?" Is somebody or something keeping you from writing \citet{ref1}, \citet{ref2}? – Mico Jul 19 '21 at 00:43
  • You also wrote, "What I essentially want is printing something like `Skywalker et al. [2] proposed XXX'." Are you looking for the vancouver bibliography style. – Mico Jul 19 '21 at 00:58
  • Along the lines of the separator workaround you can use \setcitestyle{citesep={], [\kern-.2222em}}, so put some negative space before the next number. – Marijn Jul 19 '21 at 07:43
  • @Mico Yes, the automatic ordering by appearance which is done by natbib keeps me from writing \citet{ref1}, \citet{ref2} – kostrykin Jul 19 '21 at 18:43
  • @Mico I obviously didn't sufficiently point out, that "Skywalker et al. [2] proposed" is a special case, but the regular case is citing like "[1], [2]" – kostrykin Jul 19 '21 at 18:44

0 Answers0