Graphics, Figures & TablesList of Figures not appearing when placed after table of contents

Information and discussion about graphics, figures & tables in LaTeX documents.
Locked
Boeri4451
Posts: 5
Joined: Tue Apr 14, 2020 11:35 pm

List of Figures not appearing when placed after table of contents

Post by Boeri4451 »

Hi everyone,

I have a problem with the list of figures and tables.
These won't show any results when I put them in my code after the table of contents.
Nevertheless, when these are placed before the TOC, everything works fine.

Does anyone have a solution?

Here is an example of my code with all used packages

Code: Select all

\documentclass[11pt,a4paper,oneside,notitlepage]{book}
\usepackage[english]{babel}
\usepackage{gensymb}
\usepackage{amsmath}
\usepackage{tabto}
\newenvironment{Arial}{\fontfamily{phv}\selectfont}{\par}
\usepackage{xr}
\usepackage{titlesec}

\makeatletter
\newcommand*{\addFileDependency}[1]{% argument=file name and extension
  \typeout{(#1)}
  \@addtofilelist{#1}
  \IfFileExists{#1}{}{\typeout{No file #1.}}
}
\makeatother

\newcommand*{\myexternaldocument}[1]{%
    \externaldocument{#1}%
    \addFileDependency{#1.tex}%
    \addFileDependency{#1.aux}%
}


\usepackage{subfiles}

\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{graphicx,caption}
\usepackage[colorlinks]{hyperref}
\hypersetup{citecolor = black}
\graphicspath{{Images/}}
\usepackage{gensymb}
\usepackage{subcaption}


\usepackage[
backend=biber,
style=apa,
citestyle=authoryear
]{biblatex}

%for the references at the end
\usepackage{csquotes}
\addbibresource{referenties.bib}

\usepackage[toc,page]{appendix}




\titlespacing{\section}{0pt}{2.5em}{2em}
\titlespacing{\subsection}{0pt}{2em}{1.5em}

\begin{document}




\pagestyle{empty}

\subfile{begin/overzicht}

\frontmatter

\tableofcontents

\newpage

  \addcontentsline{toc}{chapter}{\listfigurename}
  \listoffigures 
\addcontentsline{toc}{chapter}{\listtablename}
  \listoftables
\newpage


\pagestyle{plain}
\mainmatter
\subfile{sections/chapter1}

\subfile{sections/chapter2}

\subfile{sections/chapter3}

\subfile{sections/chapter4}

\subfile{sections/chapter5}

\subfile{sections/chapter6}

\subfile{sections/Appendix}

\printbibliography
\backmatter[/MWE]

\null\newpage

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

List of Figures not appearing when placed after table of contents

Post by cgnieder »

You posted the exact same question here: https://latex.org/forum/viewtopic.php?f=44&t=33426 so I will lock this thread in order to avoid double answer.
site moderator & package author
Locked