jbezos / enumitem

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

Undefined label error #42

Closed AndrewMathas closed 1 year ago

AndrewMathas commented 1 year ago

I always thought that successive \setlist commands added to the settings for a particular environment but the code below suggests that previous settings are forgotten with each new \setlist. Perhaps this is the expected behaviour but, to me, the code below looks like a bug:

\usepackage{enumitem}

\newlist{test}{enumerate}{1}
\setlist[test]{label=\roman*)}
\setlist[test]{start=2}

\begin{document}

  \begin{test}
    \item item i
    \item item ii
    \item item iii
  \end{test}

\end{document}

[Before finding this github account I first filed this on http://www.texnia.com/contact.html. Sorry for the duplication.]

muzimuzhi commented 1 year ago

What you need is \setlist*, according to enumitem package manual, sec. 7 Cloning the basic lists

The starred form \setlist* adds the settings to the previous ones.

related https://tex.stackexchange.com/questions/433543/behaviour-of-enumitem-setlist

jbezos commented 1 year ago

I’m closing this issue because it works as documented and the issue has been solved.