# How to get new line after \subparagraph title?


-
What documentclass are you using? –  Harald Hanche-Olsen Jan 2 '11 at 13:05
I use article... –  user1996 Jan 3 '11 at 0:08

You didn't specify the document class, so I assume for the moment you're using a standard class. The titlesec package offers a way to change the definition of \section & friends.

\documentclass{article}

\usepackage{titlesec}

% Definition of \subparagraph emulating that of the standard classes
% \titleformat{\subparagraph}[runin]
%     {\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}
% \titlespacing*{\subparagraph}{\parindent}{3.25ex plus 1ex minus .2ex}{1em}

% Definition of \subparagraph starting new line after heading
\titleformat{\subparagraph}
{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}
\titlespacing*{\subparagraph}{\parindent}{3.25ex plus 1ex minus .2ex}{.75ex plus .1ex}

\begin{document}

\subparagraph{foo}

Some text.

\end{document}


EDIT: Herbert's answer reminded me that the vertical space after the subparagraph heading should be stretchable. Code example changed accordingly.

-
\documentclass{article}
\makeatletter
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{0.75ex plus 0.1ex}% space after heading
{\normalfont\normalsize\bfseries}}
\makeatother

\begin{document}

\subparagraph{foo}

I'm sorry but this is really bad advice. The already posted solutions are better and in general you should almost never use \\  in a document other than to end table rows. The visual layout of headings should be specified by the document class, perhaps as modified in the preamble, not with forced spacing within the document. –  David Carlisle Apr 2 '13 at 22:24