1

The following MWE contains proofs of equations numbered (2) through (4). I structure the proofs using an enumerate environment, so that the proof of equation (2) is labeled with 2., the proof of (3) with 3., and (4) with 4..

\documentclass{article}
\usepackage{amsmath}
\begin{document}

An equation before the proof:
\begin{equation}
E = mc^2.
\end{equation}

%I might want another equation here:
%\begin{equation}
%a^2 + b^2 = c^2
%\end{equation}

Here is a list of equations we want to prove:
\begin{align}
F &= ma \label{eq:newton} \\
\tau &= r \times F \label{eq:torque} \\
I &= \frac{3}{17} MR^2. \label{eq:inertia}
\end{align}

We will prove the equations in order:
\begin{enumerate}
\setcounter{enumi}{2}
\addtocounter{enumi}{-1}
\item The first equation is trivial.
\item The second equation follows easily.
\item The third is left as an exercise to the reader.
\end{enumerate}

\end{document}

If I were to add another equation before the list of equations to be proved, though, the numbering might change, so that I am now proving equations (3) through (5) for instance. I would like the numbering in the enumerate environment to change automatically. However, using

\setcounter{enumi}{\ref{eq:newton}}
\addtocounter{enumi}{-1}

does not work.

How can I make the enumerate environment automatically start its numbering at the number of a particular equation?

1
  • This can't work, since \ref isn't expandable
    – user31729
    May 3, 2016 at 21:52

1 Answer 1

2

Instead of juggling with \addtocounter{enumi} etc it's better to use enumitem and it's start=... option.

The \getrefnumber{...} macro from refcount provides an aid to get the real 'number' of an reference -- \ref isn't expandable and will fail here.

Please note: \getrefnumber{...} will yield anything as equation number here, i.e. something 1.A.5 would be possible too -- start=... will fail then.

\documentclass{article}
\usepackage{enumitem}
\usepackage{refcount}
\usepackage{amsmath}
\begin{document}

An equation before the proof:
\begin{equation}
E = mc^2.
\end{equation}

%I might want another equation here:
%\begin{equation}
%a^2 + b^2 = c^2
%\end{equation}

Here is a list of equations we want to prove:
\begin{align}
F &= ma \label{eq:newton} \\
\tau &= r \times F \label{eq:torque} \\
I &= \frac{3}{17} MR^2. \label{eq:inertia}
\end{align}

We will prove the equations in order:
\begin{enumerate}[start=\getrefnumber{eq:newton}]
\item The first equation is trivial.
\item The second equation follows easily.
\item The third is left as an exercise to the reader.
\end{enumerate}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.