I have trouble defining a custom environment for a tcolorbox equation environment. When I define an environment for my tcolorbox with ams align Option I get the error:
LaTeX Error: \begin{tcolorbox} on input line 494 ended by \end{myenv}. (\end{myenv}
With the answer from LaTeX Error: \begin{tcolorbox} on input line x ended by \end{myenv} when using new environment I thought I could solve it. But while the example from this question works, mine doesn't.
So it works to use this environment
\newenvironment{myenv}
{\tcolorbox[hbox]}
{\endtcolorbox}
but when I use this:
\newenvironment{myenv}
{\tcolorbox[ams align]}
{\endtcolorbox}
I get the above error. What is wrong and how can I solve this?
\newtcolorbox{myenv}{ams align}
to define the new environment?\tcolorbox
the variable\@currenvir
containing the name of the current environment is overwritten.