This is a follow up question of Page numbers > 99 in the table of content are not aligned correctly (cleanthesis). The formatting problem has nothing to do with cleanthesis.sty.

The problem is that if I use the charter font, page numbers greater than 99 are not formatted correctly in the table of content.

\documentclass[draft=on]{scrbook}
\usepackage{blindtext}
\usepackage{charter}

\listfiles

\begin{document}
\tableofcontents
\section{Section 1}
\blindtext[100]
\section{Section 2}
\blindtext[500]
\section{Section 3}
\end{document}


Change the value for \@pnumwidth (the space reserved to typeset page numbers):

\documentclass[draft=on]{scrbook}
\usepackage{blindtext}
\usepackage{charter}

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

\begin{document}
\tableofcontents
\section{Section 1}
\blindtext[100]
\section{Section 2}
\blindtext[500]
\section{Section 3}
\end{document}


scrbook.cls has by default:

\newcommand*\@pnumwidth{1.55em}

• Thx, you are the hero of my day!!! – user4811 Aug 11 '13 at 12:21

\usepackage{tocloft}

\newlength\mylen

\renewcommand\cftchappresnum{\chaptername~}
\settowidth\mylen{\bfseries\cftchappresnum\cftchapaftersnum}


Full code:

\documentclass[draft=on]{scrbook}
\usepackage{blindtext}
\usepackage{charter}

\usepackage{tocloft}

\newlength\mylen

\renewcommand\cftchappresnum{\chaptername~}
\settowidth\mylen{\bfseries\cftchappresnum\cftchapaftersnum}

\listfiles

\begin{document}
\tableofcontents
\section{Section 1}
\blindtext[100]
\section{Section 2}
\blindtext[500]
\section{Section 3}
\end{document}


• Your solution doesn't seem to work with subfig.sty. The solution from Gonzalo works better. But anyway, thanks a lot for your time. I appreciate it!!! – user4811 Aug 11 '13 at 12:25
• @user4811 You have to load subfig after tocloft. – user11232 Aug 11 '13 at 12:54