How to order citations by appearance using BibTeX?

Brendan picture Brendan · Sep 28, 2008 · Viewed 361.3k times · Source

By default (using the plain style) BibTeX orders citations alphabetically.

How to order the citations by order of appearance in the document?

Answer

Will Robertson picture Will Robertson · Sep 28, 2008

There are three good answers to this question.

  • Use the unsrt bibliography style, if you're happy with its formatting otherwise
  • Use the makebst (link) tool to design your own bibliography style

And my personal recommendation:

  • Use the biblatex package (link). It's the most complete and flexible bibliography tool in the LaTeX world.

Using biblatex, you'd write something like

\documentclass[12pt]{article}
\usepackage[sorting=none]{biblatex}
\bibliography{journals,phd-references} % Where journals.bib and phd-references.bib are BibTeX databases
\begin{document}
\cite{robertson2007}
\cite{earnshaw1842}
\printbibliography
\end{document}