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}%
\addcontentsline{toc}{chapter}{#1}
\begin{list}{}%
{\renewcommand{\makelabel}{\abbrl@bel}%
\setlength{\labelwidth}{#2}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\setlength{\itemsep}{0pt}%
\markboth{#1}{#1}%
}}
{\end{list}\mtcaddchapter}
\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}%
\addcontentsline{toc}{chapter}{#1}
\begin{list}{}%
{\renewcommand{\makelabel}{\abbrl@bel}%
\setlength{\labelwidth}{#2}%
\setlength{\leftmargin}{\labelwidth+\labelsep}%
\setlength{\itemsep}{0pt}%
\markboth{#1}{#1}%
}}
{\end{list}\mtcaddchapter}
\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}
etoc
,titletoc
,tocloft
)?tocloft
, but the word "Chaper" is overlapped with the chapter title by using\renewcommand{\cftchappresnum}{Chapter }
. Do you know how to deal with it?titletoc
, which comes with packagetitlesec
.titletoc
which do this work? Thanks a lot.Contents: The titletoc package
, pp. 13–19).