# How can I make the dots in a ToC end at the same place?

In my table of contents, some of the dot fills do not end at the same place as the other lines. What is causing this and how can I make the dot fills uniform? A red oval highlights the problem in the following screenshot:

Edit: It looks as if the page number "101" is slightly less wide than the other page numbers, allowing just enough room for an extra dot. This is probably the cause, but I still don't know how to fix the problem.

Edit 2: Minimal working example below. The document class is located at https://github.com/wannesm/adsphd/blob/master/adsphd.cls, and is quite long -- apologies for the inconvenience.

\documentclass{adsphd}

\begin{document}

\mainmatter % Arabic page numbering

\tableofcontents

\setcounter{page}{98}
\chapter{Numerical solution of bivariate and polyanalytic polynomial systems}
\section{Introduction}\clearpage
\section{Notation and preliminaries}\clearpage
\section{Solving systems of bivariate and polyanalytic polynomials}\clearpage
\subsection{The polynomial eigenvalue problem}\clearpage
\subsection{Balancing the system and its associated pencil}\clearpage
\subsubsection{Balancing the bivariate system}\clearpage
\subsubsection{Balancing the polyanalytic system}\clearpage
\subsubsection{Balancing the pencil}\clearpage
\section{Numerical experiments}\clearpage
\section{Conclusion}\cleardoublepage

\end{document}


This is a problem with microtype. Use

\microtypesetup{protrusion=false}
\tableofcontents
\microtypesetup{protrusion=true}


• Yes, you are right. If one removes \usepackage{microtype} from that class file, the error vanishes also! Perhaps, one should notify the maintainer/creator of the class file about this 'feature'? – user31729 Apr 22 '14 at 10:03
• It is mentioned in the microtype documentation in the "Hints and caveats" chapter as one of the places where you might want to disable protrusion. I'm not sure it can be seen as a bug in microtype as such. Rather I think that classes that use it ought to redefine \tableofcontents like this. – pst Apr 22 '14 at 10:13