I am trying to compile a table of contents with \tableofcontents{} from multiple files I have included (with \include, i.e. chapters).
What do I need to do to get the chapters included in the table of contents?
It would appear that the sections from the files do not register themselves into the *.toc file. However, I have no idea why.
This is the root document I have:
\documentclass[english,aps]{revtex4}
\usepackage[T1]{fontenc}
\begin{document}
\title{This is the title}
\maketitle
\tableofcontents{} %oops :-)
\input{includes/chapters/0_preliminaries}
\include{includes/chapters/x_appendix}
\end{document}
And this is one of the leaf(?) documents (i.e. 0_preliminaries):
\section{Preliminaries}
Text goes here
So, The problem is that with the \input{*} the file is included in the *.toc, while with the \include{*} it is not.
\chapters and other sectioning commands should appear in the ToC (up to the selected level). Please add a minimal working example (MWE) that illustrates your problem. You might do something wrong. – Martin Scharrer Sep 22 '11 at 10:49