在Latex中,通常編號到subsubsection,book類型的目錄默認只顯示到subsection,但是如果需要使用更深的目錄或章節編號,需要在導言區進行如下設置:
- \setcounter{tocdepth}{3}:toc即table of content,表示目錄顯示的深度
- \setcounter{secnumdepth}{4}:secnum即section number,表示章節編號的深度
其中的數字3和4表示深度,具體數字的含義如下:
- -1 part
- 0 chapter
- 1 section
- 2 subsection
- 3 subsubsection
- 4 paragraph
- 5 subparagraph
例子:
\documentclass{article}
\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\begin{document}
\tableofcontents
\section{section}
\subsection{subsection}
\subsubsection{subsubsection}
\paragraph{paragraph}
\end{document}
參考鏈接: