I have the following TOC:

section 1
subsection 1.1 ...................... 2

section 2 subsection 2.1 ...................... 2

How can i reduce the spacing between the first 'group' of items related to section 1 and between the second 'group' of items related to section 2?

I know how to decrease the spacing between items of the same group, e.g., between all subsections of section 2.

I've seen similar posts but i couldn't apply the provided solutions.


This is defined as part of the function that sets the \section heading in the ToC, known as \l@section. Here's its definition inside article.cls:

  \ifnum \c@tocdepth >\z@
    \addvspace{1.0em \@plus\p@}%
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par

Note the use of \addvspace{<space>} which inserts a vertical gap up to the <space> provided. You can change (or remove) this using the following etoolbox patch:

enter image description here


\patchcmd{\l@section}% <cmd>
  {\addvspace{1.0em \@plus\p@}}% <search>
  {}% <replace>
  {}{}% <success><failure>



\section{A section}
\subsection{A subsection}
\subsection{Another subsection}

\section{Another section}
\subsection{A subsection}
\subsection{Another subsection}


The same can be achieved using tocloft:

  • great, the tocloft thing works (and it's actually neat and concise)! – Squera Dec 16 '15 at 11:46

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.