GeneralGet Preface and Summary into ToC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
hvn
Posts: 13
Joined: Thu Feb 03, 2011 9:40 pm

Get Preface and Summary into ToC

Post by hvn »

Hi,

I'm writing a report with automated generation of ToC, but the preface and summary are not in the ToC Preface and summary are both started using \section*{}, the other sections using \section{}. What could be going wrong?

Thank you.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Get Preface and Summary into ToC

Post by Stefan Kottwitz »

Hi,

\section* does not produce entries for the table of contents. You could use \section, or produce the contents entries yourself, by \addcontentsline or \addtocontents, for example

Code: Select all

\cleardoublepage
\addcontentsline{toc}{section}{Preface}
\section*{Preface}
Stefan
LaTeX.org admin
hvn
Posts: 13
Joined: Thu Feb 03, 2011 9:40 pm

Re: Get Preface and Summary into ToC

Post by hvn »

Thank you. That works.
Post Reply