1

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?

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

1 Answer 1

4

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .