How to order citations by appearance using BibTeX?

前端 未结 12 635
小蘑菇
小蘑菇 2020-12-12 08:31

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

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

相关标签:
12条回答
  • 2020-12-12 09:14

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

    0 讨论(0)
  • 2020-12-12 09:16

    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.

    0 讨论(0)
  • 2020-12-12 09:18

    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}
    
    0 讨论(0)
  • 2020-12-12 09:19

    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?

    0 讨论(0)
  • 2020-12-12 09:19

    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.

    0 讨论(0)
  • 2020-12-12 09:20

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

    0 讨论(0)
提交回复
热议问题