Hi, I have a document class report doc I am working on where all the headers use the starred version. I would still like to generate a table of contents which the corresponding page numbers, but the TOC ignores by default all headers with stars, and I don't really want to go through and add each one by hand at the end now.
Is there a way to automatically force the TOC to include starred headers?
General ⇒ Including starred sections in a TOC
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 55
- Joined: Thu Oct 30, 2008 4:12 pm
Including starred sections in a TOC
Try this:
Is this what you want?
Code: Select all
\addcontentsline{toc}{section}{Section heading}
\section*{Section heading}
Re: Including starred sections in a TOC
Right, but the idea was not to have to go through the entire report and hand code that for every single chapter and section. I ended up doing it this time, but I was hoping there was a global method to do it automatically which would be nice to have.
-
- Posts: 55
- Joined: Thu Oct 30, 2008 4:12 pm
Re: Including starred sections in a TOC
Oh, I see. I can't think of any way of doing that that doesn't involve writing a macro each for chapters and sections (and subsections and...) that takes an argument that is the heading. Sorry not to be more helpful
but I wish you luck on your quest!
