I want to redefine the frame
environment in beamer
so that the contents are inside a box in the center of the frame, but when I try defining the new environment like:
\newenvironment{hframe}[1]
{%before
\begin{frame}{{#1}}
\begin{textblock}{11}(2,2)
}{ %after
\end{textblock}
\end{frame}
}
...
\begin{document}
...
\begin{hframe}{title}
some text
\end{hframe}
\end{document}
I got a compiling error: "! File ended while scanning use of \frame."
. But if instead I use the following code
\newenvironment{hframe}[1]
{%before
\begin{frame}{{#1}}
\begin{textblock}{11}(2,2)
}{ %after
%\end{textblock}
\end{frame}
}
...
\begin{document}
...
\begin{hframe}{title}
some text
\end{textblock}
\end{hframe}
\end{document}
it works... Any clue of what is happening and how can I include the \end{textblock}
in the "end" argument of \newenvironment
?
\documentclass
and the appropriate packages so that those trying to help don't have to recreate it