8

I'm using BibTeX to manage my bibliography, and have about 250 references. I cannot keep track of the order they were cited in, which leads to some funny formatting. To explain, consider this scenario...

The first citation goes like this \cite[ref1, ref2, ref3], and results in an in-text citation of "[1,2,3]", and also in a bibliography entry of:

  1. Ref 1 details
  2. Ref 2 details
  3. Ref 3 details

All normal so far. The difficulty occurs when I cite these again, but 'out of order', i.e., \cite[ref3, ref2]. This results in an in-text citation of "[3,2]". That looks very odd. What I'd like to do is tell LaTeX/BibTeX that order doesn't matter, and for it to automatically make the second citation appear in-text as "[2,3]".

It seems like a petty request in this fake example, but for a full 'book' with over 250 references that are named by authors rather than numbers, there's no way I can do this ordering manually, particularly as references get added or deleted with revisions.

I've tried adding in the command \usepackage[sort&compress]{natbib}, but it came up with this error:

! Package natbib Error: Bibliography not compatible with author-year citations. (natbib) l.287 ...and\NAT@force@numbers{}\NAT@force@numbers ?

EDIT: Never mind, problem solved, it was as simple as adding \usepackage{cite}. Admins, feel free to delete this question.

5
  • EDIT: Never mind, problem solved, it was as simple as adding \usepackage{cite}. Admins, feel free to delete this question.
    – Max
    Sep 22, 2011 at 14:12
  • I was just about to ask the same question; I don't think this question should be closed. Mar 18, 2015 at 6:44
  • I second @RebeccaJ.Stones.
    – Taiki
    Jan 18, 2018 at 3:59
  • I also had this problem. Apr 26, 2019 at 14:22
  • This didn't actually solve my problem since I was using BibLaTex. I'll leave this here for others in my situation: Biblatex, numeric style, multicite: Order of references Apr 29, 2019 at 7:54

1 Answer 1

6
\usepackage{cite}

This package works with the standard \cite command and does sorting and compressing.

In order to use natbib, one has also to choose a compatible bibliography style, such as plainnat.

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