Page Layout ⇒ Subsubsections titles not visible in ToC
Subsubsections titles not visible in ToC
I encountered the following problem:
After inserting a ToC into my file, the subsubsections are listed in the ToC but without their titles. Basically just the usual dotted line and the page numbers are visible.
I tried to change the tables depth with '\setcounter{tocdepth}{3}', but that didnt seem to have an effect.
The numbering depth however can be changed through '\setcounter{secnumdepth}{3}'.
My questions are now:
- Do I have to add a specific label for a subsubsection to see its title in the ToC? Or should these titles usually be visible if subsubsections are listed in the ToC?
- What could be the problem that the ToC depth changes are not working? I inserted the lines before the '\begin{document}' and the class I am using was originally not working with a ToC and should therefore to my understanding not intervene with these settings.
Thanks for any help,
Abel
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
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Subsubsections titles not visible in ToC
welcome to the board!
How do you create your subsubsections? The problem can be caused by using the optional argument for
\subsubsection
but letting it empty, such asCode: Select all
\subsubsection[]{Heading text}
Code: Select all
\subsubsection{Heading text}
Re: Subsubsections titles not visible in ToC
I inserted the subsubsections with '\subsubsection{Title}' without the optional argument.
But thats exactly how the subsubs are listed in the ToC, without or with an empty label. If I wanted to get this deliberately, was there a way to define this in the class, that just levels 1 and 2 get a title and the third level doesn't?
Abel
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Subsubsections titles not visible in ToC
Stefan
Subsubsections titles not visible in ToC
The class usually uses no ToC, which is why I added it myself and initially thought the class should not intervene with it. But as
\setcounter{tocdepth}{3}
seems to have no effect I begin to think it might still be a problem caused by the class.- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Subsubsections titles not visible in ToC
Code: Select all
\documentclass{apa6}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\begin{document}
\tableofcontents
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}
Perhaps post a

Stefan
Subsubsections titles not visible in ToC
(I need the manuscript layout ('man') of the class and the apacite package to manage the references.)
Code: Select all
\documentclass[man, 12pt, apacite]{apa6}
\title{main title}
\usepackage{apacite}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\begin{document}
\section{Section 1}
\subsection{Subsection A}
\subsubsection{Subsubsection I}
\tableofcontents
\end{document}

Abel
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Subsubsections titles not visible in ToC
Code: Select all
! Undefined control sequence.
<argument> \@shorttitle
\shorttitle
, and the following output:So the code is working as expected. There might be something wrong with your version of the document class. Note, also the numbering of your subsubsection is different, the number is placed at the end of the heading, not at the beginning. Check if you use the current version or the version which is on CTAN, respectively.
Perhaps post your .log file as attachment.
Stefan
Subsubsections titles not visible in ToC
The problem seems to have been that I used an older Version of the apa6 class from February. After installing the newest Version from the 4th of April it worked.
The titles are shown in the ToC and the numbering changed to that in your example. It also doesn't ignore the
\setcounter{tocdepth}{3}
anymore.