jbezos / enumitem

Customize enumerate, itemize and description
MIT License
48 stars 5 forks source link

Inline description list has spurious \hfil spaces #38

Open schtandard opened 2 years ago

schtandard commented 2 years ago

Inline description* lists (when not unboxed) seem to add a spurious \hfil to every afterlabel. itemize* and enumerate* do not have this behavior. (Prompted by this tex.sx question.)

In the following MWE, I removed all spacing from the inline list for clarity.

\documentclass{article}

\usepackage[inline]{enumitem}

\parindent=0pt
\usepackage{showframe}

\begin{document}

before
\begin{description*}[itemjoin={}, afterlabel={}]
  \item[first] one
  \item[second] two
  \item[third] three
\end{description*}
after

\end{document}

image

jbezos commented 2 years ago

Here is a workaround (for the original question in tex.sx):

\SetLabelAlign{none}{#1}

\newlist{inlinedesc}{description*}{1}
\setlist[inlinedesc]{align=none, itemjoin={{ $\odot$ }}, itemjoin*={{ and }}}