# Independent labelling of lines in a cases environment [duplicate]

Possible Duplicate:
Separate labels in cases

I am looking for a way to number and references independently individual lines in a cases environment.

Here is an example:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\begin{align}
\begin{cases}
x + y = z \label{label1} \\
a + b = c
\end{cases}
\end{align}
\end{subequations}
First case is \eqref{label1} and the second case is \ldots
\end{document}


Ideally, I would like to achieve the following output:

First case is (1a) and the second case is (1b)

The problem is that label1 labels the whole set of equations and I see no way how to add a independent label for each line.

-
You can use the package cases. –  Marco Daniel Mar 15 '12 at 17:36

## marked as duplicate by Peter Grill, Torbjørn T., diabonas, cmhughes, MicoMar 15 '12 at 19:49

There are two possible solutions.

With the cases package …

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{cases}

\begin{document}
\begin{subequations}
\begin{numcases}{f(x)=}
x + y = z \label{label1} \\
a + b = c
\end{numcases}
\end{subequations}
First case is \eqref{label1} and the second case is \ldots
\end{document}


With the emhpeq package from the mh bundle …

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{empheq}

\begin{document}
\begin{subequations}
\begin{empheq}[left={f(x)=\empheqlbrace}]{align}
x + y &= z \label{label1} \\
a + b &= c
\end{empheq}
\end{subequations}
First case is \eqref{label1} and the second case is \ldots
\end{document}

-