# Issues

Issue #48 wontfix

# newenvironment {frame}{center} produces an error (beamer-specific)

Vedran Miletić
repo owner created an issue

Compiling the following code

{{{ \documentclass{article}

\newenvironment{myenv} {\begin{frame} \begin{center}} { \end{center} \end{frame}}

\begin{document} \begin{myenv} wogoqog \end{myenv} \end{document} }}}

results in an error

{{{ Runaway argument? \let \AtEndDocument \@firstofone \@enddocumenthook \@checkend {docume\ETC. ! File ended while scanning use of \beamer@collect@Jose Manuel Marquez Cuerpo. <inserted text> \par <*> test.tex }}}

1. reporter

Joseph, any ideas? It seems like LaTeX gets weirded out by what Beamer gives it, because the error is not part of Beamer code at all.

Dear Vedran,

I have the same problem. Do you know how to overcome this issue ?

Regards, Pierre

2. Frames are read by beamer in verbatim mode (more or less). The result of this is that you cannot wrap \end{frame} up inside anything else. While that is a little inconvenient, it is not a bug.

I'm trying to do frames where the text is in a minipage (for hyphenation; I know, "you shouldn't do that", but I need space on the right and adjust as many text as I can on the left of the slide) and doesn't fit all the text width in the frame. I'm trying with this:

\documentclass[10pt]{beamer}

\newenvironment{slide}[1]
{\begin{frame}\frametitle{#1}\begin{minipage}{.7\textwidth}}
{\end{minipage}\end{frame}}

\begin{document}
\begin{slide}{A slide}
Text text text text text text text.
\end{slide}
\end{document}


Which makes Beamer cry saying "! File ended while scanning use of \beamer@collect@Jose Manuel Marquez Cuerpo." How I can avoid this?