Issue: Table of Contents does not list chapters declared after a specific line unless I delete three images.

I have a paper which features six chapters. The last two are not listed in the table of contents, unless I delete the declaration of three images, in which case they are included. I use exactly the same code to produce some images higher up in the paper without issue. TexPad recognizes the chapters declared later. How might I fix or work around this issue? Thanks!

\tableofcontents % Prints the main table of contents

\chapter{this will be displayed in the TOC}

  \caption{Log-returns of DAX index}
  \caption{DAX log returns squared}

  \caption{Residuals of ARCH model fitted to DAX log returns}

\chapter{this will NOT be displayed in the TOC}


11pt, % The default document font size, options: 10pt, 11pt, 12pt
oneside, % Two side (alternating margins) for binding by default, uncomment to switch to one side
%chapterinoneline,% Have the chapter title next to the number in one single line
english, % ngerman for German
singlespacing, % Single line spacing, alternatives: onehalfspacing or doublespacing
%draft, % Uncomment to enable draft mode (no pictures, no links, overfull hboxes indicated)
%nolistspacing, % If the document is onehalfspacing or doublespacing, uncomment this to set spacing in lists to single
%liststotoc, % Uncomment to add the list of figures/tables/etc to the table of contents
%toctotoc, % Uncomment to add the main table of contents to the table of contents
parskip, % Uncomment to add space between paragraphs
%nohyperref, % Uncomment to not load the hyperref package
headsepline, % Uncomment to get a line under the header
]{MastersDoctoralThesis} % The class file specifying the document structure

\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters

\usepackage{palatino} % Use the Palatino font by default

\usepackage[backend=bibtex,style=authoryear,natbib=true]{biblatex} % Use the bibtex backend with the authoryear citation style (which resembles APA)

\addbibresource{hng1} % The filename of the bibliography
\usepackage[autostyle=true]{csquotes} % Required to generate language-dependent quotes in the bibliography

\usepackage{float} %placement

    paper=letterpaper, % Change to letterpaper for US letter a4paper
    inner=2.5cm, % Inner margin
    outer=3.8cm, % Outer margin
    bindingoffset=2cm, % Binding offset
    top=1.5cm, % Top margin
    bottom=1.5cm, % Bottom margin
    %showframe,% show how the type block is set on the page



\tableofcontents % Prints the main table of contents

\listoffigures % Prints the list of figures

\listoftables % Prints the list of tables
  • 1
    Please post a minimal example of code we can copy-paste and compile to reproduce the problem. Screenshots are really not useful here. – cfr May 21 '17 at 23:40
  • 1
    But you still haven't shown us \decoRule or the \documentclass. – Teepeemm May 22 '17 at 0:31
  • Apologies! Added the documentclass, please let me know if there is anything else I should provide. Thanks for your help! – SW7 May 22 '17 at 0:37
  • 2
    In addition, we need something we can compile. You've just given us fragments, so we can't reproduce the problem you are having. Off-topic: you are loading hyperref too early. It needs to be loaded late. Last or almost last. – cfr May 22 '17 at 2:02
  • 1
    Nothing you've shown us explains why some entries don't show up in the ToC. – cfr May 22 '17 at 2:04

The filenames of your figures contain underscores (_). Underscores and a couple of other signs ($, \, & and some more) are reserved in LaTeX.

So there will be an error message as soon as the compiler hits the filename Figures/ts_analysis_logrets_squared.png.

But for your case just load the package »grffile« and at least this error will be gone. There are other remedies as well, e.g. see https://tex.stackexchange.com/a/65387/4736 .

And if I'm wrong and that did not cause your issue, well, add an MWE that shows the error!

| improve this answer | |

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.