所以我有这个小节,但是它没有数字,我该如何使它像这样:
chapter 1
section 1.1
subsection 1.1.1
subsubsection 1.1.1.a
答案1
您需要调整secnumdepth
到部门单位的级别(本例中为 3 级,表示最多\subsubsection
)。您还可以考虑更新tocdepth
(例如,到 3 级)以将\subsubsection
s 包含在 ToC 中:
\documentclass{report}
\renewcommand{\thesubsubsection}{\thesubsection.\alph{subsubsection}}% Recursive numbering for \subsubsection
\setcounter{secnumdepth}{3}% Show section numbers up to \subsubsection (level 3)
\setcounter{tocdepth}{3}% Show sectional units up to \subsubsection (level 3) in ToC
\begin{document}
\tableofcontents
\chapter{A chapter}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}