How to order citations by appearance using BibTeX?

2019-03-07 10:32发布

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

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

标签: latex bibtex
11条回答
你好瞎i
2楼-- · 2019-03-07 10:41

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.

Or simply delete the .aux and .bbl files and rebuild.

If you use MiKTeX you shouldn't need to download anything extra.

查看更多
不美不萌又怎样
3楼-- · 2019-03-07 10:43

The best I came up with is using the unsrt style, which seems to be a tweaked plain style. i.e.

\bibliographystyle{unsrt}
\bibliography{bibliography}

However what if my style is not the default?

查看更多
\"骚年 ilove
4楼-- · 2019-03-07 10:49

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}
查看更多
可以哭但决不认输i
5楼-- · 2019-03-07 10:49

I often use the bibliography style natbib because it supplies quite complete set of formats as well as tags for us.

查看更多
欢心
6楼-- · 2019-03-07 10:51

I use natbib in combination with bibliographystyle{apa}. Eg:

\begin{document}

The body of the document goes here...

\newpage

\bibliography{bibliography} % Or whatever you decided to call your .bib file 

\usepackage[round, comma, sort&compress ]{natbib} 

bibliographystyle{apa}
\end{document}
查看更多
男人必须洒脱
7楼-- · 2019-03-07 10:52

with unsrt the problem is the format. use \bibliographystyle{ieeetr} to get refences in order of citation in document.

查看更多
登录 后发表回答