I would like to show the sections of some chapters in the front matter part of the book class document in the table of contents. Problem is all the chapters in the front matter are numbered 0 and so their sections get the numbering like 0.1, 0.2. I want to suppress the numbers but show the section titles in the ToC. How can I achieve that?


% Front Matter
How to use the book
    Book organization

% Main Matter
Chapter 1 Test Chapter 1
    1.1 Test section 1
    1.2 Test section 2
Chapter 2 Test Chapter 2
    2.1 Test section 1
    2.2 Test section 2
  • Use the starred forms, \section*{...}
    – vonbrand
    Jun 6, 2021 at 21:49
  • This will cause the sections to not appear on ToC
    – SolidMark
    Jun 7, 2021 at 5:19
  • Would you please provide an MWE? Maybe something like \renewcommand\thesection{{}{}}% after \frontmatter works, but I do not want to try this in the only book class document I have.
    – C. Peters
    Jun 7, 2021 at 6:58

1 Answer 1


You could use \setcounter{secnumdepth}{0} to get unnumbered sections in front matter and \setcounter{secnumdepth}{2} to get numbered parts, chapters, sections und subsections in main matter:

\usepackage{blindtext}% only for dummy text

\xappto{\frontmatter}{\setcounter{secnumdepth}{0}}{}{}% unnumbered sections, subsections, subsubsections etc.
\xappto{\mainmatter}{\setcounter{secnumdepth}{2}}{}{}% numbered parts, chapters, sections, subsections

\chapter{How to use the book}
\section{Book organization}

enter image description here

  • Worked like a charm. How about chapters in front matter?
    – SolidMark
    Jun 7, 2021 at 11:36
  • Chapters in front matter are unnumbered by default, even if counter secnumdepth is 0 or bigger.
    – esdd
    Jun 7, 2021 at 11:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .