I want to define a new environment, such as test in the example below, whose start and end arguments in turn call the begin and end of an already-defined environment.
Simple example:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\newenvironment{test}{\begin{align}}{\end{align}}
\begin{document}
\begin{test*}
a &b
\\
c&d
\end{test*}
\end{document}
That produces an error \begin{align} ... ended by \end{test}. Is there some way to accomplish this?
What I really want is a called inner environment that is more complicated, as in:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{empheq}
\newcommand*\widefbox[1]{\fbox{\hspace{1em}#1\hspace{1em}}}
\newenvironment{\boxedgather*}{\begin{empheq}[box=\widefbox]{\csname gather* \endcsname}}{\end{empheq}}
\begin{document}
\begin{boxedgather*}
a = b
\\
c = d
\end{boxedgather*}
\end{document}