I'm using the report style.

I'm using \subsection* to suppress the numbers that would otherwise appear before my subsection text.

I'm generating a table of contents using setcounter{tocdepth}{2}

Is there a way to suppress the numbers for the subsections in the table of contents, like you can suppress them using \subsection* rather than \subsection?

(I want the chapter and section numbers to appear for new chapters and sections, as they currently are).

• What happens with \setcounter{tocdepth}{1}? Or do you want the subsection's name on toc but not numbered there but numbered on the text? – Sigur Jan 9 '14 at 14:30
• The TOC doesn't display the subsection title either. – Bathsheba Jan 9 '14 at 14:32
• You shouldn't use \subsection* everywhere; just say \setcounter{secnumdepth}{1} before \begin{document} and use \subsection normally. If you want the subsections in the TOC, add also \setcounter{tocdepth}{2} – egreg Jan 9 '14 at 14:50
• Welcome to TeX.SX! – karlkoeller Jan 9 '14 at 15:04

Don't use \subsection* everywhere, if you never want subsections to be numbered. Instead, add

\setcounter{secnumdepth}{1} % levels under \section are not numbered
\setcounter{tocdepth}{2}    % levels under \subsection are not listed in the TOC


Example with article, but with report or book (or most of the other classes)

\documentclass{article}

\setcounter{secnumdepth}{1} % levels under \section are not numbered
\setcounter{tocdepth}{2}    % levels under \subsection are not listed in the TOC

\begin{document}

\tableofcontents

\section{Introduction}

\subsection{Some title}
Here's the text.

\subsection{Again}
And again.

\section{Conclusion}
Enough.

\end{document}


This is one way:

\subsection*{text here}

And set the depth of the table of contents to be above the subsection level, using \setcounter{tocdepth}{appropriate value here}