1

I want to have chapters in my book that have no number. This means it doesn't show up on the TOC and it also becomes a prefix before a section. It would look like this:

enter image description here

EDIT: the it refers to the number. So I want no chapter number but I do want the chapter title to show up on the TOC. The image is of the TOC.

  • 1
    So you're okay with it not showing in the ToC, or you want them added to the ToC as well? – Werner Apr 3 '18 at 17:32
3

Use \chapter* (which won't be put into the ToC) instead of \chapter and change the \section numbering to not include a number based on \chapter .

\documentclass{book}
\makeatletter
  \renewcommand*{\thesection}{\@arabic\c@section}
\makeatother
\begin{document}
\tableofcontents
\chapter*{Vay}
  \section{one}
  \subsection{subsection}
  \section{two}
\chapter*{Woohoo}
  \section{three}
  \subsection{subsection}
\end{document}

EDIT:

The above solved what I thought was the OP's problem but then the OP clarified the question.

\documentclass{book}
\usepackage{chngcntr}
\renewcommand{\thechapter}{} % from @JLeonV answer
\counterwithout{section}{chapter} % don't reset section numbers by chapter
\begin{document}
\tableofcontents
\chapter{Vay}
  \section{one}
  \subsection{subsection}
  \section{two}
\chapter{Woohoo}
  \section{three}
  \subsection{subsection}
\end{document}

The above will produce unnumbered \chapter's in the ToC and body of the document with \section and below numbered continuously.

  • I was unclear in my first version, so I edited it. Could you pease look again? – Fientje Vermeulen Apr 4 '18 at 1:18
  • @FientjeVermeulen I have edited my answer following your clarified question. If you have any more clarifications please ask them in a new question. – Peter Wilson Apr 5 '18 at 19:12
1

A quick way to do this is to redefine the format of the chapter counter is displayed, with the next code.

\renewcommand{\thechapter}{} 
  • I was unclear the first time. I edited my question – Fientje Vermeulen Apr 3 '18 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.