1

I am having a wee problem - I'm getting a numbered (with arabic 1) page after list of Tables before Chapter Introduction. No matter if I use oneside or openany book class. What's happening here?

\documentclass[a4paper,11pt,oneside]{book}

\usepackage{amsbsy}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{mathrsfs}
\usepackage{color}
\usepackage[hidelinks]{hyperref}
\usepackage{cite}
\usepackage[numbers,sort&compress]{natbib}
\usepackage{enumitem}
\usepackage{epsfig}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{indentfirst}
\usepackage[strict]{changepage}
%\usepackage{matlab-prettifier}
\usepackage{listings}
\usepackage{color} %red, green, blue, yellow, cyan, magenta, black, white
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
% Page Margins - Strath Requirement
\usepackage[left=4cm,right=2.5cm,top=2cm,bottom=4cm,includehead,includefoot,headheight=15pt]{geometry}
\newcommand{\specialcell}[2][c]{%
    \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
% Page Headers
\usepackage{fancyhdr}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt} % optional
%\fancyhead[L]{\nouppercase{\leftmark} \hfill Section \nouppercase{\rightmark}}
\fancyhead[L]{\nouppercase{\leftmark}}
\cfoot{\thepage}
\pagestyle{fancy}

% Draft Watermark
%\usepackage[draft=true,allpages=true,fontfamily=cmr,angle=90,scale=0.1,mark={\fboxsep=35pt\fboxrule=0pt\relax\fbox{-- DRAFT -- \today~--}},xcoord=-80,ycoord=-20]{draftmark}


% Line Spacing
%\def\baselinestretch{1.5} 
\usepackage{setspace}
\setstretch{1.5}
\setcounter{tocdepth}{3}

% Place uni Logo on Title Page (this package modifies the "\maketitel" command.)
\usepackage{titling}
\pretitle{%
    \begin{flushright}
        \vspace{-9.5cm}
        %\includegraphics[width=5cm,natwidth=472,natheight=531]{logo} \\[7cm]
        \includegraphics[width=5cm]{logo} \\[6cm]
    \end{flushright}
    \begin{center}
        \LARGE
    }
    \posttitle{\end{center}}

\title{Title \\ PhD Thesis}
\author{Name
    \\ \small Institute of Photonics\\[-0.8ex]
    \small Physics\\[-0.8ex]
    \small Uni\\
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

    \maketitle


    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \frontmatter
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


    \chapter{Abstract}
    \input{abstract.tex}

    \chapter{Preface/Acknowledgements}
    I would like to acknowledge... 

    \tableofcontents

    \addcontentsline{toc}{chapter}{List of Figures}
    \listoffigures

    \addcontentsline{toc}{chapter}{List of Tables}
    \listoftables

\mainmatter
\chapter{Introduction}
\input{1_Introduction.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{ieeetr}
\bibliography{MyBibFile}

\end{document}
3
  • You may also find the ToC references (to page numbers) for LoF and LoT are wrong. You need a \clearpage before each \addcontentsline.
    – Werner
    Oct 10, 2019 at 16:30
  • I didn't check all of them - but I think the pages match the ones in ToC, LoF and LoT - at least some of them \clearpage did not work :(
    – Luk
    Oct 11, 2019 at 17:38
  • You're loading hyperref much too early. Load it last unless something definitely needs to be loaded later (e.g. cleveref has to be later).
    – cfr
    Oct 11, 2019 at 20:41

2 Answers 2

1

I ran the code you posted in your question; it did not reproduce the problem. Please post a minimum working example that reproduces the problem.

2
  • You did it with the empty Chapter file ? So confused right now
    – Luk
    Oct 15, 2019 at 15:48
  • I made a dummy file. Again, to help you we need you to make and post a minimum working example that demonstrates the problem.
    – Una
    Oct 16, 2019 at 16:13
0

I suspect what is happening is you include lists of tables and figures after the TOC but don't yet have tables or figures. That was my case.

This (non) problem should fix itself. The same is true for wrong page numbers and other format issues due to the content not being there yet. Focus on content first.

That said, if your committee wants format correct from the start, like mine did, then use \clearpage or \newpage. Here is a snippet of my completed dissertation:

\frontmatter
\newpage                                      % hyperref
\pdfbookmark[0]{Table of contents}{toc}       % hyperref
\tableofcontents
\newpage                                      % hyperref
\pdfbookmark[0]{List of figures}{lof}         % hyperref
\listoffigures
\newpage                                      % hyperref
\pdfbookmark[0]{List of tables}{lot}          % hyperref
\listoftables

\include{ap.acks}
\include{ap.glos}

\mainmatter       % TOC entry command is in ch.intr
\pagestyle{headings}
\include{ch.intr} % introduction
7
  • How do you know? 1_Introduction.tex probably includes figures and tables. I'm confident this does not answer the question.
    – Werner
    Oct 10, 2019 at 18:27
  • Experience. But your immediate solution may well be what is needed. I revised my answer.
    – Una
    Oct 10, 2019 at 19:58
  • Note that there is a difference between using \include and \input. The former does insert a page break, while the latter inserts the file content in-place. The OP uses the latter, so it's all dependent on what is in 1_Introduction.tex.
    – Werner
    Oct 10, 2019 at 19:59
  • That's right, and also a tangent, because Luk's problem is between the TOC and the first \chapter. No \input or \include there. (I use \include because \chapter{} is in my included file. In Luk's case \input{} is needed after \chapter{} to keep the chapter heading and initial paragraphs together on one page.)
    – Una
    Oct 10, 2019 at 20:09
  • 1
    @Luk: Here's the thing. We cannot determine what the problem is with the current code. So you'll have to be more forthcoming with details.
    – Werner
    Oct 11, 2019 at 17:40

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.