# How to reset the space between the label and the content of the item

As described above, I need to enlarge the space between the label and the content of the item of the section of Table of content (\l@part to be exact). and I typed the command \setlength\labelsep{10em}; but it does't work. See below, I want to enlarge the space marked in red rectangle

The .cls file corresponding to the format of the above output

\renewcommand*\l@part[2]{%

\ifnum \c@tocdepth >-2\relax

\setlength\@tempdima{3em}%

\begingroup

\parindent \z@ \rightskip \@pnumwidth

\parfillskip -\@pnumwidth

{\leavevmode

\large \bfseries #1

\leaders\hbox{$\m@th\mkern 1.5mu\cdot\mkern 1.5mu$}

\hfil \hb@xt@\@pnumwidth{\hss #2}}\par

\nobreak

\global\@nobreaktrue

\everypar{\global\@nobreakfalse\everypar{}}%

\endgroup
\fi}


# A minimal example is provided:

\documentclass[10pt]{report}

\usepackage{minitoc,lipsum}

\begin{document}

\tableofcontents

\part{I want to enlarge the space between the label and the content}

\chapter{Introduction}

\section{Just a sample section}

\lipsum[2]

\subsection{Explain}

\lipsum[3-8]

\section{Second}

\lipsum[9]

\chapter{Manual}

section{dddddn}

\subsection{cccExplain}

\end{document}

• Welcome to TeX.SE. It would be helpful if you took the code in the linked question and added your own text to yield a fully compilable MWE including \documentclass{} (\begin{document} and \end{document}) and the appropriate packages that illustrates the problem . While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem, instead of spending time to first reproduce the problem. – skpblack Aug 26 '14 at 4:43
• So you are using \documentclass{book}? What about other packages involved in construction of the ToC (like tocloft or titletoc)? The main issue may not lie with \l@part, but with \@part. – Werner Aug 26 '14 at 6:09

\part sets its ToC-entry within \@part (from report.cls):

\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\else
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\huge\bfseries \partname\nobreakspace\thepart
\par
\vskip 20\p@
\fi
\Huge \bfseries #2\par}%
\@endpart}


To increase the space, use etoolbox to patch and adjust the 1em space:

\documentclass{report}
\usepackage{etoolbox,lipsum}
\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\@part}{1em}{2em}{}{}
\makeatother

\begin{document}

\tableofcontents

\part{I want to enlarge the space between the label and the content}

\chapter{Introduction}

\section{Just a sample section}

\lipsum[2]

\subsection{Explain}

\lipsum[3-8]

\section{Second}

\lipsum[9]

\chapter{Manual}

\section{dddddn}

\subsection{cccExplain}

\end{document}


Above I've updated the space to 2em (doubling it).

• In fact, My thesis is based on book.cls, therefore all the modification should be done in \renewcommand*\l@part[2]{%, the example is used to express the meaning of place where the space is. so what should be done in book.cls in order to achieve the effect wanted. – poplar Aug 26 '14 at 6:58
• I want to reset the space between the label and the chapter, section, subsection as well, so I want to know the feasible way. – poplar Aug 26 '14 at 7:13
• Use a dedicated package like titletoc, (included in titlesec), that gives you full control on the formatting of the table of contents and has easy access documentation. – Bernard Aug 26 '14 at 7:27
\def\@pardis{9em}%
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%

\def\@pardis{9em}%