There is an issue in the numbering of equation when using a floating tcolorbox
. I would like the equations to be numbered in the order of appearance.
Here is a MWE
\documentclass{article}
\usepackage{tikz}
\usepackage{tcolorbox}
\newtcolorbox{myframe}[1][]{#1}
\begin{document}
\begin{equation} 1+2=3 \end{equation}
used with theorem \ref{theorem}
\begin{myframe}[float,floatplacement=t]
This is the theorem:
\begin{equation} 1+1=2. \label{theorem} \end{equation}
\end{myframe}
gives
\begin{equation} 2+2=4. \end{equation}
\end{document}
Is there a way to number the equations correctly ? Thanks.
EDIT To be more precise, I want the numbering to be in the order of appearance, wherever the float is positioned.
tcolorbox
butfloating
. You'll have same problem with afigure
. The equation number is based in which order equations are declared in .tex file not based in where it is definitively placed in your document.