# Define new align environment based on the old one

I am aware that there are plentiful similar questions, but since (even after several reading) I don't understand the the answers, I am unable to apply them to my problem. I simply want to define a new align environment based on the old one, e.g.

\documentclass[11pt]{scrbook}

\usepackage{empheq}
\usepackage[many]{tcolorbox}
\tcbset{highlight math style={enhanced,colframe=black,arc=8pt,boxrule=1pt}}
\newenvironment{alignteo}%
{
\begin{empheq}[box=\tcbhighmath]{align}
}{
\end{empheq}
}

\begin{alignteo}
f = a x
\end{alignteo}

\end{document}

Using \begin{alignteo} and \end{alignteo} I get the error

! LaTeX Error: \begin{empheq} on input line 448 ended by \end{alignteo}.

Is there any way to do this without using environ package?

-
Can you make a complete example? –  egreg Oct 25 '13 at 10:41
OK, I'll try to build MWE –  Pygmalion Oct 25 '13 at 10:45

With environ:

\documentclass{article}
\usepackage[svgnames,hyperref]{xcolor}
\usepackage{empheq}
\usepackage[many]{tcolorbox}

\tcbset{highlight math style={enhanced,
colframe=red!60!black,colback=yellow!50!white,arc=4pt,boxrule=1pt,

\usepackage{environ}
\NewEnviron{alignteo}{
\begin{empheq}[box=\tcbhighmath]{align}
\BODY
\end{empheq}
}

\begin{document}

$$\tcbhighmath{E = mc^2}$$

\begin{empheq}[box=\tcbhighmath]{align}
a&=b\\
E&=mc^2 + \int_a^a x\, dx
\end{empheq}

\begin{alignteo}
a&=b\\
E&=mc^2 + \int_a^a x\, dx
\end{alignteo}
\end{document}

Without environ:

\documentclass{article}
\usepackage[svgnames,hyperref]{xcolor}
\usepackage{empheq}
\usepackage[many]{tcolorbox}

\tcbset{highlight math style={enhanced,
colframe=red!60!black,colback=yellow!50!white,arc=4pt,boxrule=1pt,

\newenvironment{alignteo}%
{\empheq[box=\tcbhighmath]{align}}
{\endempheq}

\begin{document}

$$\tcbhighmath{E = mc^2}$$

\begin{empheq}[box=\tcbhighmath]{align}
a&=b\\
E&=mc^2 + \int_a^a x\, dx
\end{empheq}

\begin{alignteo}
a&=b\\
E&=mc^2 + \int_a^a x\, dx
\end{alignteo}
\end{document}
-
Requested was without environ... Just turn the answers around :) –  Pygmalion Oct 25 '13 at 11:04
@Pygmalion My eyes are too tired. Any way both are there. Does order matter? :-) –  Harish Kumar Oct 25 '13 at 11:06
Nope :) accepted +1 –  Pygmalion Oct 25 '13 at 11:09