答案1
尝试以下 TeX 代码:
\documentclass{book}
\usepackage{blindtext}
\makeatletter
\renewcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\z@
\addpenalty\@secpenalty
\addvspace{1.0em \@plus\p@}%
\setlength\@tempdima{1.8em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
\hfil#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{}\par
\endgroup
\fi}
\makeatother
\begin{document}
\tableofcontents
\Blinddocument
\end{document}