# How to customize line spacing on the ToC

I've googled related to this problem. Most of them only discuss about consistent line spacing on the ToC.

So, I want my ToC to exactly look like this. By default, we know the space between chapter and section shorter than the space between chapter to chapter. If I can, as shown on the image link description above, I want The gap between ToC title and list contents has 4 line spacing, the first part has 0.5 line spacing as well as the line spacing of the second part and the third part, and the gap between each part has 3 line spacing.

On the second part, I want the space between chapter and section has 0.5 line spacing as well, so there is no default short space between chapter and section anymore. Please note and notice that my image link on the second part might have difference as I described here, that is the space between the chapter and the section.

So, this is my attempt:

\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage[titles]{tocloft}
\usepackage{tocbibind}
\fancyhf{}
\cfoot{\thepage}
\pagestyle{plain}
\renewcommand\cftchapdotsep{\cftdotsep}
\titleformat{\chapter}[display]
{\normalfont\bfseries\centering}
{\chaptertitlename \thechapter}{12pt}{}
\titlespacing*{\chapter}{0pt}{10pt}{40pt}

\setlength\parindent{1.25cm}
\begin{document}

\clearpage
\thispagestyle{empty}

\frontmatter

\pagestyle{fancy}

%PART ONE:
\chapter*{DEDICATION}
\blindtext
\chapter*{ABSTRACT}
\blindtext
\chapter*{PREFACE}
\blindtext

\begin{spacing}{0.1}

\tableofcontents
\listoffigures
\listoftables

\end{spacing}

\mainmatter %

%PART TWO:
\chapter*{CHAPTER 1 HELLO}
\blindtext
\section{HELLO 2}
\blindtext
\section{HELLO 3}
\blindtext
\chapter*{CHAPTER 2 HELLO 4}
\blindtext
\section{HELLO 5}
\blindtext
\section{HELLO 6}
\blindtext

%PART THREE:
\chapter*{APPENDIX}
\blindtext
\chapter*{VIT}
\blindtext

\end{document}


I have modified your MWE to hopefully give the vertical spacing that you want in the ToC.

% tocspaceprob.tex SE 556782
\documentclass[a4paper,12pt,oneside,openany]{book}
\usepackage[a4paper, inner=4cm, outer=3cm, top=4cm, bottom=3cm]{geometry}
\usepackage{blindtext}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage[titles]{tocloft}
\usepackage{tocbibind}
\fancyhf{}
\cfoot{\thepage}
\pagestyle{plain}
\renewcommand\cftchapdotsep{\cftdotsep}
\titleformat{\chapter}[display]
{\normalfont\bfseries\centering}
{\chaptertitlename \thechapter}{12pt}{}
\titlespacing*{\chapter}{0pt}{10pt}{40pt}

\setlength\parindent{1.25cm}
\begin{document}

\clearpage
\thispagestyle{empty}

\frontmatter

\pagestyle{fancy}

%PART ONE:
\chapter{DEDICATION}   %%% use \chapter, not chapter* in frontmatter
\addtocontents{toc}{\setlength{\cftbeforechapskip}{4pt}} % change vertical space befor chapters in ToC
\blindtext
\chapter{ABSTRACT}
\blindtext
\chapter{PREFACE}
\blindtext

\begin{spacing}{0.1}

\tableofcontents
\listoffigures
\listoftables

\end{spacing}

\mainmatter %

%PART TWO:
\addtocontents{toc}{\setlength{\cftbeforechapskip}{12pt}} % change vertical space before chapters in ToC
%\chapter*{CHAPTER 1 HELLO}
\chapter{HELLO}\blindtext
\section{HELLO 2}
\blindtext
\section{HELLO 3}
\blindtext
\chapter*{CHAPTER 2 HELLO 4}
\blindtext
\section{HELLO 5}
\blindtext
\section{HELLO 6}
\blindtext

%PART THREE:
\chapter*{APPENDIX}

I think that your code is much more involved than it need be. For instance using \chapter instead of \chapter* ... \addcontents... in the \frontmatter gives you the entries you want in the ToC.. There are ways of putting CHAPTER before chapter titles in the ToC without having to use \chapter* with the chapter number and title, which of course messes up the section numbering.
• For some reason, I need chapter*{•••} rather than chapter{•••}. But it still works to get vertical space on the TOC. Thank you for the help, I really appreciate it. Jul 31 '20 at 23:20