1

I had a previous question on how to add dots in ToC using tocstyle package: Add a dot after chapter and section/figure/table number in ToC/LoF/LoT using tocstyle. However the dot is not applied to parts. How can I do that using tocstyle? Or in general, how can I format part number in ToC using tocstyle?

\documentclass{report}

\usepackage{tocstyle}
\newcommand{\autodot}{.}

\begin{document}

\tableofcontents

\part{Part 1}
\chapter{Chapter 1}

\end{document}

enter image description here

1

Well I found the answer here Add \numberline in TOC for part with scrbook. So all the credits are for Werner for proving the answer.

\documentclass{report}

\usepackage[newparttoc]{titlesec} % see pages 8 and 10 from the manual
\titleformat{\part}[display]{\centering\huge}{}{0mm}{{Part \thepart\\\vspace{3mm}}}[] % \part needs to be redefined

\usepackage{tocstyle}
\newcommand{\autodot}{.}

\begin{document}

\tableofcontents

\part{This is a part}
\chapter{This is a chapter}

\end{document}

enter image description here

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.