The saveitem package^{∗}

Andrew D. Lewis

1998/08/13

1 The saveitem package

So say you’re making a list, right. And say you want to break the list to make a few comments, and then later resume the list with the same number. Well, you can manually set the number, but then you have to keep track of it in case you insert new items, etc. Or you can use saveitem!

To use the package is easy. An example makes everything clear. The L^{A}TEX code

 \begin{enumerate}
 \item This is an item.
 \item This is another item.\savenum
 \end{enumerate}
 Here are some out-of-list comments.
 \begin{enumerate}\resumenum
 \item And here we start the list with the numbering carried forward
 from above.
 \end{enumerate}

produces the list:

1. This is an item.

2. This is another item.

Here are some out-of-list comments.

3. And here we start the list with the numbering carried forward from above.

\savenum So apparently the commands provided are \savenum (which you type when \resumenum you want to save an item number to be resumed) and \resumenum (which you

type when you want to resume with the numbering you left off with.

Z’easy.

∗This file has version number v1.0, last revised 1998/08/13.

2 Implementation

Nothing fancy here. Just use the L^{A}TEX \setcounter command.

1 ⟨∗package⟩

2

3 \@definecounter{@ADL@savenum}

4

5 \newcommand\savenum{\setcounter{@ADL@savenum}%
6 {\the\@nameuse{c@\@listctr}}}
7 \newcommand\resumenum{\setcounter{\@listctr}{\arabic{@ADL@savenum}}}

8

9 ⟨/package⟩