Elimine el enlace/número de página de la tabla de contenido de la Parte, póngalo centrado y nombre en una nueva línea

Elimine el enlace/número de página de la tabla de contenido de la Parte, póngalo centrado y nombre en una nueva línea

Estoy intentando reproducir el formato de la tabla de contenidos que se muestra aquí:

ingrese la descripción de la imagen aquí

Mi intento:

\documentclass[12pt]{book}
\usepackage{tocloft,titletoc}

%\cftsetindents{section}{0em}{2em}
%\cftsetindents{subsection}{0em}{2em}
\usepackage{theanomodern}
\usepackage[baskerville]{newtxmath}

\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\contentsname}{\parbox{\linewidth}{\centerline{\Large CONTENTS}~\\[-1.5cm]}}

\titlecontents*{chapter}[0pt]{}{\textsc{\chaptername} \thecontentslabel:\quad}{}{\bfseries\hfill\contentspage}


\setcounter{tocdepth}{0}

\usepackage{hyperref}
\hypersetup{linktoc=none,}

\begin{document}
    \tableofcontents
    \pagenumbering{arabic}
    \clearpage
    %\addcontentsline{toc}{part}{\protect\centering{}Chapter I}
    \part{One}
    \chapter{The Greatest Common Divisor of Two Numbers}
    \part{Two}
    \chapter{Prime Numbers and Factorization into Prime Factors}
    
\end{document}

La salida está un poco cerca pero no del todo. Funciones faltantes:

  1. Parte y la etiqueta no comienza con Parte. Para esto ya intenté modificar con \titlecontentspero obtuve un error, así que lo eliminé de MWE.
  2. Las piezas están centradas.
  3. Las piezas no tienen ningún enlace a la página al final.
  4. El nombre de las piezas está en una línea separada.
  5. Los nombres de los capítulos están alineados, lo cual no está en mi salida.

ingrese la descripción de la imagen aquí

Respuesta1

Esta solución no utiliza tocloft.

Lo complicado fue separar el número de pieza del título en el hipervínculo.

\documentclass[12pt]{book}
\usepackage{etoolbox}
%\usepackage{showframe}% alignment tool

\usepackage{theanomodern}
\usepackage[baskerville]{newtxmath}

\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\contentsname}{\parbox{\linewidth}{\centerline{\Large CONTENTS}~\\[-1.5cm]}}

\makeatletter
\patchcmd{\@part}{\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}}%
  {\addcontentsline{toc}{part}{\protect\numberline{\thepart}#1}}{}{FAILED}%

\newcommand*{\@partnumber}{}% reserve global name

\renewcommand*\l@part[2]{%
  \ifnum \c@tocdepth >-2\relax
    \addpenalty{-\@highpenalty}%
    \addvspace{1.0em \@plus\p@}%
    \begingroup
      \def\numberline##1{\xdef\@partnumber{##1}}%
      \setbox0=\vbox{\centering\bfseries\strut #1}% Could be more than one line
      \centering
      \leavevmode
       \hyperlink{\Hy@tocdestname}{\large \partname~\@partnumber}\\
       \usebox0
         \global\@nobreaktrue
         \everypar{\global\@nobreakfalse\everypar{}}%
    \endgroup
  \fi}
  
\renewcommand*\l@chapter[2]{% #1 = title, #2 = pagenumber
\begingroup
  \def\numberline##1{\hbox to \@tempdima{\chaptername~##1:\hfill}}% add \chaptername
  \@dottedtocline{0}{0pt}{3cm}{#1}{\hyperlink{\Hy@tocdestname}{\bfseries #2}}% 3cm is the space reserved for the chapter number box
\endgroup}
 
\makeatother

\setcounter{tocdepth}{0}

\usepackage{hyperref}
\hypersetup{linktoc=none,}

\begin{document}
    \tableofcontents
    \pagenumbering{arabic}
    \clearpage
    %\addcontentsline{toc}{part}{\protect\centering{}Chapter I}
    \part{One}
    \chapter{The Greatest Common Divisor of Two Numbers}
    \part{Two}
    \chapter{Prime Numbers and Factorization into Prime Factors}
    
\end{document}

información relacionada