By default (using th plain
style) BibTeX orders citations alphabetically. How do I order the citations by order of appearance in the document?
views:
8187answers:
5
A:
The best I came up with is using the usrt
style, which seems to be a tweaked plain
style. i.e.
\bibliographystyle{unsrt}
\bibliography{bibliography}
However what if my style is not the default?
Brendan
2008-09-27 22:36:37
If you're using a custom BibTeX style, can you edit it to remove the SORT command?
ChrisN
2008-09-27 23:24:48
+3
A:
You answered your own question---unsrt
is to be used when you want references to ne listed in the order of appeareance.
But you might also want to have a look at natbib, an extremely flexible citation package. I can not imagine living without it.
lindelof
2008-09-27 22:53:17
natbib only affects the typesetting of the \cite commands in the document itself. Having said that, it is distributed with unsrtnat.bst to achieve the effect sought by the original poster. (I'd recommend biblatex these days over natbib, unless absolute stability is most important.)
Will Robertson
2008-09-28 05:19:02
+8
A:
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 not yet included in TeX Live or MiKTeX, but I've been using it for, oh, a year or two, and it's highly useable even before its official v1.0 release. 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}
- To install, copy the contents of the
biblatex
package to the folders specified in theREADME
and update the hash tables on teTeX or fpTeX by runningtexhash
as root and on MikTeX by runninginitexmf -u
.
Will Robertson
2008-09-28 04:21:43
One apparent advantage of the biblatex package that caused me to accept this answer is that it allows editing up reference styles using TeX macros rather than weird BibTeX voodoo. Other packages may be better for a quicker/more reliable solution.
Brendan
2008-10-07 09:17:46
+1
A:
Change
\bibliographystyle{plain}
to
\bibliographystyle{ieeetr}
Then rebuild it a few times to replace the .aux
and .bbl
files that were made when you used the plain style.
If you use MiKTeX you shouldn't need to download anything extra.
John1923
2009-10-03 16:22:50