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

I added the \input{references} line to the end of my Journal.tex file like so:


However, the references that are being outputted are not in order of citation. Rather, they are in the order that the citations are defined in the references.tex file. I did try adding the unsrt command as such


but no luck... I also tried deleting the aux files and stuff, but no cigar...

I am brand new to latex, so please help me out here! Thanks! I am not using the command line, but using TexnicCenter instead.


A snippet of my reference.tex class (sorted alphabetically).


\bibitem{alexander87} Alexander, R. D., The Biology of Moral Systems, New York: Aldine de Gruyter (1987)
\bibitem{axelrod80a} Axelrod, R.: Effective choice in the iterated prisoner's dilemma, J. Confl. Resolut., vol. 24, pp. 3-25 (1980)
\bibitem{axelrod80b} Axelrod, R.: More effective choice in the prisoner's dilemma, J. Confl. Resolut., vol. 24, pp. 379-403 (1980)

What I want

..... no such cause [1].

what I get

..... no such cause [13].



\usepackage{mathptmx}         % selects Times Roman as basic font
\usepackage{helvet}           % selects Helvetica as sans-serif font
\usepackage{courier}          % selects Courier as typewriter font
\usepackage{type1cm}          % activate if the above 3 fonts are not available on your system
\usepackage{makeidx}          % allows index generation
\usepackage{graphicx}         % standard LaTeX graphics tool when including figure files
\usepackage{multicol}         % used for the two-column index
\usepackage[bottom]{footmisc} % places footnotes at page bottom
\usepackage{float}            % places the float image at precisely the location in the LaTeX code
\usepackage{verbatim}         % for multiline comments

\setcounter{secnumdepth}{5}   % for subsubsub sections (if any)

\title*{Some random title.}




blah blah.........

share|improve this question
Generating a sorted bibliography involves further steps. Do you use biblatex? – uli Dec 5 '11 at 19:55
Please add a minimal working example (MWE) that illustrates your problem. It's not clear here whether you are writing your bibliography by hand or using BibTeX, for example. – Joseph Wright Dec 5 '11 at 19:55
@Joseph thanks, i have edited my answer accordingly... – OckhamsRazor Dec 5 '11 at 19:59
@OckhamsRazor No, that's not a MWE. We want something that starts \documentclass and ends \end{document}, and which is compilable. – Joseph Wright Dec 5 '11 at 20:01
@OckhamsRazor: We don't need more stuff, but all (and only) the relevant stuff. To keep it short: You \input a references file. Is this file called references.tex and, more important, does it contain a handmade thebibliography environment? – lockstep Dec 5 '11 at 20:20
up vote 6 down vote accepted

There are two strategies to get references sorted in citation order.

1. Manual You add the bibliography items in a file which starts as


and ends with


You have to add the items exactly in the order you want, in the \bibitem{...}... form you showed in your question. Then you say, where the bibliography should appear,


Alternatively, you can include the whole thebibliography environment in the document. The number represents the maximum number of digits, so 99 is good for 10 to 99 items.

2. Automatic You prepare a references.bib file where you define your bibliography items in the following form

  author={Alexander, R. D.},
  title{The Biology of Moral Systems},
  publisher={Aldine de Gruyter},
  address={New York},
  author={Axelrod, R.},
  title={Effective choice in the iterated prisoner's dilemma},
  journal={J. Confl. Resolut.},

You prepare your manuscript and, where the bibliography should appear, you write


A run of the external program BibTeX will read the references.bib file and extract the relevant information, producing a file with extension .bbl that LaTeX will later input. After running BibTeX a couple of runs of LaTeX are necessary.

How you run BibTeX depends on the TeX environment you use (editor, distribution, operating system).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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