How do I remove the \paragraph{} text from the \tableofcontents with acmsmall?

I am writing a rather long literature review for submission to ACM Computing Surveys and we are putting a table of contents on it for the benefits of our internal reviewers. The table of contents is including text from the \paragraph tags. I don't want it to, but I can't get rid of it.

Here is a sample document:

\documentclass[prodmode,acmcsur]{acmsmall} % Aptara syntax
\begin{document}
\tableofcontents
\section{A Section}
\subsection{A Subsection}
\subsubsection{A SubSubSection}
\paragraph{First Paragraph} Some text.
\paragraph{Second Paragraph} Some text.
\paragraph{Third Paragraph} Some text.
\subsubsection{Another SubSubSection}
\end{document}


And here is what it looks like:

I've tried to get rid of the paragraph text with \setcounter{tocdepth}{3} and that doesn't help. (It removes the subsubsection, but not the paragraph.) I've also tried \setcounter{secnumdepth}{3}. No luck.

What's the solution?

-

Define \l@paragraph (and \l@subparagraph) to do nothing (the class not defining \l@paragraph nor \l@subparagraph is a bug):

\documentclass[prodmode,acmcsur]{acmsmall} % Aptara syntax
\makeatletter
\newcommand\l@paragraph[2]{}
\newcommand\l@subparagraph[2]{}
\makeatother
\begin{document}
\tableofcontents
\section{A Section}
\subsection{A Subsection}
\subsubsection{A SubSubSection}
\paragraph{First Paragraph} Some text.
\paragraph{Second Paragraph} Some text.
\paragraph{Third Paragraph} Some text.
\subsubsection{Another SubSubSection}
\end{document}


Since the acmsmall class sets tocdepth to 3 (subsubsection level), paragraph and suparagraph title won't go to the ToC, so one can in fact provide a sensible definition for \l@paragraph and \l@subparagraph, in case one decides to include those entries in the ToC by changing tocdepth; in this case, one would have to say

\makeatletter
\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
\makeatother

-
Beautiful. Thanks. One day I will understand \makeatletter. – vy32 Feb 13 '14 at 20:44
@vy32 You're welcome. Regarding \makeatletter, \makeatother, you can read the answers to tex.stackexchange.com/q/8351/3954 – Gonzalo Medina Feb 13 '14 at 20:45