TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.
share|improve this question
up vote 8 down vote accepted

The empheq package was made for this:

\usepackage{empheq} % autoload amsmath

  & a + b \\
  & c + d \label{eq:b}\\
  & e + f

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

share|improve this answer
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:

enter image description here

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


  a + b \\
  c + d \\
  e + f


Subequation numbering can be modified using (say)

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.