Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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, cgnieder, 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
4  
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

1 Answer 1

up vote 5 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
1  
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
1  
I wish I had enough reputation points to +1 everyone here. –  eqb Aug 24 '12 at 18:29
1  
@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.