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.

3
  • 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 '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} Apr 20 '17 at 10:16
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.

1
  • 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

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.