# Adding "Chapter" before the chapter entries in the ToC causes many conflicts

I am trying to add "Chapter" before the chapter number in the ToC.

The code I am using is

\makeatletter
\patchcmd\@chapter
{\numberline {\thechapter }}
{\@chapapp~ \numberline {\thechapter }}
{}{}
\makeatother


However, it causes many conflicts with other parts in the .cls file. For example,

\usepackage{calc}
\newcommand{\t@cfill}{\cleaders\hbox{$\m@th \mkern\@dotsep mu . \mkern\@dotsep mu$}\hfill}
\newcommand{\abbrl@bel}[1]{\makebox[\labelwidth][l]{\textbf{#1}\ \t@cfill}}
\newenvironment{mclistof}[2]{%
\chapter*{#1}%
\begin{list}{}%
{\renewcommand{\makelabel}{\abbrl@bel}%
\setlength{\labelwidth}{#2}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\setlength{\itemsep}{0pt}%
\markboth{#1}{#1}%
}}

\newenvironment{alwayssingle}{%
\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
\else\newpage\fi}
{\if@restonecol\twocolumn\else\newpage\fi}
\newcommand{\@acknowledgementstitle}{Acknowledgements}

\newenvironment{acknowledgements}{
\cleardoublepage
\begin{alwayssingle}
% \setsinglecolumn
\chapter*{Acknowledgements}
\thispagestyle{plain}
\pagestyle{plain}
}
{\end{alwayssingle}}


MWE

\documentclass[12pt]{book}
\usepackage{etoolbox}

\makeatletter
\patchcmd\@chapter
{\numberline {\thechapter }}
{\@chapapp~ \numberline {\thechapter }}
{}{}
\makeatother

\usepackage{calc}
\newcommand{\t@cfill}{\cleaders\hbox{$\m@th \mkern\@dotsep mu . \mkern\@dotsep mu$}\hfill}
\newcommand{\abbrl@bel}[1]{\makebox[\labelwidth][l]{\textbf{#1}\ \t@cfill}}
\newenvironment{mclistof}[2]{%
\chapter*{#1}%
\begin{list}{}%
{\renewcommand{\makelabel}{\abbrl@bel}%
\setlength{\labelwidth}{#2}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\setlength{\itemsep}{0pt}%
\markboth{#1}{#1}%
}}

\newenvironment{alwayssingle}{%
\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
\else\newpage\fi}
{\if@restonecol\twocolumn\else\newpage\fi}

\newcommand{\@acknowledgementstitle}{Acknowledgements}

\newenvironment{acknowledgements}{
\cleardoublepage
\begin{alwayssingle}
% \setsinglecolumn
\chapter*{Acknowledgements}
\thispagestyle{plain}
\pagestyle{plain}
}
{\end{alwayssingle}}

\usepackage{blindtext}% Dummy text for the example
\begin{document}
\tableofcontents
\blinddocument
\end{document}

• Did you think of doing that with one of the dedicated packages (etoc, titletoc, tocloft)? Sep 10, 2019 at 10:37
• @Bernard Thanks. I tried tocloft, but the word "Chaper" is overlapped with the chapter title by using \renewcommand{\cftchappresnum}{Chapter }. Do you know how to deal with it? Sep 10, 2019 at 10:49
• The are width parameters to change, I guess. Personally, I tend to use titletoc, which comes with package titlesec. Sep 10, 2019 at 10:52
• @Bernard Could you point me the link of the usage of titletoc which do this work? Thanks a lot. Sep 10, 2019 at 10:57
• The possibilities are detailed in § 6 of titlesec documentation, (Contents: The titletoc package, pp. 13–19). Sep 10, 2019 at 11:07

With the tocloft package:

\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter } % put Chapter before the number
% Now make extra space for the word
\newlength{\mylen} % a "scratch" length, choose any name you like
\settowidth{\mylen}{\bfseries\cftchappresnum\cftchapaftersnum} % extra space

Further details are in the package documentation (> texdoc tocloft).
• I solve it by adding titles option. \usepackage[titles]{tocloft} Sep 11, 2019 at 6:54