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.
Asked
Active
Viewed 824 times
1
1 Answers
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
\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\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