GeneralCustomized Table of Content

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
waelyafooz
Posts: 7
Joined: Fri Dec 06, 2013 2:46 pm

Customized Table of Content

Post by waelyafooz »

Hi to all,
I new to latex , please i need you help .
i am writing my thesis and i face problem with table of content , i want to remove the space between the first part of my table of content which is

AUTHOR'S DECLARATION i
ABSTRACT ii
ACKNOWLEDGEMENTS iii
TABEL OF CONTENT iv
LIST OF FIGURES v
LIST OF ABBRAVIATIONS

Then PUT DOUBLE SPACING using vertical space by 0.5cm
then the second part of table of content appear which is
CHAPTER ONE INTRODUCTION 1
1.1 rst section 1
1.2 second section 1
CHAPTER TWO INTRODUCTION 2
2.1 rst section 2
2.2 second section 2

Note : between the chapter one and two vertical space by 0.3 cm .
i used as the following:

Code: Select all

    %\documentclass[a4paper]{article}
    \documentclass[12pt,english]{report}

    \setlength{\parindent}{1.27cm}

    \usepackage{setspace}
    \onehalfspacing
    \usepackage{titlesec, blindtext, color}
    \usepackage[font=small,labelfont=bf,justification=centering]{caption}
    \usepackage{geometry}

    \geometry{
      verbose,
      tmargin=2cm,
      bmargin=2.5cm,
      lmargin=3.8cm,
      rmargin=2.5cm
    }
    \newcommand{\mychapter}[3][]{%
    \setcounter{chapter}{#3}
    \setcounter{section}{0}
    \chapter*{#2}
    \if\relax\detokenize{#1}\relax
      \addcontentsline{toc}{chapter}{#2}
    \else
      \addcontentsline{toc}{chapter}{#1}
    \fi
    }
\usepackage{tocloft}  % use for th next command in order to remove dots
\renewcommand{\cftdot}{} % remove dots of table of content
\renewcommand{\cfttoctitlefont}{\hfil\bf} 
    \begin{document}
    \pagenumbering{roman}
    \setcounter{page}{1}
      \titlespacing*{\chapter}{10pt}{0pt}{10pt}
      \titleformat{\chapter}[display]
          {\centering\normalfont\large\bfseries}{ \chaptertitlename\ \thechapter}{0pt}{\large}
          
          \include{declartion}
          
          \addcontentsline{toc}{chapter}{\numberline{} AUTHOR'S  DECLARATION} \vspace*{-1cm} %
          
          %\abstract{\addtocontents{toc}
          
          \newpage
          
          \addcontentsline{toc}{chapter}{\numberline{}ABSTRACT} {\vspace*{6cm}}%
          \include{abstract}
          \newpage
          \chapter*{ACKNOWLEDGEMENTS}%
          \addcontentsline{toc}{chapter}{\numberline{}ACKNOWLEDGEMENTS} {\vspace{7em}}%
          \newpage
          
          \tableofcontents
          
          \addcontentsline{toc}{chapter}{\numberline{}TABEL OF CONTENT} %{\vspace{-5em}}%
          
          \newpage
          \listoffigures
          \addcontentsline{toc}{chapter}{\numberline{}LIST OF FIGURES} %{\vspace{-6em}}%
          \addcontentsline{toc}{chapter}{\numberline{}LIST OF ABBRAVIATIONS} % {\vspace{-6em}}%
          \newpage

          
          \newpage
          \tableofcontents
          
           \titlespacing*{\chapter}{10pt}{0pt}{10pt}
            \titleformat{\chapter}[display]
                {\centering\normalfont\large\bfseries}{ \chaptertitlename\ \thechapter}{40pt}{\large}
\mychapter[CHAPTER ONE INTRODUCTION]{CHAPTER ONE\\INTRODUCTION}{1} % the problem if happen fron centering
\pagenumbering{arabic}
sfsdfsf
sfsdfsf
\section{first section}
This is section one in chapter one.
\section{second section }

This is section two  in chapter one.
\mychapter[CHAPTER TWO INTRODUCTION]{CHAPTER TWO \\INTRODUCTION}{2} % the problem if happen fron centering
\section{first section}
This is section one in chapter TWO.
\section{second section }
This is section two  in chapter TWO.
          \end{document}



Many thanks for all

Recommended reading 2024:

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

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

Post Reply