0

Essentially I'm trying to obtain something like this (without the f(x) bit), but with custom labels, which I can't seem to do.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
\begin{cases}
x+y &= 3 &&& \text{5} \\
x-y &= 1 &&& \text{6} \\
\end{cases}
\end{align*}

\end{document}

But it just doesn't work.

I additionally tried the numcases solution in the link, but it seems like I can't manually tag it.

Here is my attempt with the empheq package:

\documentclass[preview]{standalone}
\usepackage{amsmath,empheq}
\usepackage{cases}
\begin{document}

\begin{empheq}{align*} 
\begin{cases}
x+y &= 3 \tag{5} \\
x-y &= 1 \tag{6}
\end{cases}
\end{empheq}

\end{document}

The problem over here is that it shows only a (5) next to both the equations somewhere vertically in the center, not a (5) for one equation and a (6) for the other ;P

Skeleton Bow
  • 1,179

1 Answers1

3

try this:

\documentclass{article}
\usepackage{amsmath}
\usepackage{cases}

\begin{document}
\setcounter{equation}{4}
\begin{numcases}{}
 x+y = 3 \\
 x-y = 1
\end{numcases}
\end{document}

output of example code

this is exactly what is provided by the examples in this question: Separate labels in cases, which is why i suggested it as a duplicate.

  • 1
    I'm sorry! I was playing around with the examples but I didn't get anywhere. I had no idea about the setcounter command! I also searched for it on that page, but couldn't see it there... – Skeleton Bow Oct 30 '16 at 18:51
  • I'd like to add the reason I was completely clueless about this. I never used the equation environment because I write in MathJax with $$ and use pandoc to convert it over (which is far from perfect), and I always used the tag command to number my equations, so I never had "official" equation counters anyway! That's why nothing was working for me. Thanks for helping me. – Skeleton Bow Oct 30 '16 at 18:56
  • @SkeletonBow -- your confusion is understandable, given your method of preparing input. however, it would have made the question more understandable if you'd included the information about that method in the question. – barbara beeton Oct 30 '16 at 21:30