General ⇒ Include the word chapter in table of contents
Include the word chapter in table of contents
15.
Hello all,
I need the word chapter (e.g., ‘Chapter 1: … )’ to appear in my table of contents. However, my thesis file only produces a list of numbers such as
1 Introduction
1.1 Motivation
1.2 Previous work
2 Algorithm
Instead I need
Chapter 1: Introduction
1.1
1.2
Chapter 2: Algorithm
and so on…
Would appreciate suggestions..I have been fiddling around with the report.cls file to generate the appropriate change. But if I add the word 'Chapter' before #1 in the .cls file it generates something like Chapter 1 Introduction:
Best
Hello all,
I need the word chapter (e.g., ‘Chapter 1: … )’ to appear in my table of contents. However, my thesis file only produces a list of numbers such as
1 Introduction
1.1 Motivation
1.2 Previous work
2 Algorithm
Instead I need
Chapter 1: Introduction
1.1
1.2
Chapter 2: Algorithm
and so on…
Would appreciate suggestions..I have been fiddling around with the report.cls file to generate the appropriate change. But if I add the word 'Chapter' before #1 in the .cls file it generates something like Chapter 1 Introduction:
Best
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Include the word chapter in table of contents
This issue has been discussed very often in this forum. Please try a forum search (upper right corner of each page) for the tocloft package. In case of occurring problems, feel free to ask further questions.
Best regards and welcome to the board
Thorsten¹
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Include the word chapter in table of contents
You can use the tocloft package, as the following example suggests:
Refer to the documentation for further information.
Code: Select all
\documentclass{report}
\usepackage[english]{babel}
\usepackage{tocloft}
\renewcommand{\cftchapfont}{\bfseries}
\renewcommand{\cftchappagefont}{\bfseries}
\renewcommand{\cftchappresnum}{Chapter }
\renewcommand{\cftchapaftersnum}{:}
\renewcommand{\cftchapnumwidth}{6em}
\begin{document}
\tableofcontents
\chapter{First chapter}
\section{Sec. One one}
\section{Sec. One two}
\chapter{Second chapter}
\section{Sec. Two one}
\section{Sec. Two two}
\chapter{Third chapter}
\section{Sec. Three one}
\section{Sec. Three two}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Include the word chapter in table of contents
Thanks gmedina. Using tocloft changes a lot of my initial settings. My thesis is completely formatted according to the specifications except the Chapter x: Chapter Heading in the table of contents.
That's the reason I've been fiddling with the report.cls file to make just this change. I don't want to get into tocloft and take care of all the changes introduced by using it.
I am looking for a simple renewal command either in the latex source or in the report.cls file.
That's the reason I've been fiddling with the report.cls file to make just this change. I don't want to get into tocloft and take care of all the changes introduced by using it.
I am looking for a simple renewal command either in the latex source or in the report.cls file.
Re: Include the word chapter in table of contents
I figured out how to do this. I changed the line in my report.cls file. The line marked with **************
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
**************** {\protect Chapter\numberline{\thechapter \;:}#1}% %%%% Change on 07/20/2008
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
**************** {\protect Chapter\numberline{\thechapter \;:}#1}% %%%% Change on 07/20/2008
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: Include the word chapter in table of contents
It has never been a good idea to modify the original class files. There are many packages that yield the same results. And reading some documentation doesn't cost more time than searching the class file for the right place to modify.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 1
- Joined: Wed Oct 08, 2008 9:23 am
Re: Include the word chapter in table of contents
thanks vivek I used it with some modification and it worked nicely...
Re: Include the word chapter in table of contents
Thanks vivek_136, your suggestion was REALLY helpful. I was having the same problem as yours.