2

Context

Within my latest presentation I probably encountered a bug within the beamer package. Since todays screen sizes are mostly 16:9 or 16:10 I changed my setup to 16:10 ratio. While doing this I had an issue of an itemize jumping around while using it in a column setup with images. Strangely the problem disappeared when turning off the ratio option (changing back to 4:3)

Request

Is there a comfortable solution to this problem? I tried out to use \begin{overlayarea}{..}{..} ... \end{overlayarea} but did not achieve the result I wanted.

Comments for MWEs

  1. With the first MWE you can reproduce the jumping error. Your have to put a picture, otherwise the error does not occur - for me at least.
  2. The second MWE provides a semi-working solution with which I'm not satisfied, because the positioning is off. Strangely, when experimenting with the height parameter of the overlayarea (roundabout 0.6) I got the jumping again..
  3. Lastly the third MWE provides the exact same code as the first MWE, but without aspectratio=1610 and tada..the jumping is gone

MWE with jumps

\documentclass[aspectratio=1610]{beamer}
\usepackage[english, ngerman]{babel}
\usetheme{Frankfurt}
\usecolortheme{beaver}
\usepackage[sfdefault,lf]{carlito}
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{\carlitoOsF #1}
\begin{document}
\section{Testsection}
\subsection{Something}
\begin{frame}\frametitle{Test}
    \begin{columns}
        \begin{column}{.5\linewidth}
            \begin{itemize}
                \uncover<1->{\item Hi}
                \uncover<2->{\item Hello}
                \uncover<3->{\item Hi again}
                \uncover<4->{\item Hi again}
                \uncover<5->{\item Hello again}
            \end{itemize}
        \end{column}
        \begin{column}{.5\linewidth}
            \includegraphics[width=\textwidth]{PictureOfYourChoice}<1>
            \includegraphics[width=\textwidth]{PictureOfYourChoice}<5>
        \end{column}
    \end{columns}
\end{frame}
\end{document}

MWE semi-working

\documentclass[aspectratio=1610]{beamer}
\usepackage[english, ngerman]{babel}
\usetheme{Frankfurt}
\usecolortheme{beaver}
\usepackage[sfdefault,lf]{carlito}
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{\carlitoOsF #1}
\begin{document}
\section{Testsection}
\subsection{Something}
\begin{frame}\frametitle{Test}
    \begin{columns}
        \begin{column}{.5\linewidth}
            \begin{overlayarea}{\textwidth}{.8\textheight}
            \begin{itemize}
                \uncover<1->{\item Hi}
                \uncover<2->{\item Hello}
                \uncover<3->{\item Hi again}
                \uncover<4->{\item Hi again}
                \uncover<5->{\item Hello again}
            \end{itemize}
        \end{overlayarea}
        \end{column}
        \begin{column}{.5\linewidth}
            \includegraphics[width=\textwidth]{PictureOfYourChoice}<1>
            \includegraphics[width=\textwidth]{PictureOfYourChoice}<5>
        \end{column}
    \end{columns}
\end{frame}
\end{document}

MWE without jumping but in 4:3

\documentclass[
%aspectratio=1610
]{beamer}
\usepackage[english, ngerman]{babel}
\usetheme{Frankfurt}
\usecolortheme{beaver}
\usepackage[sfdefault,lf]{carlito}
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{\carlitoOsF #1}
\begin{document}
\section{Testsection}
\subsection{Something}
\begin{frame}\frametitle{Test}
    \begin{columns}
        \begin{column}{.5\linewidth}
            \begin{itemize}
                \uncover<1->{\item Hi}
                \uncover<2->{\item Hello}
                \uncover<3->{\item Hi again}
                \uncover<4->{\item Hi again}
                \uncover<5->{\item Hello again}
            \end{itemize}
        \end{column}
        \begin{column}{.5\linewidth}
            \includegraphics[width=\textwidth]{PictureOfYourChoice}<1>
            \includegraphics[width=\textwidth]{PictureOfYourChoice}<5>
        \end{column}
    \end{columns}
\end{frame}
\end{document}

Addition (15.08.2018)

When using images of different heights, the smaller ones are pinned on the top of the overlayarea. Is there a way to center the images within the area?
I slightly edited your solution:

MWE

\documentclass[aspectratio=1610]{beamer}
\usepackage[english, ngerman]{babel}
\usetheme{Frankfurt}
\usecolortheme{beaver}
\usepackage[sfdefault,lf]{carlito}
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{\carlitoOsF #1}
\begin{document}
\section{Testsection}
\subsection{Something}
\begin{frame}\frametitle{Test}
    \begin{columns}[onlytextwidth]
        \begin{column}{.5\linewidth}
            \begin{itemize}
                \uncover<1->{\item Hi}
                \uncover<2->{\item Hello}
                \uncover<3->{\item Hi again}
                \uncover<4->{\item Hi again}
                \uncover<5->{\item Hello again}
            \end{itemize}
        \end{column}
        \begin{column}{.5\linewidth}
         \begin{overlayarea}{\textwidth}{.5\textheight}
            \includegraphics<1>[width=\textwidth]{example-image-duck}
            \includegraphics<5>[width=\textwidth, height=.3\textheight,page=3]{example-image-duck}
         \end{overlayarea}
        \end{column}
    \end{columns}
\end{frame}
\end{document}
  • I think in your 3rd example you are just lucky. I don't know the height of your images, but with simple test images (example-image) I'll get there jumping. – user36296 Aug 14 '18 at 14:14
3

If you want to use overlayarea to prevent jumping, place it around the highest element - which in your case are the images not the itemization.

Personally I'd use top aligned frames/columns (i.e. \begin{frame}[t]) which prevent jumps fairly reliably.

\documentclass[aspectratio=1610]{beamer}
\usepackage[english, ngerman]{babel}
\usetheme{Frankfurt}
\usecolortheme{beaver}
\usepackage[sfdefault,lf]{carlito}
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{\carlitoOsF #1}
\begin{document}
\section{Testsection}
\subsection{Something}
\begin{frame}\frametitle{Test}
    \begin{columns}[onlytextwidth]
        \begin{column}{.5\linewidth}
            \begin{itemize}
                \uncover<1->{\item Hi}
                \uncover<2->{\item Hello}
                \uncover<3->{\item Hi again}
                \uncover<4->{\item Hi again}
                \uncover<5->{\item Hello again}
            \end{itemize}
        \end{column}
        \begin{column}{.5\linewidth}
         \begin{overlayarea}{\textwidth}{.5\textheight}
            \includegraphics<1>[width=\textwidth]{example-image-duck}
            \includegraphics<5>[width=\textwidth,page=3]{example-image-duck}
         \end{overlayarea}
        \end{column}
    \end{columns}
\end{frame}
\end{document}

enter image description here


EDIT

For vertically centring images of different height, I suggest a minipage

\documentclass[aspectratio=1610]{beamer}
\usepackage[english, ngerman]{babel}
\usetheme{Frankfurt}
\usecolortheme{beaver}
\usepackage[sfdefault,lf]{carlito}
\usepackage[T1]{fontenc}
\renewcommand*\oldstylenums[1]{\carlitoOsF #1}
\begin{document}
\section{Testsection}
\subsection{Something}
\begin{frame}\frametitle{Test}
    \begin{columns}[onlytextwidth]
        \begin{column}{.5\linewidth}
            \begin{itemize}
                \uncover<1->{\item Hi}
                \uncover<2->{\item Hello}
                \uncover<3->{\item Hi again}
                \uncover<4->{\item Hi again}
                \uncover<5->{\item Hello again}
            \end{itemize}
        \end{column}
        \begin{column}{.5\linewidth}%
         \begin{minipage}[t][.5\textheight][c]{\textwidth}
            \includegraphics<1>[width=\textwidth]{example-image-duck}%
              \includegraphics<5>[width=\textwidth, height=.3\textheight,page=3]{example-image-duck}%
         \end{minipage}%
        \end{column}
    \end{columns}
\end{frame}
\end{document}

enter image description here

  • your result works fine, but how can I determine the "right" value for this "magical" ratio of \textheight for the overlayarea? – mgessenich Aug 14 '18 at 14:52
  • 1
    @mgessenich The "magical" value is height of your largest element. I normally just guess some reasonable value, but if you want a precise value, you can look up the height of your images from the log file. For my images this would be \begin{overlayarea}{\textwidth}{132.93933pt}% – user36296 Aug 14 '18 at 15:06
  • do you have any solution to center the images vertically? If I put images of different heights they get pinned to the top (of the overlayarea probably) – mgessenich Aug 14 '18 at 16:00
  • @mgessenich Can you make a minimal working example (MWE) with the images available in the MWE package? – user36296 Aug 14 '18 at 16:01
  • 2
    @mgessenich ImageMagick with the following options: convert -delay 50 -loop 0 -density 100 -alpha remove document.pdf output.gif – user36296 Aug 14 '18 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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