GeneralChanging a line in table of contents

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
intiha
Posts: 5
Joined: Wed May 27, 2009 8:46 am

Changing a line in table of contents

Post by intiha »

Dear all,
I am trying to add the word chapter to the start of a new chapter entry in my thesis TOC. Here is the relevant code that I was able to dig from the report.cls file.

Code: Select all

\addcontentsline{toc}{chapter}%
   {\protect\numberline{\thechapter}#1}%
Now when I try and add word chapter before #1, it over writes on top of the chapter number!

Any idea how to resolve this?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

intiha
Posts: 5
Joined: Wed May 27, 2009 8:46 am

Changing a line in table of contents

Post by intiha »

okay I actually solved this problem:

Code: Select all

\addcontentsline{toc}{chapter}%
                                   {Chapter\protect\numberline{~\thechapter:} 
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Changing a line in table of contents

Post by localghost »

See my recommendations in another related topic [1]. Choose one of the suggested packages.

[1] View topic: How to modify default formatting for table of contents


Best regards
Thorsten
Post Reply