I'm looking for an automatic way in LaTeX to number a same equation that would be inserted several times (under different forms for instance). The output would look something like:
some text
x-y=0 (1)
some text
x=y (1a)
some text. Now with an align environment
x2-y2=0 (2)
y-x=0 (1b)
and with an align environment again
x2=y2 (2a)
x2+x=y2+y (3)
Equations (1a) and (1c) are just different forms of Eq. (1), the same for Eq. (2a) and Eq. (2)
The perfect solution would have:
- an automatic increment of letters
- usability with both equation and align environment
- simple labeling and referencing of the multiple equation forms
- compatibility with
autoref
But of course that could sound like an utopia, so any workarounds are welcome.
I've tried with the package deleq and the tag command. I don't want to use the deleq environments because they seem to rely on something like eqnarray. That's how far I got:
\documentclass[11pt]{article}
\usepackage{deleq}
\usepackage{hyperref}
\usepackage{amsmath}
\begin{document}
Some text
\begin{equation} y-x=0 \label{Demo1} \end{equation}
Some text (the following is not compatible with equation)
$$ x=y \label{Demo1bis} \rndeqno{Demo1} $$ %Automatic ok but not equation and bad reference!
Some text, now with an align environment:
\begin{align}
x_2-y_2&=0 \label{Demo2} \\
y&=x \label{Demo1ter} \tag*{\ref{Demo1}b} %\rdeqno{Demo1}
\end{align}
Some text, with align
\begin{align}
x_2&=y_2 \label{Demo2bis} \tag*{\ref{Demo2}b} \\Not automatic !!! %\rndeqno{Demo2}\\
x_2+x&=y_2+y \label{Demo3}
\end{align}
\autoref{Demo1bis} and \autoref{Demo1ter} are different forms of \autoref{Demo1}, the same for \autoref{Demo2bis} and \autoref{Demo2}.
\end{document}
