add tag
Trevor
I am trying to put a subequations environment inside a tcolorbox. However, the result has too much space at the top of the box. I am aware of the `ams align` key in tcolorbox, but I can't use it because the subequations environment wraps around the align environment in this case.
```
\documentclass{article}

\usepackage{amsmath}
\usepackage{tcolorbox}

\begin{document}

\begin{tcolorbox}
\begin{subequations}
\begin{align}
a \\
b
\end{align}
\end{subequations}
\end{tcolorbox}

\end{document}
```
![tcolorbox.png](/image?hash=09c4cfcf3332df36576fd1a78429d3b0630c48c00e533f9aa359dcbf9c3af145)
Top Answer
samcarter
You could use the `ams nodisplayskip` option:

```
\documentclass{article}

\usepackage{amsmath}
\usepackage[most]{tcolorbox}

\begin{document}

\begin{tcolorbox}[ams nodisplayskip]
\begin{subequations}
\begin{align}
a \\
b
\end{align}
\end{subequations}
\end{tcolorbox}

\end{document}
```

![Screenshot 2024-09-21 at 13.30.23.png](/image?hash=c025ea2f1f280a50767dd34355dde95cfc450b04afff2b9d259a76f3fe1056aa)
Answer #2
samcarter
You could avoid the extra space by loading the `nccmath` package (if you have more math in your document, check carefully if everything still looks as it should as this might influence other things as well):


```
\documentclass{article}

\usepackage{amsmath}
\usepackage{nccmath}
\usepackage{tcolorbox}

\begin{document}

\begin{tcolorbox}
\begin{subequations}
\begin{align}
a \\
b
\end{align}
\end{subequations}
\end{tcolorbox}

\end{document}
```


![Screenshot 2024-09-21 at 13.45.07.png](/image?hash=d48497fabc088590b4d6ad43e7a7513cfccd699537ade440556932cfa9f24f0b)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.