GeneralUnnumbered section headings in the table of contents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Sondre
Posts: 3
Joined: Mon May 07, 2007 1:17 pm

Unnumbered section headings in the table of contents

Post by Sondre »

I'm using the article class and can't figure out how to include the "Preface" in the table of contents. I use the command

\section*{Preface}

because I don't want the heading to be numbered, but then it is excluded in the table of contents. Does anybody know how to still make it appear, without numbering?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: Unnumbered section headings in the table of contents

Post by balfonsi »

Try the titlesec package, which is devoted to customizing sections, subsections,and the like. See the advanced settings in the doc: it is possible to define variants of sections with a 'numberless' key,which might do the trick.

B.A.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Unnumbered section headings in the table of contents

Post by localghost »

As an alternative, you can just add your unnumbered section to the TOC.

Code: Select all

\section*{Preface}
  \addcontentsline{toc}{section}{Preface}
Post Reply