Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using enumitem v3.2 (latest on MikTeX), and want to create a list that looks like this:

Some text describing my list:
    **Item 1**: some text that eventually wraps
         and hangs onto line two
    **Item 2**: some text that eventually wraps
         and hangs onto line two
Some more text

I've managed to create the following instead, using [labelindent=2em,itemindent=3em]:

Some text describing my list:
        **Item 1**: some text that eventually wraps
     onto line two
        **Item 2**: some text that eventually wraps
     onto line two
Some more text

I've been trying to make sense of the parameters in the enumitem documentation, but I seem not to be having any luck. When I tried making labelindent negative, that had no effect. I'm sure there's some simple way to achieve this, so I appeal to the wisdom of the crowds...

EDIT: Minimum (non-)working example follows

\documentclass{article}
\usepackage{enumitem}

\newlist{compactdesc}{description}{3}
\setlist[compactdesc]{topsep=0pt,partopsep=0pt,itemsep=0pt,parsep=0pt}

\begin{document}
\begin{figure}
  \emph{Example text}
  \begin{compactdesc}[labelindent=2em,itemindent=3em]\raggedright
  \item[Loren ipsum:] dolor sit amet, consectetur adipiscing
    elit. Duis tincidunt mi ut purus varius aliquet posuere enim
    ultricies.
  \item[Ut aliquet:] mi vel lacus dictum iaculis. Aenean vestibulum
    pharetra magna, sit amet venenatis velit posuere ut.
  \item[Fusce viverra:] commodo erat, quis feugiat purus tempor sit
    amet. Nulla tincidunt erat nec diam porta accumsan.
  \end{compactdesc}
\end{figure}
\end{document}
share|improve this question
    
Can you show the code you used? A simple example like this works are you would expect. –  Alan Munn Jul 12 '11 at 22:19

1 Answer 1

up vote 4 down vote accepted

Try setting the leftmargin rather than the itemindent.

\documentclass{article}
\usepackage{enumitem}

\newlist{compactdesc}{description}{3}
\setlist[compactdesc]{topsep=0pt,partopsep=0pt,itemsep=0pt,parsep=0pt}

\begin{document}
\begin{figure}
  \emph{Example text}
  \begin{compactdesc}[leftmargin=5em,labelindent=3em]\raggedright
  \item[Loren ipsum:] dolor sit amet, consectetur adipiscing
    elit. Duis tincidunt mi ut purus varius aliquet posuere enim
    ultricies.
  \item[Ut aliquet:] mi vel lacus dictum iaculis. Aenean vestibulum
    pharetra magna, sit amet venenatis velit posuere ut.
  \item[Fusce viverra:] commodo erat, quis feugiat purus tempor sit
    amet. Nulla tincidunt erat nec diam porta accumsan.
  \end{compactdesc}
\end{figure}
\end{document}
share|improve this answer
1  
Thanks, that works exactly as intended. (I'd love to see a better diagram of which direction--left or right--each of the five horizontal parameters pushes the text around. As the enumitem package author notes, he intends to improve the existing figures in a future release :-p) –  Ben Lerner Jul 12 '11 at 23:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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