# AIAA class ignoring tocdepth settings

I'm trying to hide subsubsections in my report using \setcounter{tocdepth}{1}. However, I've found that in documents using the AIAA.cls available here, the tocdepth setting seems to be ignored.

You can test this yourself by going to this ShareLaTeX example file, changing the class to AIAA, and trying to use the tocdepth setting. It works fine using the article class, but not using AIAA.

My guess is something in the .cls is overriding my settings. Any help would be appreciated

• (1) welcome, (2) people generally do not like having to go yo other sites or to download files in order to see the mwe. So it might be better to post the code here. It may very well be that the class will not let you change this kind of thing (for example a journal class might not let you are it would be against the journal style). – daleif Feb 7 '17 at 21:58
• is the class the same as the one on ctan ctan.org/tex-archive/macros/latex/contrib/aiaa?lang=en – David Carlisle Feb 7 '17 at 22:24

Besides getting an error

! LaTeX Error: \RequirePackage or \LoadClass in Options Section.


when compiling the document coming with the class, which I downloaded from the AIAA site, after adding \tableofcontents I see nothing particular in the .toc file. However, the class defines

\def\l@section{%
\l@@sections{}{section}% Implicit #3#4
}%
\def\l@f@section{%
%\bf
}%
\def\l@subsection{%
\l@@sections{section}{subsection}% Implicit #3#4
}%
\def\l@subsubsection{%
\l@@sections{subsection}{subsubsection}% Implicit #3#4
}%
\def\l@paragraph#1#2{}%
\def\l@subparagraph#1#2{}%


and \l@@sections is a command from the base revtex4-1 class which completely ignores the tocdepth counter.

So, no: you have no way for removing subsections (and subsubsections) from the table of contents, unless you go with a sledghehammer:

\documentclass{AIAA}

\makeatletter
\def\l@subsection#1#2#3{}
\def\l@subsubsection#1#2#3{}
\makeatother

\begin{document}


I believe the copy editors will not be happy at all with this code, which might cause rejection of the manuscript.