Let's say I have a tcolorbox
environment called note
. Is there a way for equations that appear inside this environment to automatically assume a different counter from those outside? With automatically I mean without defining a new equation environment?
Here's an example (no second counter implemented):
\documentclass{article}
\usepackage[many]{tcolorbox}
\newtcolorbox{note}[1][]{%
breakable,
enhanced jigsaw,
borderline west={1pt}{0pt}{black},
sharp corners,
boxrule=0pt,
frame hidden,
left=1ex,right=1ex,
fonttitle={\bfseries},
coltitle={black},
title={Note:\ },
attach title to upper,
#1}
\begin{document}
Outside text followed by equation.
\begin{equation}
a = b.
\end{equation}
\begin{note}
Inside text followed by equation.
\begin{equation}
b = c.
\end{equation}
\end{note}
More outside text followed by conclusion.
\begin{equation}
a = c.
\end{equation}
\end{document}