12

I have the following LaTeX code:

\documentclass{article}
\begin{document}
\begin{description}

\item[foo]
bar

\item[baz]

bang

\end{description}

\end{document}

and it produces the following PDF:

Screen shot of PDF

I want the definition of the item (in this case the "bar" and the "bang") to be on a separate line from the item (eg the "foo" and the "baz").

However this is part of a system that autogenerates documention, so I can't change the source code. I can put style things in the header of each documention, so I need some sort of LaTeX command that will make all definition list (in LaTeX speak, a "descripition list") go onto a new line.

18 accepted

You can do that with a \hfill, and no extra package or multiple lines of code are needed :)

\begin{description}
  \item[First] \hfill \\
  The first item
  \item[Second] \hfill \\
  The second item
  \item[Third] \hfill \\
  The third etc \ldots
\end{description}

Also contributed here: http://en.wikibooks.org/wiki/LaTeX/Formatting#Description

5

With this the label of the first level (of description environment) is aligned with the rest of the text and description texts are aligned with labels. I hope this is about what you want.

\let\origdescription\description
\renewenvironment{description}{
  \setlength{\leftmargini}{0em}
  \origdescription
  \setlength{\itemindent}{0em}
  \setlength{\labelsep}{\textwidth}
}
{\endlist}
3

You could try something like

\usepackage{enumitem}
\setdescription{labelsep=\textwidth}

but a little more massaging is needed with the values of labelindent, etc., to avoid overfull boxes. To first order, however, this gives you the output you're looking for.