1

I would like to have the "bullets" of my itemize items line up horizontally with the start of the labels in my description lists. Here's an M(almost)WE:

\documentclass[10pt, varwidth, convert={size=640, density=600}, border=2]{standalone}
\usepackage{enumitem}
    \setlist[description]{nosep, topsep=0pt, labelindent=1em}
    \setlist[itemize]{nosep, topsep=0pt, labelindent*=1em, label={\textbf{--}}}

\begin{document}
\begin{itemize}
    \item First Item
    \item Second Item
    \item Third Item
\end{itemize}

\begin{description}
    \item[Label] First Item
    \item[Another Label] Second Item
    \item[Yet Another Label] Third Item
\end{description}
\end{document}

Output of my MWE

I've played with many permutations of labelindent(*), leftmargin, itemindent, etc. but can't seem to get the behavior I desire. Can someone explain the enumitem spacing system?

EDIT: The proposed solution with wide almost works:

\documentclass[10pt, varwidth, convert={size=640, density=600}, border=2]{standalone}
\usepackage{enumitem}
    \setlist[description]{nosep, labelindent=1em}
    \setlist[itemize]{nosep, wide=1em, label={\textbf{--}}}

\begin{document}
\begin{itemize}
    \item First Item
    \item Second Item with a really long amount of text that causes it to go onto a second line because I'm trying really hard to write a long sentence here.
    \item Third Item
\end{itemize}

\begin{description}
    \item[Label] First Item
    \item[Another Label] Second Item with a really long amount of text that causes it to go onto a second line because I'm trying really hard to write a long sentence here.
    \item[Yet Another Label] Third Item
\end{description}
\end{document}

Output of the modified MWE

I'd like to have the same "hanging indent" behavior in both lists. In particular, I'd prefer to have continuing lines indented, matching the description list here.

3

Use the wide option (not the widest) and play with leftmargin:

\documentclass[10pt, border=4pt, varwidth]{standalone}
\usepackage{enumitem}
    \setlist[description]{nosep, topsep=0pt, labelindent=1em, leftmargin=\dimexpr\leftmargini-\fontdimen2\font\relax}%
    \setlist[itemize]{nosep, topsep=0pt, wide = 1em, label={\textbf{--}},leftmargin=*}

\begin{document}

\begin{itemize}
    \item First Item
    \item Second Item with a really long amount of text that causes it to go onto a second line because I'm trying really hard to write a long sentence here.
       \item Third Item
\end{itemize}

\begin{description}
    \item[Label] First Item.
    \item[Another Label] Second Item with a really long amount of text that causes it to go onto a second line because I'm trying really hard to write a long sentence here.
    \item[Yet Another Label] Third Item
\end{description}

\end{document} \setlist[description]{nosep, labelindent=1em}
\setlist[itemize]{nosep, wide=1em, label={\textbf{--}}}

enter image description here

  • topsep=0pt is unnecessary, isn't it? nosep already zeroes it ... – cfr Dec 12 '16 at 1:41
  • I guess so. As it was there, I left it. I noticed once that noitemsep, for instance, was not exactly itemsep=0pt, for a reason I don't really understand (probably the same reason which made a French humorist declare a temperature of –0° was colder than 0°. – Bernard Dec 12 '16 at 1:47
  • Yes, but topsep=0pt is making it rigid, when it is almost certainly better to leave it stretchy. This way, there is stretchy glue between items, but none before the list, which means you may get more space between them than before the list. I guess that might be wanted, but it seems statistically unlikely. – cfr Dec 12 '16 at 1:51
  • I don't think it would look nice anyway. – Bernard Dec 12 '16 at 1:55
  • Well, yes, there is that. This is certainly going to look pretty ugly. I guess maybe it could be slightly less ugly, but killing all vertical space is never going to look good, as you say. – cfr Dec 12 '16 at 1:59

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.