# Numbers in Section Headers using book class

I am using the book class for a document, but I would like to add the section numbering to every section heading, similar to how report works.

For example, the document defined by

\documentclass[12pt,letterpaper]{book}

\begin{document}
\chapter{A Chapter}
\section{A Section}
\subsection{A Subsection}
\end{document}


Appears as

Chapter 1

A Chapter

A Section

A Subsection

I would like it to appear as

Chapter 1

A Chapter

1.1 A Section

1.1.1 A Subsection

• Welcome to TeX.SE. Your request is actually the default setting for book, at least for section levelling down to \subsection. Running your example I see the section etc. numbered as 1.1, 1.1.1 ... etc. You're using something that prevents this. However, \setcounter{secnumdepth}{5} in the preamble should work, meaning that even \subparagraph will be numbered then – user31729 Feb 20 '18 at 18:25
• titlesec, .... sigh ........ – user31729 Feb 20 '18 at 19:10
• I don't recall why I had titlesec (removing it did nothing). Is there a particular reason that I should avoid it in the future? – Davidallen353 Feb 20 '18 at 19:21
I had accidentally included a package (titlesec) that caused the behavior that I did not want. Thank you Christian Hupfer for pointing this out.