# Numbering equations in tabular environment

I wish to number equations in a table, like numbering them in

$$. ...$$


Since all the equations are written as "inline" equations (for example, $a = b+c$) in tabular environment, I have no idea how to number them. Can you help me to find out a way?

-
are you sure you want a table rather than a numbered equation environment such as amsmath align? If you do want a table the simplest is to use in a p column, or if you do want to number inline expressions just go \refstepcounter{equation}(\theequation) whereever you want the number. – David Carlisle Jul 11 '12 at 16:02
Welcome to TeX.SE. For future reference, please keep in mind that while code snippets are useful in explanations, it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. – Peter Grill Jul 11 '12 at 17:06

I answered a similar question at the German community MrUnix:

Here the code:

\documentclass[11pt,a4paper]{scrreprt}
\usepackage{amsmath, amssymb, tabularx}
\usepackage{lipsum}
\usepackage{hyperref}
\newcommand{\tagarray}{%
\mbox{}\refstepcounter{equation}%
$(\theequation)$%
}

\begin{document}
$$1+1=2\label{1}$$

\noindent\begin{tabularx}{\linewidth}{@{}lrcl>{\raggedleft\arraybackslash}X@{}}
Anode: & $\frac{1}{2}O_{2}+2e^{-}$ & $\longrightarrow$ & $O^{2-}$ & \tagarray\label{2}\\
Kathode: & $H_{2}+O^{2-}$ & $\longrightarrow$ & $H_{2}O+2e^{-}$ &\tagarray\label{3}\\
Gesamtreaktion: & $H_{2}+\frac{1}{2}O_{2}$ & $\longrightarrow$ & $H_{2}O$ &\tagarray\label{4}
\end{tabularx}

$$1+1=2\label{5}$$
\lipsum[1]