0

I want to set the first item in a list equal to the last item (a number) in a previous list plus 1 such that if I change the length in the list it will automatically update.

My attempt: with the package enumerate using \setcounter{enumi} I was able to obtain the desired result manually (see reproducible example below), but I want the first item in the second list to automatically update if I add or remove items in the first list.

File .tex to reproduce the example:

\documentclass{article}
\usepackage{enumerate}
\begin{document}
List 1
    \begin{enumerate}
        \item A
        \item B
    \end{enumerate}
List 2
\begin{enumerate}
    \setcounter{enumi}{2}
    \item C
\end{enumerate}
\end{document}

Results of the example:

enter image description here

Jim
  • 127
  • 6

1 Answers1

1

You can try this:

\documentclass{article}
\usepackage{enumitem}% <-- changed
\begin{document}
List 1
    \begin{enumerate}
        \item A
        \item B
    \end{enumerate}
List 2
\begin{enumerate}[resume]% <-- changed
    \item C
\end{enumerate}
\end{document}
Unknown
  • 822