1

The enumitem package has a style=nextline option that can be used to make labels in description environments sit on their own line. This works really well unless you want to nest description, itemize or enumerate environments when it fails and produces:

enter image description here

To try and fix this I have tried playing around with the enumitem options and doing things like putting \newline, \quad``\hfil, \hss, ... after the \item[...] command but I have not found anything that works and most of the time these "fixes" result in an extra blank line appearing between the item line and the nested environment.

The same thing happen with nested description and enumerate environments. Can anyone see how to fix this?

Here is a MWE exhibiting the problem.

\documentclass{article}
\usepackage{enumitem}
\begin{document}

  \begin{description}[style=nextline]
    \item[First item] Some text
    \item[Second item] Some text
    \item[Third item]\hfill
      \begin{itemize}
        \item Nested itemise
        \item Nested itemise
      \end{itemize}
    \item[Fourth item] Some text
  \end{description}

\end{document}

EDIT

One manual hack that does fix the problem is putting \hfil after the \item[...] command and then adding \vskip-6mm after the next item. It's not exactly elegant and it would be better to find a solution using the tools provided by enumitem. Here's the hack:

\documentclass{article}
\usepackage{enumitem}
\begin{document}

  \begin{description}[style=nextline]
    \item[First item] Some text
    \item[Second item] Some text
    \item[Third item]\hfil
      \begin{itemize}
        \item \vskip-6mm Nested itemise
        \item Nested itemise
      \end{itemize}
    \item[Fourth item] Some text
  \end{description}

\end{document}
2

Here is such a solution (I think):

\documentclass{article}
\usepackage{enumitem}

\begin{document}

\begin{description}[style=nextline]
  \item[First item] Some text
  \item[Second item] Some text
  \item[Third item]%
  \begin{itemize}[before=\leavevmode\vspace*{-\dimexpr2\topsep + \baselineskip\relax}]
    \item Nested itemise
    \item Nested itemise
  \end{itemize}
  \item[Fourth item] Some text
\end{description}

\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.