我试图将小节放入目录中,但无法获取小节标题侧面的编号。
\documentclass{toptesi}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}
\begin{document}
\tableofcontents
\chapter{chapter 1}
\section{section 1}
\subsection{subsection 1}
\subsubsection{subsubsection 1}
\end{document}
答案1
类toptesi
使用 within \AtBeginDocument
\frontmatter
,后者限制为secnumdepth
。2
您需要一个明确的
\mainmatter\setcounter{secnumdepth}{3}
在那之后。
\documentclass{toptesi}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\mainmatter
\setcounter{secnumdepth}{4}
\chapter{chapter 1}
\section{section 1}
\subsection{subsection 1}
\subsubsection{subsubsection 1}
\blindtext
\end{document}