4

I would like to label some cases with specific tags, and was hoping for something like

\begin{numcases}{A = }
\frac{r}{a} & r > a \tag{G} \\
\frac{a}{r} & r < a \tag{H}
\end{numcases}

utilizing the numcasesenvironment from the cases package, and \tag from amsmath. However, the two don't seem to be compatible:

! Package amsmath Error: \tag not allowed here.

Is there any alternatives that would do what I hope to accomplish?

1 Answer 1

5

You can use the empheq package:

\usepackage{empheq}

\begin{empheq}[left={A=\empheqlbrace}]{alignat=2}
& \frac{r}{a} &&\qquad  r > a \tag{G} \\
& \frac{a}{r} &&\qquad  r < a \tag{H}
\end{empheq}

The syntax is a bit awkward, but the result seems good. You can define an environment for you personal use:

\newenvironment{tagcases}[1][]
  {\empheq[left={#1\empheqlbrace}]{alignat=2}}
  {\endempheq}

and the system before would become

\begin{tagcases}[A=]
& \frac{r}{a} &&\qquad  r > a \tag{G} \\
& \frac{a}{r} &&\qquad  r < a \tag{H}
\end{tagcases}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .