# Name “Chapter” is not showed in the table of the content

In my LaTeX code I add the line

\tableofcontents


And begging of each chapter i have these lines.

\renewcommand{\vspace}[2]{}\chapter{ }
{\huge\bf Introduction}


When i compile my code it shows

1                                                                                 5
Introduction                                                                  5
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .    5
2                                                                                 6
Computing                                                                     6
2.1 Computing type . . . . .... . . . . . . . . . . . . . . . . . . . . . 6


Like this,

But I want to get the "Chapter" name to in front of the number like this.

Chapter 1
Introduction
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Chapter 2
Computing
2.1 Computing type . .  . . . . . . . . . . . . . . . . . . . . 6


How can I do that?

-
use the tocloft package (or the memoir class) it has featues to add such names –  daleif Sep 14 '12 at 12:05
I tried it but it end up with same result. –  Team Sep 14 '12 at 12:11
@Team, how was the code for trying that? –  zeroth Sep 14 '12 at 12:21
Never redefine \vspace! –  egreg Sep 14 '12 at 12:39
–  Werner Sep 15 '12 at 5:25

You can use the tocloft package to do this: a redefinition of \cftchappresnum allows to add \chaptername before the sectional unit number (this requires increasing the length \cftchapnumwidth). Redefining \cftchapaftersnumb you can add a line break after the sectional number and some negative horizontal spacing to achieve the desired alignment. A little example:

\documentclass{book}
\usepackage{tocloft}

\newlength\mylen
\renewcommand\cftchappresnum{\chaptername~}
\settowidth\mylen{\bfseries\cftchappresnum\cftchapaftersnum}
\renewcommand\cftchapaftersnumb{\\*\hspace*{-\mylen}}

\begin{document}

\tableofcontents
\chapter{Introduction}
\section{Overview}
\chapter{Computing}
\section{Computing type}

\end{document}


As egreg points out in his comment, it is not a good idea to redefine \vspace. If you want to redefine the formatting for the sectional units and you are using a standard document class, you can use the titlesec package.

-