# Add “Part” before the number in Toc when using titlesec package

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?

You want to avoid using both titletoc/titlesec and tocloft. Choose one or the other. Here is a model you can adapt.

\documentclass{book}

\usepackage{titlesec,titletoc}
%\usepackage{tocloft}
%\renewcommand\cftpartpresnum{Part~}

\titlecontents{part}%
{}{\partname~}
{\hfill\contentspage}%replaced with {} if don't want page number for parts