# ToC scrambles the order and page number

I have LoF and LoT before my ToC. For some reason ToC present Chapter 1 before LoF, even though in the report it is the opposite. And the page number is wrong, the LoT in on iii, just after ToC.

\documentclass[10 pt, a4paper, leqno, oneside] {report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lscape}
\usepackage{caption}
\usepackage{subfig}
\usepackage[section]{placeins}
\usepackage{listings}
\usepackage{url}
\usepackage{longtable}
\usepackage{multirow}
%\usepackage{geometry}
\usepackage{graphicx}
%\usepackage[export]{adjustbox}
\usepackage[table]{xcolor}
\usepackage[swedish, english]{babel}
\usepackage[tmargin=1cm]{geometry}
%\usepackage{blindtext}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The title page %%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{titlepage}
\cleardoublepage \pagenumbering {roman}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The Abstract Page %%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TOC %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% List of Tables %%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include{ListofTables}
\addcontentsline{toc}{chapter}{List of Tables}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% List of Figures %%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include{ListofFigures}
\addcontentsline{toc}{chapter}{List of Figures}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chapters %%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{page}{1}
\cleardoublepage \pagenumbering{arabic}
\include{chapter1}  %Background
\include{chapter2}  %Theory
\include{chapter3}  %Results
\include{chapter4}  %Analysis and conclusions
\include{chapter5}  %Discussions

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bibliographystyle{unsrtnat} %{amsplain}
\bibliography{Bibliography}
\addcontentsline{toc}{chapter}{Bibliography}
\include{Bibliography}  %Bibliography

\end{document}


## 1 Answer

I'm not sure about using \include in general; just in order to do \listoffigures it's certainly too much.

However, you solve all of your issues at once by removing those \addcontentsline commands (except the one for the abstract) and adding

\usepackage[nottoc]{tocbibind}


What's the problem with your approach? That if the list of figures occupies two pages, \addcontentsline will refer to the second page. Also the \include after the list of figures has a part in the issue. With tocbibind, that makes LaTeX perform the \addcontentsline commands (automatically) at the right time, the problem is solved.

• Is that a duplicate of Abstract, Toc, lof, lot ordering#? – Johannes_B Nov 13 '15 at 18:40
• tocbibind is new, I will use that. I suppose that the list will automatically update as I add figures and tables to the report? – Orongo Nov 13 '15 at 20:22
• Unfortunately with tocbibind, I still have page numbering issue for LoF. I t is technically on iv, but the numbering restart so it has i instead. – Orongo Nov 13 '15 at 20:24
• @Orongo Not in my test. – egreg Nov 13 '15 at 20:45
• Strange... I've changed my code accordingly – Orongo Nov 13 '15 at 21:34