LaTeX forum ⇒ GeneralLine break directly after paragraph title

LaTeX specific issues not fitting into one of the other forums of this category.
Posts: 4
Joined: Fri Feb 22, 2008 5:31 pm

Line break directly after paragraph title

Postby NiklasF » Wed Apr 30, 2008 3:33 pm

Is it possible to get a line break after paragraph title? I've tried it manually with \\ but then I get the following response: " line to break here"

I would like something like a \subsubsubsection but without the numbering, is there a way?

By the way I'm using the article layout!

Thanks, Niklas.

User avatar
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Postby gmedina » Wed Apr 30, 2008 3:47 pm

You have to include some lines in the preamble: take a look at the followwing example:
  1. \documentclass{article}
  3. \makeatletter
  4. \renewcommand\paragraph{%
  5. \@startsection{paragraph}{4}{0mm}%
  6. {-\baselineskip}%
  7. {.5\baselineskip}%
  8. {\normalfont\normalsize\bfseries}}
  9. \makeatother
  11. \begin{document}
  13. \paragraph{A paragraph}
  14. some text text tetx
  16. \end{document}

User avatar
Stefan Kottwitz
Site Admin
Posts: 9366
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Apr 30, 2008 4:32 pm


gmedina's solution is working well! I had just one small thought while reading it: instead of a multiple of \baselineskip I would prefer a length with glue, because LaTeX can stretch and shrink that slightly (like with the other sectioning commands) to improve the page layout. One may see no difference, but in some cases one might. Similar to the source in article.cls I would write:
  1. \makeatletter
  2. \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
  3. {-3.25ex\@plus -1ex \@minus -.2ex}%
  4. {1.5ex \@plus .2ex}%
  5. {\normalfont\normalsize\bfseries}}
  6. \makeatother

glue is not the only advantage. Now it's not depending on \baselineskip, no problem with the case some macro would change the \baselineskip length. But as I said, gmedinas solution is working well and my code probably won't show a difference.

Site admin

Posts: 4
Joined: Fri Feb 22, 2008 5:31 pm

Postby NiklasF » Fri May 02, 2008 11:55 am

Excellent, thanks a bunch! Now I got a much nicer layout.

I would really be lost writing in Latex without an internet connection and your help, thanks!


Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests