[texhax] Adding "\section*" entries to TOC

William F Hammond hmwlfsr at yahoo.com
Sat Jun 1 22:10:59 CEST 2013


Jerry <jerry at seibercom.net> writes:

> I have a document that contains over 50 sections using the
> "\section*{FOO}" style. I want these listed in the TOC; however, I am
> unable to figure out how to do it automatically. The sections do not
> have numbers in the main document, and I do not want them listed with
> pseudo numbers in the TOC. Other than entering each one individually via
> "\addcontentsline{}{}{}", which would be extremely slow, is there way to
> accomplish this?

Put "\setcounter{secnumdepth}{0}" in the preamble.

Instead of \section*{} use \section{}.


                              -- Bill



More information about the texhax mailing list