I'm currently having troubles changing the vertical spacing from a paragraph headline to the succeeding body text. What I want to have is a newline after the paragraph heading. As I understood the new \RedeclareSectionCommand
applies afterskip=1sp
a newline (singlespacing) between the paragraph section and its body text. Somehow this is not working the way I want it to have. My code looks right now something like (MWE):
\documentclass[12pt,english,parskip=half*,listof=nochaptergap,final]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{setspace}
\RedeclareSectionCommands[
beforeskip=-3.25ex plus -1ex minus -0.2ex,
afterskip=1sp,
%indent=0pt
]{paragraph,subparagraph}
\onehalfspacing
\begin{document}
\paragraph{Test paragraph}
Test test test test test \\
Test test test test test
\end{document}
What I want to have is a newline after a paragraph and if it is possible, an option to customize the vertical spacing myself.
— SOLUTION —
Just in case someone is as weird as me, just remove parskip=half*
from the document options, and you are good to go! THANK YOU @esdd!!!
Best Answer
Update
KOMA-Script version 3.26 introduces two new keys to
\RedeclareSectionCommand
and\RedeclareSectionCommands
:runin
andafterindent
. Possible values for both keys arebysign
,true
andfalse
. For more information see the KOMA-Script documentation or eg Adjusting spacing around section/subsection titles with koma-script.Using the new key
runin
with valuefalse
¹ it is possible to remove the\parskip
between the heading and the following text byafterskip=-\parskip
.Example:
¹ Default setting is
runin=bysign
which results in the same behavior as in the original answer.Original answer
The vertical space between a heading and the following text is at least the same as the space between two paragraphs in the text body. That means if you are using a parskip instead a parindent (because of
parskip=half*
) the space between a heading and the following text is at least the same as this parskip.Code:
A positive value of
afterskip
for a section command enlarges the vertical skip by this value. With negative value ofafterskip
the text the starts in the same line as the heading and the value ofafterskip
is used as a horizontal skip.Code:
So remove
parskip=half*
from your class options. Then parindent is used instead parskip and only the positive value ofafterskip
is used as vertical skip between the heading and the following text.Code:
If you really want or need
parkip=half
and remove the parskip between theparagraph heading
you could useBut I do not recommend this, because it is unusual to have a smaller space between a heading and the following text as between two paragraphs in the text body.