By default (using the plain
style) BibTeX orders citations alphabetically.
How to order the citations by order of appearance in the document?
There are three good answers to this question.
unsrt
bibliography style, if you're happy with its formatting otherwisemakebst
(link) tool to design your own bibliography styleAnd my personal recommendation:
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}