[Tex/LaTex] tcolorbox equation and fleqn: not vertically centered

math-modetcolorboxvertical alignment

Using tcolorbox with ams equation, there is sometimes additional leading space before the equation comes:

\documentclass[fleqn]{article} 
\usepackage[many]{tcolorbox}
\usepackage{amsmath}

\begin{document} 
\begin{tcolorbox}[ams equation]
    A = B
\end{tcolorbox} 
\end{document}

Versus

\documentclass{article} 
\usepackage[many]{tcolorbox}
\usepackage{amsmath}

\begin{document} 
\begin{tcolorbox}[ams equation]
    A = B
\end{tcolorbox} 
\end{document}

How can I remove it or have the equation centered vertically? The option fleqn seems to be significant here.

Best Answer

 \documentclass[fleqn]{article}
 \usepackage[many]{tcolorbox}
 \usepackage{amsmath}

\begin{document}
\begin{tcolorbox}[ams align]
    A = B
\end{tcolorbox}
\end{document}

enter image description here