I am trying to produce a TOC that runs ragged right. I want the distance between all titles (parts, chapters, sections) and page numbers to be 3 times the distance that's between the part/chapter/section number and the title. No dots or anything.
I see how to set the indentation from the right by changing 4em
in the MWE below, but I do not know how to calculate the appropriate number.
I would also like to align the front matter/intro title with the part number below it and then both of those aligned with the chapter titles instead of everything flush left.
\documentclass{book}
\usepackage[titles]{tocloft}
\renewcommand{\cftdotsep}{\cftnodots}
\renewcommand{\cftpartafterpnum}{\hspace*{4em}}
\renewcommand{\cftchapafterpnum}{\hspace*{4em}}
\renewcommand{\cftsecafterpnum}{\hspace*{4em}}
\renewcommand{\cftpnumalign}{l}
\begin{document}
\frontmatter
\tableofcontents
\chapter{Introduction}
\part{This is Part One}
\mainmatter
\chapter{First Chapter}
\section{First Section}
\end{document}
So the I
from Introduction
should be aligned with the I
which is the part number, and these both should be indented to align with the F
from First Chapter
.
Suggestions?