# Sub-numbering equations within array

I'm using the array environment to give multiple definitions of some value, let's call it x. I can easily get a reference to all 3 definitions together, but I want each one to have its own reference. For now it looks like this :

    / a + b
x = | c + d    (1)
\ e + f


And I want it to look like this :

    / a + b    (1.a)
x = | c + d    (1.b)
\ e + f    (1.c)


I've tried combining all sorts of other packages with array and they just won't play nice. Any ideas? Here's the code I use to get the first result :

$$x = \left\{ \begin{array}{rl} & a + b \\ & c + d \\ & e + f \end{array} \right. \label{eq:PSF_mag}$$

-

The empheq package was made for this:

\documentclass[a4paper]{memoir}
\begin{document}

\begin{subequations}
\label{eq:tot}
\begin{empheq}[left={x=}\empheqlbrace]{align}
& a + b \\
& c + d \label{eq:b}\\
& e + f
\end{empheq}
\end{subequations}

Total group: \eqref{eq:tot}, just one: \eqref{eq:b}

\end{document}

-
Thanks a lot. I'd never used empheq like that before. –  ticster Sep 26 '12 at 14:04

The subnumcases environment from cases helps for this layout:

\documentclass{article}
\usepackage{cases}% http://ctan.org/pkg/cases

\begin{document}

\begin{subnumcases}{x=}
a + b \\
c + d \\
e + f
\end{subnumcases}

\end{document}


Subequation numbering can be modified using (say)

\renewcommand{\thesubequation}{\themainequation.\alph{equation}}

-
Thanks a lot. I knew subequations worked with align but not with arrays. I didn't realize something like numcases existed out there. –  ticster Sep 26 '12 at 14:05