6

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 :

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

The empheq package was made for this:

\documentclass[a4paper]{memoir}
\usepackage{empheq} % autoload amsmath
\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}
9

The subnumcases environment from cases helps for this layout:

enter image description here

\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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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