latex一般支持section, subsection, subsubsection. 再往下是\paragraph
和\subparagraph
, 但是这种既不会添加章节标号也不会加入目录中去, 需要我们设置一下:
\newcommand{\subsubsubsection}[1]{\paragraph{#1}\mbox{}\\} % 把paragraph命令重命名为\subsubsubsection
\setcounter{secnumdepth}{4} % 添加标号
\setcounter{tocdepth}{4} % 添加到目录中
\newcommand{\subsubsubsubsection}[1]{\subparagraph{#1}\mbox{}\\} % 把subparagraph命令重命名为\subsubsubsubsection
\setcounter{secnumdepth}{5} % 添加标号
\setcounter{tocdepth}{5} % 添加到目录中
对应地要在目录设置层级的话需要用\titlecontents
命令设置.