HUSTtex
HUSTtex copied to clipboard
目录过多的话,就显示不完全,目录页只有一页,后面几章显示不出来
same, looking for solutions
try add these after \usepackage{tocloft}
\makeatletter
\let\old@l@section\l@section
\renewcommand{\l@section}[2]{%
\old@l@section{#1}{#2} % Regular setting of \section in ToC
\pagebreak[0] % Add a zero penalty (for possible page break)
\thispagestyle{main}
}
\makeatother
edit: you might need to add those codes to ensure page break works every single line
\makeatletter
\let\old@l@section\l@section
\renewcommand{\l@section}[2]{%
\old@l@section{#1}{#2} % Regular setting of \section in ToC
\pagebreak[0] % Add a zero penalty (for possible page break)
\thispagestyle{main}
}
\makeatother
\makeatletter
\let\old@l@subsection\l@subsection
\renewcommand{\l@subsection}[2]{%
\old@l@subsection{#1}{#2} % Regular setting of \subsection in ToC
\pagebreak[0] % Add a zero penalty (for possible page break)
\thispagestyle{main}
}
\makeatother
\makeatletter
\let\old@l@subsubsection\l@subsubsection
\renewcommand{\l@subsubsection}[2]{%
\old@l@subsubsection{#1}{#2} % Regular setting of \subsubsection in ToC
\pagebreak[0] % Add a zero penalty (for possible page break)
\thispagestyle{main}
}
\makeatother
\makeatletter
\let\old@l@paragraph\l@paragraph
\renewcommand{\l@paragraph}[2]{%
\old@l@paragraph{#1}{#2} % Regular setting of \paragraph in ToC
\pagebreak[0] % Add a zero penalty (for possible page break)
\thispagestyle{main}
}
\makeatother
请见 68b4dd40b969f0ca5f23e2c0cd6cd8511605643f