I want to label equations in a alignat-environment which is embedded in a figure-environment and it won't compile. Example:
\documentclass[11pt,a4paper,twoside,openright]{book}
\usepackage{amsmath}
\begin{document}
\begin{figure}
\begin{alignat*}{2}
a & = b & c & = d \\ \label{eq:1}
e & = f & g & = h \\ \label{eq:2}
\end{alignat*}
\caption{Equalities}
\end{figure}
\end{document}
Error message:
! Package amsmath Error: Multiple \label's: label 'eq:1' will be lost.
See the amsmath package documentation for explanation.
Type H <return> for immediate help.
...
l.11 \end{alignat*}
Has anybody an idea how I can set the labels?