[Tex/LaTex] Reducing the space between the items of List of figures and List of tables

spacing

I need to reduce the space to half between the entries of list of table and list of figures.I want the space to be equal irrespective of the different chapters the entry belongs to. My code in part is as under:

\documentclass[a4paper,12pt,oneside]{report}
\usepackage[left=3.81cm,right=2.54cm,top=2.54cm,bottom=2.54cm]{geometry}

....
addcontentsline{toc}{chapter}{References}


..... (I added this patch to remove any extra space between entries from different chapters, and it worked for me but I am unable to reduce the spacing overall)

   \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<succes>}{<failure>}
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}% LoF
\patchcmd{\@chapter}{\addtocontents{lot}{\protect\addvspace{10\p@}}}{}{}{}% LoT
\makeatother
%

Best Answer

enter image description here

When you load tocloft package, the spacing between entries in ToC will be stored in \cftsecafterpnum for sections and \cftsubsecafterpnum for subsections. In LoF, it is stored in \cftfigafterpnum. To set the spacing you can use a code like this

\newlength{\toclineskipl}
\setlength{\toclineskipl}{0.5\baselineskip}

\renewcommand{\cftfigafterpnum}{\vspace{\toclineskipl}} % for figures
\renewcommand{\cftsecafterpnum}{\vspace{\toclineskipl}} % for sections
\renewcommand{\cftsubsecafterpnum}{\vspace{\toclineskipl}} % for subsections

Just set \toclineskipl to whatever length you want which in turn sets the spacing between ToC and LoF entries.

A full sample code

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[showframe]{geometry}
\geometry{top=15mm,left=15mm}

\usepackage{tocloft}
\newcommand{\toctitlefont}{\LARGE \bfseries}
\renewcommand{\cfttoctitlefont}{\centering \toctitlefont}

% Spacing between lines
\newlength{\toclineskipl}
\setlength{\toclineskipl}{0.5\baselineskip}

\renewcommand{\cftfigafterpnum}{\vspace{\toclineskipl}}
\renewcommand{\cftsecafterpnum}{\vspace{\toclineskipl}}
\renewcommand{\cftsubsecafterpnum}{\vspace{\toclineskipl}}

\usepackage{blindtext}

\begin{document}

\listoffigures
\tableofcontents
\blinddocument



\begin{figure}[h t p]

    \centering

    \includegraphics[trim = 0mm 0mm 0mm 0mm, clip, width=0.48\textwidth]{example-image-a}

    \caption{Caption of Figure 1}

\end{figure}


\begin{figure}[h t p]

    \centering

    \includegraphics[trim = 0mm 0mm 0mm 0mm, clip, width=0.48\textwidth]{example-image-a}

    \caption{Caption of Figure 2} 

\end{figure}

\begin{figure}[h t p]

    \centering

    \includegraphics[trim = 0mm 0mm 0mm 0mm, clip, width=0.48\textwidth]{example-image-a}

    \caption{Caption of Figure 3}

\end{figure}

\begin{figure}[h t p]

    \centering

    \includegraphics[trim = 0mm 0mm 0mm 0mm, clip, width=0.48\textwidth]{example-image-a}

    \caption{Caption of Figure 4}

\end{figure}

\begin{figure}[h t p]

    \centering

    \includegraphics[trim = 0mm 0mm 0mm 0mm, clip, width=0.48\textwidth]{example-image-a}

    \caption{Caption of Figure 5}

\end{figure}

\end{document}