Page Layoutbeamer | Overlay Area

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
mamboreina79
Posts: 5
Joined: Fri Nov 25, 2011 8:49 pm

beamer | Overlay Area

Post by mamboreina79 »

Hello, I have a problem with the overlayarea environment in "beamer". I don't know if I am not getting what it does, but I understood that it helps to keep the content inside from jumping when the content heights are different.

However, when I use it the content jumps from slide to slide. Here is the code I am using:

Code: Select all

\documentclass[10pt,compress,professionalfonts]{beamer} 
\usepackage[english]{babel}
\usepackage[scaled]{helvet}
\usepackage[T1]{fontenc}
\usepackage[charter]{mathdesign}

\begin{document}

\begin{frame}{Pandemonium}
\begin{overlayarea}{\textwidth}{\textheight}

\begin{onlyenv}<1-2>\includegraphics[width=\textwidth]{pande1.eps}\end{onlyenv}
\begin{onlyenv}<3-> \includegraphics[width=\textwidth]{pande2.eps}\end{onlyenv}

some text

\end{overlayarea}
\end{frame} 

\end{document}
I have also tried with a figure environment:

Code: Select all

\begin{figure}
  \includegraphics<1-2>[height=0.4\textheight]{pande1.eps}
  \includegraphics<3-> [height=0.4\textheight]{pande2.eps}
\end{figure}
I attach the two figures. What I am doing wrong?
Attachments
pande2.eps
pande2.eps
(89.66 KiB) Downloaded 641 times
pande1.eps
pande1.eps
(100.64 KiB) Downloaded 580 times
"Light travels faster than sound. This is why some people appear bright until you hear them speak"

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

beamer | Overlay Area

Post by Stefan Kottwitz »

Hi,

the overlayarea environment keeps its size regardless of its actual contents. Obviously you would like to put the pictures in this area, which is fine. Within the environment, positions can change, depending on the content. The outside of the area would not be affected though.

So if you simply put the some text after the environment has ended, this text would not jump. Of course you have to reduce the height of the overlayarea.

Code: Select all

\documentclass[10pt,compress,professionalfonts]{beamer}
\usepackage[english]{babel}
\usepackage[scaled]{helvet}
\usepackage[T1]{fontenc}
\usepackage[charter]{mathdesign}

\begin{document}

\begin{frame}{Pandemonium}
\begin{overlayarea}{\textwidth}{.4\textheight}

\begin{onlyenv}<1-2>\includegraphics[width=\textwidth]{pande1.eps}\end{onlyenv}
\begin{onlyenv}<3-> \includegraphics[width=\textwidth]{pande2.eps}\end{onlyenv}

\end{overlayarea}
some text
\end{frame}

\end{document}
Stefan
LaTeX.org admin
mamboreina79
Posts: 5
Joined: Fri Nov 25, 2011 8:49 pm

Re: beamer | Overlay Area

Post by mamboreina79 »

Wow it was that simple... how didn't I think of that!

thank you very much, now it works :D
"Light travels faster than sound. This is why some people appear bright until you hear them speak"
Post Reply