According to other answers here and elsewhere on the Internet, to add "Part" before the part number in the ToC you do this:
\usepackage{tocloft}
\renewcommand\cftpartpresnum{Part~}
However, I've spent two hours trying to figure out why it doesn't work for me and eventually found that it's because I'm using the titlesec
package. Here is a MWE that shows the problem:
\documentclass{book}
\usepackage{titlesec}
\usepackage{tocloft}
\renewcommand\cftpartpresnum{Part~}
\begin{document}
\tableofcontents
\part{Beginnings}
\chapter{Things}
\chapter{More Things}
\end{document}
Removing the \usepackage{titlesec}
fixes it.
Given that I am using titlesec
to style chapter and section titles, how do I add the "Part~" text before the part-number in the ToC?