I would like to know how I can define the vertical space between:

  • a previous section and the new section title;
  • the new section title and the following text.

Now it looks like both space measure the same.


The solution depends on the document class. Usually \section is defined \@startsection that is defined in the LaTeX kernel. The article class defines \section the following way:

\newcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%

source2e documents the options for the 4th and 5th argument of \@startsection that controls the spaces before and after the section title:


beforeskip: Absolute value = skip to leave above the heading. If negative, then paragraph indent of text following heading is suppressed.

afterskip: if positive, then skip to leave below heading, else negative of skip to leave to right of run-in heading.

Example that redefines \section with doubled spaces:

\section{Section A}
\section{Section B}

\@startsection {section}{1}{\z@}%
  {-7ex \@plus -3ex \@minus -.4ex}%
  {4.6ex \@plus.4ex}%
\section{New Section C}
\section{New Section D}


|improve this answer|||||

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.