Is there a way to show the number of sections and subsections? The weird thing is that the numbers are shown in the Contents list but not shown within the chapters. Every time I search about this issue, I just find questions about hiding the number of sections.

  • Without knowing what you are doing (no mwe) let me assume, that \setcounter{secnumdepth}{3} may help you. See eg tex.stackexchange.com/questions/17877/….
    – Jürgen
    Apr 20, 2017 at 10:05
  • @Jürgen that didn't work. Just to mention, the document class that I have is book. Does this have anything to do with numbering?
    – Nasser
    Apr 20, 2017 at 10:11
  • Can you make a complete example? @Jürgen's suggestion works fine with \documentclass{book} \setcounter{secnumdepth}{3} \begin{document} \chapter{a} \section{b} \subsection{c} \subsubsection{d} \paragraph{e} \subparagraph{f} \end{document} Apr 20, 2017 at 10:16

1 Answer 1


The reason why the section and subsection numbers are not shown because I was using \usepackage{titlesec}. When I removed it, it worked fine.

  • If you only have a pure \usepackage{titlesec} in your document, that wouldn't change the numbering as described by you. The odds are that you also used options or additional macros from the titlesec-package, right?
    – Jürgen
    Apr 20, 2017 at 11:37

You must log in to answer this question.

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