[Tex/LaTex] Table of contents

table of contents

How will i create a table of contents to have an output like this…

                             CONTENTS



ILLUSTRATIONS ...........................................i

TABLES...................................................ii

ACKNOWLEDGEMENT..........................................iii

ABSTRACT.................................................iv

Chapter 1

     INTRODUCTION.........................................1

Best Answer

If you want to change the \chapter heading of all the chapters use the titlesec package. I would not recommend that you change the contents heading on its own. If you realy wants it, you can add

\renewcommand*\cfttoctitlefont{\Huge\bfseries\hfill\MakeUppercase}
\renewcommand*\cftaftertoctitle{\hfill}

The following will give more or less wat you want, execpt for the linebreak after Chapter 1. That will cause chaos if you include sections.

\documentclass{book}
\usepackage{tocloft}
    \newlength\mylenprt
    \newlength\mylenchp
    \newlength\mylenapp

    \renewcommand*\cftpartpresnum{\partname~}
    \renewcommand*\cftchappresnum{\chaptername~}
    \renewcommand*\cftchapaftersnum{.}
    \renewcommand*\cftchapdotsep{\cftdotsep}

    \settowidth\mylenprt{\cftpartfont\cftpartpresnum\cftpartaftersnum}
    \settowidth\mylenchp{\cftchapfont\cftchappresnum\cftchapaftersnum}
    \settowidth\mylenapp{\cftchapfont\appendixname~\cftchapaftersnum}
    \addtolength\mylenprt{\cftpartnumwidth}
    \addtolength\mylenchp{\cftchapnumwidth}
    \addtolength\mylenapp{\cftchapnumwidth}

    \setlength\cftpartnumwidth{\mylenprt}
    \setlength\cftchapnumwidth{\mylenchp}
\begin{document}
    \frontmatter
    \tableofcontents
    \chapter{ILLUSTRATIONS}
        \makeatletter\@starttoc{lof}\makeatother
    \chapter{TABLES}
        \makeatletter\@starttoc{lot}\makeatother
    \chapter{ACKNOWLEDGEMENT}
    \chapter{ABSTRACT}

    \mainmatter
    \chapter{INTRODUCTION}

    \begin{figure}
      \caption{Fig test}
    \end{figure}
    \begin{table}
      \caption{Tab Test}
    \end{table}

    \appendix
    \addtocontents{toc}{% NB!!! must be inside the first \include
        \protect\renewcommand\protect\cftchappresnum{\appendixname~}%
        \protect\setlength{\cftchapnumwidth}{\mylenapp}}%

    \backmatter
\end{document}
Related Question