1

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.

Nasser
  • 153
  • Without knowing what you are doing (no mwe) let me assume, that \setcounter{secnumdepth}{3} may help you. See eg https://tex.stackexchange.com/questions/17877/how-to-show-subsections-and-subsubsections-in-toc/17879#17879. – Jürgen Apr 20 '17 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 '17 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} – Torbjørn T. Apr 20 '17 at 10:16

1 Answers1

2

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

Nasser
  • 153
  • 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 '17 at 11:37