I'm working on wrapping up some patterns used in my research group for creating posters. Since we're using beamer and beamerposter to make these, all documents go essentially like this:
\documentclass{beamer}
\begin{document}
\begin{frame}
\end{frame}
\end{document}
I'd like to simplify this to like:
\documentclass{ourposter}
\begin{poster}
\end{poster}
So I tried to implement the poster environment as \newenvironment{poster}{\begin{document}\begin{frame}}{\end{frame}\end{document}}.
Unfortunately, that seems to be the wrong thing to do, since latex responds with: LaTeX Error: \begin{poster} on input line 10 ended by \end{document}. I can work around it by replacing the begin/end document with \document/\enddocument, but I'm a bit wary of that.
Is the right approach to just sidestep the LaTeX environment stuff and use the commands directly, or is there a better approach here?
\begin{document}...\end{document}, not\begin{document class name}...\end{document class name}. – Matthew Leingang Nov 20 '12 at 12:59posterinstead ofdocumentis based on things like letter.cls using\begin{letter}. Your solution works, I guess, but I'd also like to add an optional argument that gets passed to the\begin{frame}. For a presentation Beamer's default of vertical centering is good, but for posters sometimes we're going to prefer\begin{document}\begin{frame}[t]which is was planning to expose as\begin{poster}[t]. Is that possible with\AtBeginDocument? – arnsholt Nov 20 '12 at 14:39\begin{document}and works like your original usage of\begin{document}\begin{frame}. You didn't ask for a way to rename theframeenvironment, rather your question suggests you want only one\begin{}. As for options, why not add it as an option to your class\documentclass[t]{ourposter}– StrongBad Nov 20 '12 at 14:53\AtBeginDocument{\begin{frame}[fragile]}but that simply moves the error a bit (or so it seems): "! Illegal parameter number in definition of \beamer@test.". Any idea what's happening? – arnsholt Nov 20 '12 at 15:29