borisveytsman / acmart

ACM consolidated LaTeX styles
595 stars 252 forks source link

Paragraph are interpreted as subsubsections in Table of Contents (TOC), even though they should not be. #534

Open shamefulCake1 opened 2 months ago

shamefulCake1 commented 2 months ago

MWE:

Standard LaTeX "article":

\documentclass{article}
\setcounter{tocdepth}{3}
%\setcounter{secnumdepth}{4}
\begin{document}
\tableofcontents

\section{section}
\subsection{subsection}
\subsubsection{subsubsection}
\paragraph{paragraph}
Hello, World!
\end{document}

Result: image

This is what is expected.

I can enumerate paragraphs if I want:

\documentclass{article}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{4}
\begin{document}
\tableofcontents

\section{section}
\subsection{subsection}
\subsubsection{subsubsection}
\paragraph{paragraph}
Hello, World!
\end{document}

image

Again, this is expected, sometimes I want to enumerate paragraphs.

Acmart:

\documentclass[format=acmsmall]{acmart}
%\documentclass{article}
\setcounter{tocdepth}{3}
%\setcounter{secnumdepth}{4}
\begin{document}
\tableofcontents

\section{section}
\subsection{subsection}
\subsubsection{subsubsection}
\paragraph{paragraph}
Hello, World!
\end{document}

Result:

image

This is wrong, /paragraph/ should not be in the TOC, because tocdepth is set to 3. But maybe in acmart paragraphs are level-3 too, just as subsubsections?

With deeper secnumdepth:

\documentclass[format=acmsmall]{acmart}
%\documentclass{article}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{4}
\begin{document}
\tableofcontents

\section{section}
\subsection{subsection}
\subsubsection{subsubsection}
\paragraph{paragraph}
Hello, World!
\end{document}

This compiles with errors. It does add numbers to paragraphs (as expected), so it does recognise paragraphs as level-4 headings, not level-3, and nevertheless adds them to ToC, even though tocdepth is 3.

There is the resulting pdf, but again, it compiled with errors, so is probably not usable beyond an MWE:

image