citations inside a caption of a figure don't follow the order of appearance in the document. I used this in the preamble
\usepackage[square,numbers]{natbib}
\bibliographystyle{unsrtnat}
and this when I included the figure
\begin{figure}[h]
\centering
\includegraphics[width=0.8\textwidth]
{images/Fluid_distrubution_and_wettability}
\caption{Wettability and fluid distribution at pore level
\protect\cite{Crain68:online}}.
\label{fig:wett.fluid.dist}
\end{figure}
But then I get for example Figure 2.2, caption here [1] even though I have already many citations before the figure. But if I put this code in other areas of the document, citations are exactly according to the order they appeared in the document.
\usepackage{notoccite}% PREVENTS CITES IN CAPTIONS FROM MISNUMBERING YOUR REFERENCESThe problem arises because the caption citation shows up in the list of figures/tables, which, unless intercepted, gets incorporated into the citation order. Thenotoccitepackage does the interception for you. – Steven B. Segletes Apr 05 '16 at 10:43