Go to the first, previous, next, last question, table of contents.

Unnumbered sections in the Table of Contents

The easiest way to get headings of funny `sections' such as prefaces in the table of contents is to use the counter secnumdepth described in Appendix C of the LaTeX manual. For example:

    \setcounter{secnumdepth}{-1}
    \chapter{Preface}

Of course, you have to set secnumdepth back to its usual value (which is 2 in the standard styles) before you do any `section' which you want to be numbered.

Similar settings are made automatically in the LaTeX book class by the \frontmatter and \backmatter commands.

This is why it works. \chapter without the star does

  1. put something in the .toc file;
  2. if the secnumdepth counter is greater than or equal to zero, increase the counter for the chapter and write it out.
  3. write the chapter title.
Other sectioning commands are similar, but with other values used in the test.
Go to the first, previous, next, last question, table of contents.