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?
General ⇒ Unnumbered section headings in the table of contents
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Unnumbered section headings in the table of contents
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.
B.A.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Unnumbered section headings in the table of contents
As an alternative, you can just add your unnumbered section to the TOC.
Code: Select all
\section*{Preface}
\addcontentsline{toc}{section}{Preface}
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10