我曾经\setcounter{secnumdepth}{3}
出现过小节(1.1.1.1 和 1.1.1.2),但不幸的是它没有出现在我的内容列表中。我的代码:
\documentclass[12pt]{report}
\setcounter{secnumdepth}{3}
\begin{document}
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents
\chapter{the name of chapter}
\section{section test}
\subsection{subsection test}
\subsubsection{subsubsection test}
\subsubsection{subsubsection test}
\end{document}
\end{document}
答案1
\documentclass[12pt]{report}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\begin{document}
\addcontentsline{toc}{chapter}{Contents}
\tableofcontents
\chapter{the name of chapter}
\section{section test}
\subsection{subsection test}
\subsubsection{subsubsection test}
\subsubsection{subsubsection test}
\end{document}