Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to center PART and wrap the subsubsection in one line in TOC, with proper indentation (matching with section or subsection or chapter). Please see the image. Attached is the sample code too. Thank you very much.

Sample Current Output

\documentclass[12pt,bothside]{book}


\usepackage[titles]{tocloft}% 
\renewcommand{\cftchapleader}{~\cftdotfill{5}}
\setcounter{secnumdepth}{0}
\setcounter{tocdepth}{3}

% to center part
\renewcommand{\cftpartfont}{\hfill\Large\bfseries}
\renewcommand{\cftpartaftersnum}{\hfill}
\addtocontents{toc}{\cftpagenumbersoff{part}}

%wrap TOC contents
\usepackage{titletoc}
\titlecontents*{subsubsection}% <section>
  [1.5em]% <left>
  {\scriptsize}% <above-code>
  {}% <numbered-entry-format>
  {}% <numberless-entry-format>
  {,\ \thecontentspage}% <filler-page-format>
  [\ - \ ]% <separator>
  [\\]% <end>


\begin{document}

\frontmatter
\tableofcontents

\mainmatter
\part{Part 1}
\chapter{Chapter1}
\section{Section 1}
\subsubsection{Subsubsection 1}
\subsubsection{Subsubsection 2}


\part{Part 2}
\chapter{Chapter1}
\section{Section 1}
\subsection{Subection 1}
\subsubsection{Subsubsection 1}
\subsubsection{Subsubsection 2}


\end{document}
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.