## LaTeX forum ⇒ Page Layout ⇒ Extra dot in ToC. Why ?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Cham
Posts: 885
Joined: Sat Apr 02, 2011 4:06 pm

### Extra dot in ToC. Why ?

I'm getting an extra dot in the ToC, from this MWE code. Why ?


Here's a preview with the extra dot shown in red :
extra-dot.jpg (33.63 KiB) Viewed 475 times

This is weird ! If I change a few lines in the code, the extra dot may be gone, or may stay there. I don't understand what is happening here. Any idea ?

Stefan Kottwitz
Posts: 8954
Joined: Mon Mar 10, 2008 9:44 pm
Hi Cham!

Interesting. I guess 11 is less wide than 10 and so there's just enough space to have one more dot filled in. However, I guess that should not happen because the boxes with the page numbers should have a fixed width.

A quick way of getting rid of the dot would be setting a slightly larger page number width yourself, such as:

\makeatletter\renewcommand{\@pnumwidth}{1.5em}\makeatother

Stefan

Cham
Posts: 885
Joined: Sat Apr 02, 2011 4:06 pm
Thanks Stefan.

It's working nicely, but it's weird to me (I would never understand that kind of LaTeX coding ! ). Is this a kind of hack ?

Cham
Posts: 885
Joined: Sat Apr 02, 2011 4:06 pm
Stefan,

is there another way (i.e. simpler ?) of doing the same ToC style, using another package ?

While your solution is working great and solved my issue, I may be interested in using something like titletoc instead of tocloft. How would you define the same ToC style ?

rais
Posts: 160
Joined: Sun Nov 16, 2014 8:51 pm
If I turn protrusion off---without changing \@pnumwidth---it seems to work in the TOC:
[...]\microtypesetup{protrusion=false}%\tableofcontents\clearpage\microtypesetup{protrusion=true}%\section{Title}[...]

KR
Rainer