[Tex/LaTex] Vertical spacing for paragraph environment

sectioningsections-paragraphsspacing

When I use \paragraph{...}, the vertical spaces in general are too big. I need to manually put \vspace{-5em} in front to adjust the spacing. It is not robust and unnatural. One reason may be that I have many big formulas (with many lines). Does anyone know a good way to adjust this vertical spacing automatically?

Best Answer

\paragraph in article class is defined by

\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\bfseries}}

so the skip before is 3.25 ex by default, so adding a negative -5em spacing would almost always make it over-print the preceding text.

You can repeat the above definition use \renewcommand instead of \newcommand and reduce the spacing. (It would need to be in a local package or between \makeatletter and \makeatother because of the @ in the command name.)

Are you sure you need to use \paragraph at all? It is not a commonly used command, it is just for 4th level sections after \section \subsection and \subsubsection