3

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

7

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}
  • it did work but how can I make so that I get a 1.1.1.1? – PhoenixPerson Jul 30 '14 at 22:26
  • @silvrfück Add \setcounter{secnumdepth}{4} to the preamble; to include them in the ToC, add also \setcounter{tocdepth}{4}. I added this to my answer. – Gonzalo Medina Jul 30 '14 at 23:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.