21

I'm attempting to modify the Table of Contents in my document. Currently, chapter one in my document is listed as

1   Introduction

What I would like to see is

Chapter 1   Introduction

Seems like an easy enough thing to ask for, but can't seem to find a good way to do this. Any feedback would be most appreciative.

Werner
  • 603,163

2 Answers2

22

The titletoc package provides ToC entry manipulation for a \chapter via \titlecontents*{chapter}:

enter image description here

\documentclass{book}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\usepackage{titletoc}% http://ctan.org/pkg/titletoc
\titlecontents*{chapter}% <section-type>
  [0pt]% <left>
  {}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>
  {}% <numberless-entry-format>
  {\bfseries\hfill\contentspage}% <filler-page-format>

\begin{document}
\tableofcontents
\chapter{Introduction} \lipsum[1]
\section{First section} \lipsum[2-3]
\section{Second section} \lipsum[4-5]
\section{Last section} \lipsum[6-7]
\chapter{Second chapter} \lipsum[1]
\section{First section} \lipsum[2-3]
\section{Second section} \lipsum[4-5]
\section{Last section} \lipsum[6-7]
\chapter{Last chapter} \lipsum[1]
\section{First section} \lipsum[2-3]
\section{Second section} \lipsum[4-5]
\section{Last section} \lipsum[6-7]
\end{document}

For adding space between ToC chapter entries, you could use \addvspace{1em} (where 1em is the regular book documentclass chapter skip) for <above-code>:

\usepackage{titletoc}% http://ctan.org/pkg/titletoc
\titlecontents*{chapter}% <section-type>
  [0pt]% <left>
  {\addvspace{1em}}% <above-code>
  {\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>
  {}% <numberless-entry-format>
  {\bfseries\hfill\contentspage}% <filler-page-format>

enter image description here

Werner
  • 603,163
  • 1
    Thanks Werner, pictures helped a lot in conveying the information. Thanks again for your help. – Vincent Russo Dec 23 '11 at 04:58
  • Dear Werner, I have two questions related to this post which I am having similar problems. a) I would like to ask how if I want to have the word "Chapter" in the capital letter "CHAPTER"? b) If I use [\titlecontents*{chapter}% [0pt]% {\addvspace{1em}}% {\bfseries\chaptername\ \thecontentslabel\quad}% {}% {\bfseries\hfill\contentspage}% ] I get error message saying "chemmacros.sty" . undefined control sequence. Could you help to resolve this issue? Thank you. – Vijay May 27 '15 at 06:36
  • @Vijay: (a) Use \MakeUppercase{\chaptername} or CHAPTER directly instead of \chaptername. (b) I don't understand what might be causing that. – Werner May 27 '15 at 06:39
  • @Werner, I am using "Easy thesis" template which is based on "book" type document class (https://www.sharelatex.com/templates/52fdfd8234a287a85245b4c6). After the "\begin{document}" command, there is another command "\frontmatter". So I am not so sure where I supposed to add the "command" you suggested in the post. Additionally, In the template the chapters are numbered like 1. Introduction, 2. Literature review, and so on. So I tried to make the word "CHAPTER" in front of the chapter number but I fail. Hope you could help. – Vijay May 27 '15 at 07:26
  • What if I have Acknowledgement, List of Figures et al. that precede the actual chapters and I only want actual chapters to have the word "Chapter before the numbering? In other words, how can I avoid having "Chapter List of Figures?" – Zhanwen Chen Nov 18 '19 at 23:00
  • 1
    This solution causes formatting problems in case some of the chapters have have no sections. egreg's answer works better for my case. – TTT Feb 12 '20 at 10:27
  • @TTT: In that case, you can add the optional <below code> provided by \titlecontents. See this code that produces this output. – Werner Feb 12 '20 at 17:20
15

With tocloft one can use \cftchappresnum to put something before the number; but we have also to reserve enough space. I defer the space setting when the text font is already established.

\documentclass[a4paper]{book}
\usepackage{tocloft,calc}

\renewcommand{\cftchappresnum}{Chapter }
\AtBeginDocument{\addtolength\cftchapnumwidth{\widthof{\bfseries Chapter }}}

\begin{document}
\tableofcontents

\chapter{Introduction}
\end{document}
egreg
  • 1,121,712