[Tex/LaTex] How to change spacing before and after \paragraph command

sectioningsections-paragraphsspacing

I tried to control the spacing before \paragraph{} using a command such as

\setlength{\parskip}{3pt plus 1pt minus 1pt}

but that doesn't influence it. (It influences spacing between regular paragraphs).

How do I control the space before \paragraph?

Best Answer

As egreg stated in his comment, \paragraph should not be used to start a text paragraph, but only (if at all) to use the structuring level 'paragraph', which is already below subsubsection.

If there are subsubsection levels, it's ok (in some sense) to reduce the space, but this is a matter of taste.

I used the \xpatchcmd to replace the paragraph spacings

{3.25ex \@plus1ex \@minus.2ex}

by

{3pt plus 1pt minus 1pt}

Have a look on the screenshot!

\documentclass{report}
\usepackage{xpatch}


\usepackage{blindtext}



\begin{document}

\noindent Unpatched 

\paragraph{First}

\paragraph{Second}


\blindtext[1]


Now patching it... compare!

\makeatletter
\xpatchcmd{\paragraph}{3.25ex \@plus1ex \@minus.2ex}{3pt plus 1pt minus 1pt}{\typeout{success!}}{\typeout{failure!}}
\makeatother

\paragraph{First}
\paragraph{Second}

\blindtext[1]


\end{document}

enter image description here

Related Question