4

I would like to have enumerate resume independent of the depth. I can't manage to get it working with setlist's resume option:

\documentclass{article}
\usepackage{enumitem}
\setlist[enumerate]{resume}
\usepackage{amsthm}

\begin{document}

\begin{enumerate}
\item One
\end{enumerate}

\begin{proof}

\begin{enumerate}
\item Two
\end{enumerate}

\end{proof}

\begin{enumerate}
\item Three
\end{enumerate}

\end{document}

enter image description here

The solution seems to be the usage of the newer option resume*. However, I am wondering why there is no resume* option for the list. Instead, I need to add the resume* option to the enumerate environments. The next thing, I am wondering is why the resume option added to each of the environments works (while giving the unintended numbering) but it does not work with resume*:

\documentclass{article}
\usepackage{enumitem}
\usepackage{amsthm}

\begin{document}

\begin{enumerate}[resume*]
\item One
\end{enumerate}

\begin{proof}

\begin{enumerate}[resume*]
\item Two
\end{enumerate}

\end{proof}

\begin{enumerate}[resume*]
\item Three
\end{enumerate}

\end{document}

enter image description here

It works as expected when adding the resume* option to each of the enumerate environments except for the first one. I find the difference between how resume and resume* works a bit of a head scratcher. Maybe I am just misunderstanding how to work with the resume options properly?

5
  • @AlanMunn Thanks for the feedback. That is strange. MiKTeX does not report any updates and enumitem is at 3.9 which seems also to be the latest.
    – Daniel
    Sep 22, 2020 at 7:39
  • @AlanMunn I'd be interested what your output is. Is it 1, 2, 3 or 1, 2, 2?
    – Daniel
    Sep 22, 2020 at 7:40
  • @AlanMunn Okay, I missed to add the resume* option to the first environment. Do you get my second output now? I am still surprised that the first snippet gives you 1, 2, 3 rather than 1, 2, 2...
    – Daniel
    Sep 22, 2020 at 7:43
  • I've deleted my comment. I misread the second output. For the first code I get 1.2.2, and the second 1.2.3.
    – Alan Munn
    Sep 22, 2020 at 13:06
  • But a couple of other comments: the resume* has nothing to do with this, as resume in your second code example works as you would expect. resume* can't be used in \setlist because by definition it copies all the settings from the list, so it doesn't make sense to use it in \setlist. So I think that your first example is bug. You can report it here: texnia.com/contact.html
    – Alan Munn
    Sep 22, 2020 at 13:53

0

You must log in to answer this question.

Browse other questions tagged .