8

I would like to reduce the spacing between the chapter entries in my table of content. I haven't been able to find a problem similar to what I would like solved.

A minimal work of my report is shown below. This gives a large spacing in the table of content between eg. results and conclusion, between conclusion and Appendix A and so on.

\documentclass[12pt,a4paper,fleqn]{report}

\begin{document}

\tableofcontents 

\chapter{introduction}
\section{first section}
\section{second section}

\chapter{Main matter}
\chapter{Results}
\chapter{Conclusion}
\chapter{Appendix A}
\chapter{Appendix B}
    
\end{document}

enter image description here

0
7

You can use the tocloft package and its \cftbeforechapskip command to achieve your desired spacing:

\documentclass[12pt,a4paper,fleqn]{report}
\usepackage[titles]{tocloft}
\setlength{\cftbeforechapskip}{3pt}
\begin{document}

\tableofcontents 

\chapter{introduction}
\section{first section}
\section{second section}

\chapter{Main matter}
\chapter{Results}
\chapter{Conclusion}
\chapter{Appendix A}
\chapter{Appendix B}

\end{document}

OUTPUT:
enter image description here

5

Or you could use package tocbasic:

\documentclass[12pt,a4paper,fleqn]{report}

\usepackage{tocbasic}
\DeclareTOCStyleEntry[
  beforeskip=.2em plus 1pt,% default is 1em plus 1pt
  pagenumberformat=\textbf
]{tocline}{chapter}

\begin{document}
\tableofcontents 
\chapter{introduction}
\section{first section}
\section{second section}
\chapter{Main matter}
\chapter{Results}
\chapter{Conclusion}
\chapter{Appendix A}
\chapter{Appendix B}
\end{document}

Result:

enter image description here

3

You can do that in a simple way with titletoc. In the following code, the vertical spacing aboce the entrys is set in the first mandatory argument of the \titlecontents command. I set it to \medskip for chapters, but you change it at will:

\documentclass[12pt,a4paper,fleqn]{report}

\usepackage[utf8]{inputenc}
\usepackage{titletoc}

    \titlecontents{chapter}
    [0em] %
    {\medskip\bfseries}
    {\thecontentslabel\quad}%numbered chapters
    {}%numberless chapter
    {\hfill\contentspage}

    \titlecontents{section}[1.72em]{\smallskip}%
    {\thecontentslabel.\enspace}%numbered sections
    {}%numberless section
    {\titlerule*[1.2pc]{.}\contentspage}%

\begin{document}

\tableofcontents

\chapter{introduction}
\section{first section}
\section{second section}

\chapter{Main matter}
\chapter{Results}
\chapter{Conclusion}
\chapter{Appendix A}
\chapter{Appendix B}

\end{document} 

enter image description here

2

With titletoc the following did the trick for me:

\usepackage{titletoc}

\titlecontents{chapter}
    [0em] %
    {\bfseries}
    {Chapter \thecontentslabel\quad}%numbered chapters
    {}%numberless chapter
    {\hfill\contentspage}

\titlecontents{section}[1.72em]{\vspace{-10pt}}%
    {\thecontentslabel.\enspace}%numbered sections
    {}%numberless section
    {\titlerule*[0.5pc]{.}\contentspage}%

Note the negative vspace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.