增加目录页码的距离

增加目录页码的距离

我想知道如何减少目录中的列宽,以便增加到页码的白色距离。非常感谢!

在此处输入图片描述

这是我使用时的结果:

\makeatletter
\renewcommand*\@pnumwidth{2em}
\makeatother

在此处输入图片描述

答案1

这似乎对我有用:

\documentclass{book}
\usepackage{tocloft}
\makeatletter
\renewcommand{\@pnumwidth}{3cm}
\renewcommand{\@tocrmarg}{4cm}
\renewcommand{\cftdotsep}{\cftnodots}
\makeatother
\begin{document}
\tableofcontents
\chapter{Longer longer longer longer Longer longer longer longer Longer longer longer longer Longer
  longer longer longer Longer longer longer longer Longer longer longer longer}

Foo.

\chapter{Longer longer longer longer Longer longer longer longer Longer longer longer longer Longer
  longer longer longer Longer longer longer longer Longer longer longer longer}

Bar.

\chapter{Longer longer longer longer Longer longer longer longer Longer longer longer longer Longer
  longer longer longer Longer longer longer longer Longer longer longer longer}

Bar.
\end{document}

相关内容