How to remove the self-reference of the ToC from the ToC?
\KeepFromToc
helps in suppressing TOC entries for such \listof
commands:
\begin{KeepFromToc}
\tableofcontents
\end{KeepFromToc}
Thanks to Martin Scharrer, I paid a more attention to the memoir
class as the source of the issue.
A closer examination of the memoir README reveals \tableofcontents*
as a solution. Seems logical, everything I want to hide gets the star.
I had a similar problem, but with the article class. Neither of the solutions above work for this class, so after much searching I used the advice of Martin above and searched the article class and found that I can simply not use \tableofcontents
, and instead use:
\makeatletter
\@starttoc{toc}
\makeatother
This doesn't create a section for the table of contents, so the problem goes away.
Thought I would post this here in case anyone else has a similar problem.