TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Citing a range of papers (using numeric keys)?

I notice that in some papers, people cite references as [1-5], or as [1,2,3]. The idea is that their references are numbered in increasing order. How do they do this? My references come out all over the place in \bibliographystyle{plain} as, for example, [2,3,1,4,5,7,9].

share|improve this question

marked as duplicate by Tom Bombadil, clemens, Martin Schröder, egreg, zeroth Sep 22 '12 at 7:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

not quite. i want the package the put the refs in numerical order when they're not. that's the key point, not grouping them. – eqb Aug 24 '12 at 18:10
Load the cite package: \usepackage{cite} and reprocess the document (pdflatex+bibtex+pdflatex+pdflatex) to rebuild the bibliography and the citationss. – Gonzalo Medina Aug 24 '12 at 18:12
Also, by default when you load cite the references come out [1-5]. If you want [1,2,3,4,5], you need to use the option nocompress. Also, if you want more space than the default amount between the numbers in a citation, you can use the option space. – MSC Aug 24 '12 at 21:32
up vote 6 down vote accepted

Plain orders references by name, if you look at your bibliography you'll see that it is alphabetical. To get your references in order of appearance use the style unsrt.

share|improve this answer
Actually, that's precisely what I needed. In combination with the cite package as mentioned by Gonzalo above, it works perfectly! Thank you folks! – eqb Aug 24 '12 at 18:28
I wish I had enough reputation points to +1 everyone here. – eqb Aug 24 '12 at 18:29
@ethiopianqubit I'll do it for you :) – User 17670 Aug 24 '12 at 19:53

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