尘
这家伙很懒,什么也没写!

注册于 4年前

回答
1
文章
0
关注者
0

首先,这个不是目录是正文,需要打印目录的话,在正文前添加命令 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}

发布
问题