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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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