Document Classes ⇒ memoir | Table of Contents and Depth
memoir | Table of Contents and Depth
I write a report in documentclass{memoir}, but have a problem with \tableofcontents.
I look for a easy way to get \settocdepth{subsection}, but the problem is that there don't come numbers in the begin for \subsection. That's to say:
1 Section
1.1 subsection
subsubsection
subsubsection
But I want to
1 Section
1.1 subsection
1.1.1 subsubsection
1.1.2 subsubsection
Thanks for you time
./tym
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
memoir | Table of Contents and Depth
You also have to set the depth for section numbering accordingly to get the subsections listed numbered in the ToC.
Code: Select all
\documentclass[11pt,article,english]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{blindtext}
\setsecnumdepth{subsection}
\settocdepth{subsection}
\begin{document}
\tableofcontents*
\blinddocument
\end{document}
By the way, your understanding of headings levels is wrong in this case. The memoir class only simulates an article by adapting the appearance of the headings. Though you seem to write an article, you are working with chapters at the top level. So your list is a bit misleading.
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10