Wrong order of reference number in latex

19,892

If you want your bibliography sorted exactly as in your bibliography file independently of the order you cite them or any other predefined order, then I think you shouldn't bring BibTeX to the table. In that case you should build the bibliography manually using the thebibliography environment and \bibitem commands.

Using BibTeX, the bibliography file works as a database. Only those references included with commands \cite and \nocite will be in the reference list of your document, i.e. including more references in the bibliography file will not automatically add them to the bibliography of your document.

The order of your references inside the bibliography file doesn't really matter. The order they will come up depends on the bibliography style you choose (see slhck's comment to your question). Keep in mind that after switching styles it might be necessary to delete you .aux file in order for the changes to apply. Then compile the file until no "references might have changed" warnings appear then use bibtex and finally another run of latex/pdflatex should do it.

Point 8 in this page describes a way of overriding the default order of the style you choose.

Share:
19,892
Blake
Author by

Blake

Updated on June 30, 2022

Comments

  • Blake
    Blake almost 2 years

    I have 3 references in my report, below is my bibtex file. The problem is when I do \cite{article1} in my first citation, it showed [2]. And the second \cite{article2} showed [3] and the last showed [1].

    @article{
    article1,
    Author = {Jie, Ding and Ning, Li.},
    Title = {A Distributed Adaptation Management Framework in Content Delivery Networks},
    Journal = {Wireless Communications, Networking and Mobile Computing (WiCOM)},
    Pages = {23-25},
    Year = {2011} }
    
    @article{
    article2,
    Author = {Molina, B. and Ruiz, V. and Alonso, I. and Palau, C.E. and Guerri, J.C. and Esteve, M.},
    Title = {A closer look at a content delivery network implementation},
    Journal = {Electrotechnical Conference},
    Pages = {685-688},
    Year = {2004} }
    
    @article{
    article3,
    Author = {Chen, Y. and Katz, R.H. and Kubiatowicz, J.D.},
    Title = {Dynamic Replica Placement for Scalable Content Delivery},
    Journal = {Intel workshop on Peer-to-Peer Systems},
    Pages = {306-318},
    Year = {2002} }