Take the 2-minute tour ×
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.

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.

share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

1 Answer 1

up vote 0 down vote accepted

There are two possible solutions.

With the cases package …

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}   % loads »amsmath«
\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{mathtools}   % loads »amsmath«
\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}
share|improve this answer

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