# Have almost managed to get my TOC the way I want, but need help making it 100% perfect

If you compile my current TOC code:

\documentclass[a4paper,10pt]{book}

\usepackage{lipsum,kantlipsum}
\usepackage[dotinlabels]{titletoc}

\contentsmargin{0pt}
\renewcommand\contentspage{\thecontentspage}

\titlecontents{chapter}[0pc]
{\chaptername\ \thecontentslabel: }
{}
{\normalsize\titlerule*[6pt]{.}\contentspage}

\newlength\widest
\settowidth\widest{99.99.}

\titlecontents{section}[1.025pc]
{\parbox[t]{\widest}{\hfill\thecontentslabel.}\hspace{3mm}}
{}
{\normalsize\titlerule*[6pt]{.}\contentspage}

\renewcommand\thesection{\arabic{section}}

\begin{document}
\tableofcontents
\chapter{Chapter 1}\section{Section 1}\kant[1-8]
\chapter{Chapter 2}\section{Section 2}\kant[1-60]
\chapter{Chapter 3}\section{Section 3}
\end{document}


You will see a TOC that looks like this:

I'm almost perfectly happy with this, but there are two issues that remain:

1. The chapter dots are not exactly 100% aligned with the section dots. More precisely, each dot after a chapter name does not have the exact same horizontal position as the dot below it after the section name.

2. The page number after the chapter does not look exactly like the one after the section. It's also not positioned same, horizontally. I want to make the chapter one look exactly like the section one (without changing the font size of the chapter heading).

Can you help me with this? In short: All dots and page numbers look alike and align properly, whether they be for a chapter or a section.

-

# 2.

For chapters you are using \large\scshape and only the font size is reset by \normalsize for the dots and the page number. \upshape resets the font shape to the normal setting:

\titlecontents{chapter}...{\normalsize\upshape\titlerule*[6pt]{.}\contentspage}...


# 1.

\titlerule* uses \leaders in the table of contents. Therefore the dots are exactly aligned in vertical direction. Probably you mean the horizontal distance after the title and the dots. This space can be zero as well as the space before the page number. Therefore I would add some space before and after the dots, at least \,:

\documentclass[a4paper,10pt]{book}

\usepackage{lipsum,kantlipsum}
\usepackage[dotinlabels]{titletoc}

\contentsmargin{0pt}
\renewcommand\contentspage{\thecontentspage}

\titlecontents{chapter}[0pc]
{\chaptername\ \thecontentslabel: }
{}
{\normalsize\upshape\,\titlerule*[6pt]{.}\,\contentspage}

\newlength\widest
\settowidth\widest{99.99.}

\titlecontents{section}[1.025pc]
{\parbox[t]{\widest}{\hfill\thecontentslabel.}\hspace{3mm}}
{}
{\normalsize\,\titlerule*[6pt]{.}\,\contentspage}

\renewcommand\thesection{\arabic{section}}

\begin{document}
\tableofcontents
\chapter{Chapter 1}\section{Section 1}\kant[1-8]
\chapter{Chapter 2}\section{Section 2}\kant[1-60]
\chapter{Chapter 3}\section{Section 3}
\newpage
\setcounter{page}{100}
\chapter{Chapter 4}
\end{document}


-

Add \normalfont to \normalsize: you're using, in chapter entries, periods from the small caps font, which are slightly different from the normal ones.

\titlecontents{chapter}[0pc]