使用ctexart文档类和titletoc宏包时,目录条数多了,就都只显示在一页上。
MWE如下:
\documentclass{ctexart}
\RequirePackage{titletoc}
\titlecontents{part}[0em]{}{\contentslabel{1em}}{}{\titlerule*{$\cdot$}\contentspage}
\titlecontents{section}[1em]{}{\contentslabel{1em}}{}{\titlerule*{$\cdot$}\contentspage}
\titlecontents{subsection}[3em]{}{\contentslabel{2em}}{}{\titlerule*{$\cdot$}\contentspage}
\titlecontents{subsubsection}[5em]{}{\contentslabel{3em}}{}{\titlerule*{$\cdot$}\contentspage}
\begin{document}
\part{A}
\section{1}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\section{2}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\section{3}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\part{B}
\section{1}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\section{2}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\section{3}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\part{C}
\section{1}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\section{2}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\section{3}
\subsection{1}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{2}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\subsection{3}
\subsubsection{1}
\subsubsection{2}
\subsubsection{3}
\end{document}
首先,这个不是目录是正文,需要打印目录的话,在正文前添加命令 tableofcontens
其次,正文文本不分页是因为 LaTeX 的章节命令的原因,在 subsubsection{} 后添加文字就能正常分页了
如
\documentclass{ctexart}
\usepackage{titletoc}
\usepackage{zhlipsum}
\titlecontents{part}[0em]{}{\contentslabel{1em}}{}{\titlerule*{$\cdot$}\contentspage}
\titlecontents{section}[1em]{}{\contentslabel{1em}}{}{\titlerule*{$\cdot$}\contentspage}
\titlecontents{subsection}[3em]{}{\contentslabel{2em}}{}{\titlerule*{$\cdot$}\contentspage}
\titlecontents{subsubsection}[5em]{}{\contentslabel{3em}}{}{\titlerule*{$\cdot$}\contentspage}
\begin{document}
\tableofcontents
\part{A}
\section{1}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\section{2}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\section{3}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\part{B}
\section{1}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\section{2}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\section{3}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\part{C}
\section{1}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\section{2}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\section{3}
\subsection{1}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{2}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\subsection{3}
\subsubsection{1} \zhlipsum
\subsubsection{2} \zhlipsum
\subsubsection{3} \zhlipsum
\end{document}