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.

closed as too localized by Marco Daniel, lockstep, Joseph Wright Sep 22 '11 at 17:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • EDIT: Never mind, problem solved, it was as simple as adding \usepackage{cite}. Admins, feel free to delete this question. – Max Sep 22 '11 at 14:12
  • I was just about to ask the same question; I don't think this question should be closed. – Rebecca J. Stones Mar 18 '15 at 6:44
  • I second @RebeccaJ.Stones. – Taiki Jan 18 '18 at 3:59
  • I also had this problem. – August Janse Apr 26 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 – August Janse Apr 29 at 7:54

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 or ask your own question.