[Tex/LaTex] tocloft and width of the table of contents

classicthesistable of contentstocloft

In the ClassicThesis class, the table of contents is set up through the tocloft package and I cannot find a way to line up the page numbers (on the right) as shown below with the thick red line. I'd like the blue numbers to be lined up to the right with the upper line. enter image description here

Best Answer

The following example code contains the necessary redefinitions:

\documentclass[fontsize=11pt,ngerman,american]{scrreprt}
\usepackage{classicthesis}

\renewcommand{\cftpartleader}{\hfill}
\renewcommand{\cftpartafterpnum}{\cftparfillskip}
\renewcommand{\cftchapleader}{\hfill} 
\renewcommand{\cftsecleader}{\hfill}
\input{classicthesis-config}

\begin{document}

\tableofcontents
\part{Test}
\chapter{Test}
\section{test}

\end{document}

enter image description here

However, take into account the following remark conatined in the documentation of classicthesis:

And last but not least, to provide the reader with a way easier access to page numbers in the table of contents, the page numbers are right behind the titles. Yes, they are not neatly aligned at the right side and they are not connected with dots that help the eye to bridge a distance that is not necessary. If you are still not convinced: is your reader interested in the page number or does she want to sum the numbers up?

Therefore, please do not break the beauty of the style by changing these things unless you really know what you are doing! Please.