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 }}}

Comments (6)

  1. Anonymous

    Dear Vedran,

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

    Regards, Pierre

  2. Joseph Wright

    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.

  3. Anonymous

    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?

  4. Log in to comment