[Tex/LaTex] Too much space after sections when I change parskip

parskipsectioningspacing

I changed the parident and parskip of my document. But now there is a huge empty space after the sections. How can I reduce the space after a section?

\documentclass[12pt,a4paper]{scrartcl}
\begin{document}
\setlength\parindent{0pt}
\setlength{\parskip}{\baselineskip}
\section{Test}
\subsection{Test}
Test test test test.

Test test test test.

\subsection{Test}
Test test test test.

Test test test test.
\end{document}

Best Answer

You should probably use the parskip package rather than changing those values yourself. As for the spacing, you can use \titlespacing from the titlesec package to change the spacing. For example

\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt}

seems more or less reasonable for the spacing around the \section. Something similar would be needed for for \subsection and \subsubsection.

Related Question