[Tex/LaTex] Empty line after \paragraph

formattingsectioningsections-paragraphs

In order to have a subsubsubsection I have used \paragraph. The problem is that I get text immediately after the tittle. How do I get an empty line after \paragraph?

Best Answer

Using titlesec:

\documentclass{article}
\usepackage{titlesec}

\titleformat{\paragraph}
  {\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}
  {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\begin{document}

\section{A test section}
text
\subsection{A test subsection}
text
\subsubsection{A test subsubsection}
text
\paragraph{A test paragraph}
text

\end{document}

enter image description here

Without packages, simply copy the definition of \paragraph from your class and adjust the fourth and fifth arguments of \@startsection; for example:

\documentclass{article}

\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {-3.25ex \@plus1ex \@minus.2ex}% original: without the minus
                                    {1.5ex plus .2ex}% original {-1em}%
                                    {\normalfont\normalsize\bfseries}}
\makeatother

\begin{document}

\section{A test section}
text
\subsection{A test subsection}
text
\subsubsection{A test subsubsection}
text
\paragraph{A test paragraph}
text

\end{document}

To have paragraphs with numbering, add

\setcounter{secnumdepth}{4}

to the preamble; to include them in the ToC, add also

\setcounter{tocdepth}{4}