8

I have a itemize list within a description list. Each description defines a item and the content is an itemize list. (As per the code example below and the output at the end of this question)

\documentclass[a4paper,11pt]{article}
\begin{document}
\begin{description}
    \item[foo bar foo bar] 
    \begin{itemize}
        \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
        \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
    \end{itemize}
    \item[bar foo]
    \begin{itemize}
        \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
        \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
    \end{itemize}

\end{description}
\end{document}

I would like my itemize list to be flush left but with no other content the list starts to the right of the description item. If I try to end the line by going

    \item[foo bar foo bar] \

I get the following complaint

! LaTeX Error: There's no line here to end.

Which seems reasonable, there is no line to end. How do I force latex to start the itemize list below the description?

Output

Output

  • 3
    Just add \mbox{} in front of \\ – egreg Dec 20 '13 at 15:54
  • @egreg This works, but gives a warning Underfull \hbox (badness 10000) in paragraph (at least for me). – someonr Dec 20 '13 at 15:57
  • Using just \mbox{} on its own works without any warning – Christopher Hackett Dec 20 '13 at 16:00
  • 1
    Even simpler: \item[foo]~ without \\ (yes, really this add some content, but hopefully without causing the end of the world or some other disaster). – Fran Feb 23 '16 at 7:17
15

Just use \mbox, as said, or add a first empty item (\item[]) in the itemize environment. The vertical spacing is better in the second case, in my opinion.

documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}

\begin{description}
\item[foo bar foo bar]
\begin{itemize}
      \item[]  
    \item{\bfseries (with empty \verb+\item+)} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
\item[bar foo]\mbox{}
\begin{itemize}
    \item{\bfseries (with \verb+\mbox{}+)} Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
    \item Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
\end{itemize}
\end{description}  
\end{document}    

Result:

Not the answer you're looking for? Browse other questions tagged or ask your own question.