[Tex/LaTex] \tableofcontents and multiple files from \include

includerevtextable of contents

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.

Best Answer

The documentclass revtex4 doesn't provide the using of \include.

You can open the aux-file of x_appendix and you will find the command \@setckpt which is defined as \def\@setckpt#1#2{}.

You should change the document class.