latex章節編號深度與目錄深度的控制


在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}

參考鏈接:


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM