Equations side-by-side, both numbers on the right

How can I typeset two equations side-by-side but get both equation numbers printed on the right?

          a = b            c = d      (1, 2)


I need to reference both equations individually in the text.

I am aware of the questions asked by SuperElectric and HTG, but they are not looking for both numbers to appear on the right-hand side of the page.

-
Have you considered manual numbering? It might be the easiest solution, if the amount of equations in the document is not to large. –  Mythio Jun 23 '13 at 14:13
Are you sure that your readers will understand clearly what's intended when you reference equation 2? Use two lines and no doubt will arise. –  egreg Jun 23 '13 at 14:16
@Mythio Is there a way to do that without loosing the ability to use \label{} and \ref{}? –  severin Jun 23 '13 at 14:17
@egreg I think this is an important consideration, but in my case it should be fairly clear and I need to get as much information on each page as possible :) –  severin Jun 23 '13 at 14:20
@severin I have to agree with egreg though. But if the space is really that important, I would strongly suggest to follow the answer as given in the question by SuperElectric. At the very least, it is clear than which equation you will be referring too. As for the \label{}, if you are doing manual numbering, it doesn't make much sense to use automated labels/references... –  Mythio Jun 23 '13 at 14:23

Save the meaning of \label (after loading hyperref, if you do) and use equation* together with \tag:

\documentclass{article}

\usepackage{amsmath}

\AtBeginDocument{\let\latexlabel\label}

\begin{document}
\begin{equation*}
\refstepcounter{equation}\latexlabel{firsthalf}
\refstepcounter{equation}\latexlabel{secondhalf}
\tag{\ref*{firsthalf}, \ref*{secondhalf}}
\end{equation*}

Another
$$e=f$$

\ref{firsthalf} and \ref{secondhalf}
\end{document}


If you don't use hyperref, then use simply \ref and not \ref* (which is meant to avoid creating a spurious link).

-
wouldn't you want the usual formatting of \eqref, with parentheses, and always upright? (i haven't tried it, but it wouldn't be hard to emulate manually if \eqref itself doesn't work.) –  barbara beeton Jun 23 '13 at 17:04
@barbarabeeton Using \tag ensures that the multiple equation number is upright and parenthesized. Of course for the references in text it's better to use \eqref. –  egreg Jun 23 '13 at 18:53
it was the references in text that i was referring to, not the numbers on the display equations. –  barbara beeton Jun 23 '13 at 19:35
@barbarabeeton I see; I can confirm that \eqref works without problems in the example. –  egreg Jun 23 '13 at 20:02
Thanks for this solution! I ended up using it because it seems the most clean to me. And +1 for also taking care of hyperref. I guess many people are using that. –  severin Jul 6 '13 at 10:04

The following manual solution is based on package amsmath that takes care that the equation numbers can be referenced:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\newcommand*{\stepeqlabel}[1]{%
\@bsphack
\begingroup
\refstepcounter{equation}%
\label{#1}%
\endgroup
\@esphack
}
\the\numexpr\value{equation}+(#1)\relax
}
\makeatother

\begin{document}
Two equations \eqref{eq:first} and \eqref{eq:second} in one line:
\stepeqlabel{eq:first}
\begin{align}
a&=b & c&=d
\end{align}
\stepeqlabel{eq:second}
\end{document}


Remarks:

• \tag is used to overwrite the normal equation number.
• If \tag is used, the equation number is not updated. Therefore the equation counter is incremented before the equation system.
• align (amsmath) thinks, there is only one equation number in the equation system. Therefore the equation counter is incremented after the system to match the second equation number. also the label is placed here.
• If a \label is not needed, replace \stepeqlabel{...} by \stepcounter{equation}.
• \@bsphack and \@esphack comes from the LaTeX kernel to avoid duplicate spaces for \label and similar commands \index.
• If the equation number is formatted differently than plain arabic numbers, then \theequationadd can be adopted.
-