jbezos / enumitem

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

DrawEnumitemLabel still seem to have issues #16

Closed FrankMittelbach closed 5 years ago

FrankMittelbach commented 5 years ago

Consider the following input:

\documentclass{article}
\pagestyle{empty}

\setlength\textwidth{149.0pt}

\tolerance=2000

\usepackage{enumitem}
\setlist{listparindent=10pt,noitemsep,first=\DrawEnumitemLabel}

\begin{document}

\begin{description}[left=-10pt..10pt]
\item[Label] This has an ugly hole. 
And a bit more text to fill the paragraph
\end{description}

\begin{description}[left=-10pt..10pt,labelwidth=!]
\item[Label] labelwidth needs to be recalculated!
\end{description}
\end{document}

This gives

bildschirmfoto 2019-02-08 um 13 39 34

with the labelindent shown as negative but in the wrong place.

In general it might also be nice to show itemindent as a fifth rule (feature request) would perhaps help the user to understand what is happening on the first description env.

jbezos commented 5 years ago

Oh no! I begin to hate description.

FrankMittelbach commented 5 years ago

The issue is not with description though I think the left key would be better usable if it automatically recomputes labelwidth in case of description (but that is a different story).

jbezos commented 5 years ago

I'll investigate, but I don't know when. I'm considering removing this feature altogether, because it's not essential - just a tool, and the list parameters are confusing enough to add even more confusion.

jbezos commented 5 years ago

I summarise the problem. \DrawEnumitemLabel must display correctly the rules in both lists in:

\documentclass{article}

\usepackage{enumitem}
\setlist{first=\DrawEnumitemLabel}

\begin{document}

\begin{itemize}[labelindent=-10pt,itemindent=!]
\item  This results in \texttt{itemindent} getting
  positive so paragraph text moves to the right.
\end{itemize} 

\begin{description}[left=-10pt..20pt,labelwidth=!]
  \item[Label] labelwidth needs to be recalculated!
\end{description}

\end{document}

I don't know how to achieve it. When I fix one of them the other is wrong.