I am writing my thesis in LaTex but I have some problems with the bibliography. As always, I use the unsrt bibliography style to get the citations in order of appearance. However, this time it doesn't work so as a first citation I have the number 2 instead of the number 1.

That's the code I use:


The bibliography is in a .bib file. I also would like to add all the references I do not cite explicitly in the text. So I usually add \nocite command. It works but in the text I get [?] instead of citations.

This usually works in the past articles I wrote, I don't know why now it doesn't. Do you have any suggestions?

(I am using Overleaf)


  • 1
    You presumably have an error in code you have not shown. You need to show something if you want anyone to say what is wrong with it. Aug 14, 2020 at 8:39
  • 2
    usual reason for getting unexpected order is that you have a citation in a caption and so the first appearing citation is in the list of figures Aug 14, 2020 at 8:41
  • Ah yes that's why! I completely forgot about the list of figures. It makes sense now. Thanks!
    – Chiara
    Aug 14, 2020 at 9:03
  • I suppose that it has to be taken like this, isn't it?
    – Chiara
    Aug 14, 2020 at 9:04
  • 2
    you can use \caption[shorter caption with no cite]{long caption with cite} so there is no cite in the list of figures Aug 14, 2020 at 9:08

1 Answer 1


Tell natbib you want things numbered and sorted in the package options using \usepackage[sort,numbers]{natbib}, then tell it that's also how you want the references to be formatted \bibliographystyle{unsrtnat} (ending in nat "suitable" for natbib). Then to toggle on/off the references use \nocite{*} and you will get something that looks like:


\citet{alice} said something to \citet{bob}.
\nocite{*} % Toggle for unused references. 


enter image description here

where for the references.bib we have:

    title = {Something},
    year = {2020},
    author = {Alice}

    title = {Something else},
    year = {2020},
    author = {Bob}

    title = {Something completely different},
    year = {2020},
    author = {Charles}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.