Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I compile the following code, pdflatex takes up 100% of one of my CPU and doesn't stop. I'm probably passing wrong arguments to overlayarea, since I have no idea what they should do (the Beamer_Guide doesn't mention them)

\documentclass{beamer}
\begin{document}
\begin{frame}
            \begin{tabular}{c}
                    \begin{overlayarea}{\textwidth}{0cm}
                            \only<1>{hi}
                            \only<2>{there}
                    \end{overlayarea}
            \end{tabular}
\end{frame}
\end{document}

So, why does this clog my CPU and what are the two arguments in overlayarea supposed to do?

share|improve this question
1  
The Beamer User Guide sure mentions the two arguments (on Section 9.5 Dynamically Changing Text or Image): \begin{overlayarea}{⟨area width⟩}{⟨area height⟩} ⟨environment contents⟩ \end{overlayarea} –  Gonzalo Medina Mar 20 '11 at 18:06
2  
Freaky! Taking out the tabular or the overlayarea stops the hike in CPU. (Confirmed also with xelatex so it isn't an issue with the engine, also confirmed with 1cm for each length argument.) –  Loop Space Mar 20 '11 at 18:10
    
Nesting the tabular inside the overlayarea also works. –  Gonzalo Medina Mar 20 '11 at 18:15
    
turns out I had the wrong Beamer Guide! Thanks Gonzalo. I have to try nesting the other way around, as you suggest, especially in my "real life" example which is quite more complicated than this –  nareto Mar 20 '11 at 18:26

1 Answer 1

The Beamer User Guide sure mentions the two arguments (on Section 9.5 Dynamically Changing Text or Image):

\begin{overlayarea}{⟨area width⟩}{⟨area height⟩} 
⟨environment contents⟩ 
\end{overlayarea}

For the problem mentioned, nest the tabular inside the overlayarea:

\documentclass{beamer}
\begin{document}

\begin{frame}
\begin{overlayarea}{\textwidth}{1cm}
  \begin{tabular}{c}
    \only<1>{hi}
    \only<2>{there}
  \end{tabular}
\end{overlayarea}
\end{frame}

\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.