0

I need to split the part title in the ToC as follow:

Part I

title of the part

I am using the titletoc package. It seems easy with the chapter, but I am not able to figure out how to do it on parts. Any advice?

  • 1
    Could you show us what you've tried? – Bernard Nov 1 '15 at 20:53
  • A lot of titletoc examples. But I could not find anything on the internet about doing this. – Marco Nov 1 '15 at 22:52
3

Here is an old example of mine, which I modified to get what you want (and probably some features you don't want, but they're easy to remove):

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[english]{babel}
\usepackage[newparttoc,explicit, clearempty]{titlesec}%
\usepackage{titletoc}
\usepackage{chngcntr}
\usepackage{fmtcount}
\counterwithin*{chapter}{part}

\def\partname{Part}

\renewcommand\thepart{\NUMBERstring{part}}%
\titleformat{\part}[display]{\bfseries\filcenter}{\huge\partname~\thepart}{20pt}{\Huge #1}[\thispagestyle{empty}]%

\titlecontents{part}[0em]{\large\bfseries\protect\addvspace{25pt}\titlerule\addvspace{1.5ex}}%
{\partname~\thecontentslabel \endgraf}{}%
{\hfill\contentspage}[\addvspace{1ex}\titlerule\addvspace{1ex}]%

\begin{document}

\tableofcontents

\part{A First Part}
\chapter{Chapter the First}
\section{Section 1.1}
\section{Section 1.2}

\chapter{Chapter the Second}
\section{Section 2.1}
\section{Section 2.2}

\part{Another Part} \label{part-2}

\chapter{Chapter the First}
\section{Section 1.1}
\section{Section 1.2}

\chapter{Chapter the Second}
\section{Section 2.1}
\section{Section 2.2}

\end{document} 

enter image description here

  • Thanks Bernard, it worked! I missed the newparttoc option! – Marco Nov 2 '15 at 22:45
  • You're welcome. I must say finding all the options in the documentation is not very easy… – Bernard Nov 2 '15 at 22:50
  • You are right...! – Marco Nov 2 '15 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.