I have a document that looks like this
\documentclass{book}
\begin{document}
\tableofcontents
\chapter{Intro}
\chapter{Body}
\section{A section}
\subsection{A sub-section to number and include in TOC}
\subsection{Another sub-section to number and include in TOC}
\section{Another section}
\subsection{Number but do not include in the TOC}
\subsection{Another to number but do not include in the TOC}
\section{More}
\subsection{A sub-section to number and include in TOC}
\end{document}
I'd like to number but hide the subsections under one particular section from the TOC. Using \subsection*{}
hides them but also causes them not to be numbered in the document.
The reason for this is because of the number subsections under one particular section. It would just make the TOC too long and isn't really necessary.
\setcounter{tocdepth}{1}
before\tableofcontents
give you what you want? – user194703 Nov 14 '19 at 0:21