1

How can I ger a line break after the label of a description environment item? I'd like to keep the indentation and the bold face for the item label, but I'd like to have the body of the item in a separate paragraph, because it starts with an itemize environment and indenting that looks really strange.

Adding \\ does not work (error message “no line to end here”), neither does a blank line or \par (no effect). Even \,\par has no effect.

Example:

\documentclass{article} \begin{document}

\begin{description}
\item[Animals:]
  \begin{itemize}
  \item Dog
  \item Cat
  \item Fish
  \end{itemize}
\item[Colors:]
  \begin{itemize}
  \item Red
  \item Green
  \item Blue
  \end{itemize}
\end{description}
\end{document}

It renders like this:

bad rendering

3

The insertion of an empty item seems to give a better vertical spacing. One can define a myitemize environment that includes this empty item; that will prevent typing it for each description item:

\documentclass{article}

\usepackage{enumitem}

\newenvironment{myitemize}%
{\begin{itemize}\item[]}
{\end{itemize}}

\begin{document}

\begin{description}[style = sameline, leftmargin = 1em]
\item[Animals:]
  \begin{itemize}
  \item[]
  \item Dog
  \item Cat
  \item Fish
  \end{itemize}

\item[Colors:]
  \begin{myitemize}
  \item Red
  \item Green
  \item Blue
  \end{myitemize}
\end{description}

\end{document} 

enter image description here

6

Adding \leavevmode also has the desired effect and looks reasonably clean.

\documentclass{article}
\begin{document}
\begin{description}
\item[Animals:]\leavevmode
  \begin{itemize}
  \item Dog
  \item Cat
  \item Fish
  \end{itemize}
\item[Colors:]\leavevmode
  \begin{itemize}
  \item Red
  \item Green
  \item Blue
  \end{itemize}
\end{description}
\end{document}

desired rendering

I came up with this answer while writing the question. When I started, \mbox{} was the best solution I had, and that felt sufficiently hackish that I wanted to look for a cleaner solution. Now I'm merely documenting my find.

2

I post a new answer because I feel this question is not a full duplicate of this one, which was voted to be closed. So here is my solution to the latter question, based on description, and a re-definition of \makedescriptionlabel. One can choose the left margin:

\documentclass{book}

\usepackage{enumitem, etoolbox}%
\renewcommand*{\descriptionlabel}[1]{\hspace\labelsep
\parbox{\linewidth}{\normalfont\bfseries #1}}
\newlist{mydescription}{description}{1}
\setlist[mydescription, 1]{style=nextline, leftmargin =4em, before=\renewcommand*{\descriptionlabel}[1]{\hspace\labelsep}}

\begin{document}

\begin{mydescription}%
  \item[C] Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text.

  Some more text. Some more text. Some more text. Some more text. Some more text. Some more text. Some more text.

  \item[C\textsuperscript{++}] Another text. Another text. Another text. Another text. Another text. Another text. Another text. Another text.

  \item[Python 3.4] Blah blah blah. Blah blah. Blah blah blah blah blah blah.
\end{mydescription}

\end{document} 

enter image description here

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.