I am finishing my first latex setup for my thesis and I decided to test out the figures and tables and how to control them together with the referencing and bibliography. Everything was going fine; the first time I cited references and corss-referenced material the bibliography compiled in the order in which citations appear in the text (desired result), then I played around with the figures and suddenly my bibliography is compiling from the bottom up (figures/tables first).
I must be making a rookie mistake, but I reproduced the same effect in an MWE of my stripped down thesis setup below.
Please could someone explain why it is doing this all of a sudden? I am currently using sharelatex.com as my editor. Thank you.
\documentclass[
bibliography=totoc,
headings=big,
captions=tableheading,
chapterprefix=true% like in standard class "report"
]{scrreprt}
\usepackage[left=2cm,right=2cm,top=2.5cm,bottom=3cm]{geometry}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{minitoc}
\setcounter{secnumdepth}{3} % number subsubsections
\setcounter{tocdepth}{3} % list subsubsections
\begin{document}
\dominitoc
\tableofcontents
\listoffigures
\listoftables
\addtokomafont{chapterprefix}{\raggedleft}
\addtokomafont{section}{\huge}
\addtokomafont{subsection}{\Large}
\addtokomafont{subsubsection}{\large}
\renewcommand*{\chapterformat}{%
\mbox{\scalebox{1.5}{\chapappifchapterprefix{\nobreakspace}}%
\scalebox{4}{\color{gray}\thechapter\autodot}\enskip}}
\setcounter{chapter}{6}\setcounter{page}{199}
\newpage\setcounter{page}{212}
\chapter{Conclusions}
\dictum[Sun Tzu]{If you know the enemy and you know yourself %\\
you need not fear the results of a hundred battles.}
\minitoc
\section{Summary of Achievements}
Text goes here
\subsection{Papers Submitted}
Text
\subsubsection{I want to go into the TOC}
Testing stuff out \cite{Guittonneau201071}
\begin{table}[htbp]
\caption{This is an example table \cite{Li2012}}
\centering
\begin{tabular}{llll}
This & is & an & example.\\\hline
This & is & an & example.
\end{tabular}
\label{example.table}
\end{table}
So this continues with the Table~\ref{example.table}
\begin{figure}
\setcapindent{1em}
\fbox{\parbox{.95\linewidth}{\centering{\KOMAScript}}}
\caption{Example \cite{Fu2009789} with slightly indented caption
starting at the second line}
\end{figure}
\bibliographystyle{plain}
\bibliography{bibliography}
\end{document}
The bib references I used are the following:
@article{Song20084290
, author = {M.S. Song and B. Huang and M.X. Zhang and J.G. Li}
, title = {Formation and growth mechanism of ZrC hexagonal platelets synthesized by self-propagating reaction}
, journal = {Journal of Crystal Growth}
, year = {2008}
, volume = {310}
, number = {18}
, pages = {4290 - 4294}
, issn = {0022-0248}
, doi = {10.1016/j.jcrysgro.2008.07.016}
, url = {http://www.sciencedirect.com/science/article/pii/S0022024808005678}
, keywords = {B1. Zirconium carbide}
}
@article{Guittonneau201071
, author = {Fabrice Guittonneau and Abdesselam Abdelouas and Bernd Grambow}
, title = {HTR Fuel Waste Management: TRISO separation and acid-graphite intercalation compounds preparation}
, journal = {Journal of Nuclear Materials}
, year = {2010}
, volume = {407}
, number = {2}
, pages = {71 - 77}
, issn = {0022-3115}
, doi = {DOI: 10.1016/j.jnucmat.2010.09.026}
, url = {http://www.sciencedirect.com/science/article/pii/S0022311510005027}
}
@article{Fu2009789
, author = {Hongzhi Fu and Weimin Peng and Tao Gao}
, title = {Structural and elastic properties of ZrC under high pressure}
, journal = {Materials Chemistry and Physics}
, year = {2009}
, volume = {115}
, number = {2–3}
, pages = {789 - 794}
, issn = {0254-0584}
, doi = {10.1016/j.matchemphys.2009.02.031}
, url = {http://www.sciencedirect.com/science/article/pii/S0254058409001163}
, keywords = {<span style='font-style: italic'>Ab initio</span> calculations}
}
@article{Li2012
, author = {Qinggang Li and Haijun Zhou and Shaoming Dong and Zhen Wang and Ping He and Jinshan Yang and Bin Wu and Jianbao Hu}
, title = {Fabrication of a ZrC–SiC matrix for ceramic matrix composites and its properties}
, journal = {Ceramics International}
, year = {2012}
, number = {0}
, pages = { - }
, issn = {0272-8842}
, doi = {10.1016/j.ceramint.2012.01.023}
, url = {http://www.sciencedirect.com/science/article/pii/S0272884212000260}
, keywords = {ZrC precursor}
}

notoccitepackage, or the optional argument for the caption, see e.g. http://tex.stackexchange.com/questions/36304/ignore-citations-in-captions-in-list-of-figures-when-numbering/84333#84333 – Torbjørn T. Feb 11 '14 at 18:26