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:



\title{This is the title}

\tableofcontents{} %oops :-)



And this is one of the leaf(?) documents (i.e. 0_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.

  • Welcome to TeX.sx! Normally all \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
  • ok, will do. Thanks for the quick reaction ;-) – are Sep 22 '11 at 10:59

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.

| 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.