Skip to content

Getting enumi counter outside of enumerate #56

Description

@lennartack

It usually works to get the number of the last item using \theenumi. But it fails in the following example:

\documentclass{article}

\usepackage{enumitem}

\begin{document}

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

\begin{enumerate}[resume*]
  \item[(2')] Another Two
\end{enumerate}

\theenumi

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

\end{document}

Where \theenumi outputs 0, even though the next enumerate resumes at 3.

Relatedly, it would be nice if enumi could support incrementing the counter outside of enumerate environments. For example:

\documentclass{article}

\usepackage{enumitem}

\begin{document}

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

\stepcounter{enumi}

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions