JohnPaul
This is my code
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{nccmath}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}
\[
\begin{subequations}
\begin{cases}
x^2 + 2x + 2 = 0\\
y = \dfrac{x^2 + mx + 3}{x-6}
\end{cases}
\end{subequations}
\]
\end{tcolorbox}
\end{document}
```
I get
![image.png](/image?hash=a89a4754ff8f11e7cb20a0a46ba1a2f76a22cedcfd8ad2ed82afc052002831fa)
How can I label each equation $x^2 + 2x + 2 = 0$ is (1a) and $y = \dfrac{x^2 + mx + 3}{x-6}$ is (1b)?
Top Answer
samcarter
You could use the `subnumcases` environment from the `cases` package:
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{nccmath}
\usepackage[most]{tcolorbox}
\usepackage{cases}
\begin{document}
\begin{tcolorbox}[ams nodisplayskip]
\begin{subnumcases}{}
x^2 + 2x + 2 = 0 & \\
y = \frac{x^2 + mx + 3}{x-6} &
\end{subnumcases}
\end{tcolorbox}
\end{document}
```
![Screenshot 2024-09-30 at 10.18.00.png](/image?hash=940f936d1b8960ec217292b99de9a9848cb6f0a815c8bdda2e31f83dbfe15959)
Answer #2
Anonymous 13630
To label each equation automatically within your system of equations, you need to use the `subequations` environment properly. Here's the updated code:
```
\documentclass{article}
\usepackage{amsmath}
\usepackage{nccmath}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}
\begin{subequations}
\begin{align}
x^2 + 2x + 2 &= 0 \label{eq:1a} \\
y &= \dfrac{x^2 + mx + 3}{x-6} \label{eq:1b}
\end{align}
\end{subequations}
\end{tcolorbox}
\end{document}
```
This will label your equations as (1a) and (1b) automatically.