7

So, I spend like few hours trying to fix my problem. I've got an image that I want to stay at the SAME position during all the slide. And on other side, I want a list of item with overlay/replacing tricks.

To do that, I used this code (by the way, the itemize with only isn't optimize at all, but I want to replace previous item, so I don't know how to do it in one line):

\documentclass[hyperref={pdfpagemode=FullScreen},xcolor=table,t]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mwe}

\begin{document}
\begin{frame}
\frametitle{Frame Title}
\begin{minipage}[c]{0.24\textwidth}
    \includegraphics[width=\textwidth]{example-image}
\end{minipage}
\hfill
\begin{minipage}[c]{0.74\textwidth}
\includegraphics<1-2>[width=\textwidth]{example-image-a}
\includegraphics<3>[width=\textwidth]{example-image-b}
\only<1>{
\begin{itemize}
    \item blablabla
\end{itemize}
}
\only<2>{
\begin{itemize}
    \item blablabla
    \item blablabla
\end{itemize}
}
\only<3>{
\begin{itemize}
    \item blablabla
\end{itemize}
}
\end{minipage}
\end{frame}
\end{document}

As you can see there, the image on the left is moving vertically. But why ? Image is moving with the item apparition... How to deal with the apparitions without moving the image ?enter image description here

Lionel
  • 225
  • I assume this is at least somewhat related to https://tex.stackexchange.com/q/449452/35864 – moewe Sep 06 '18 at 13:51
  • To my untrained eye this but certainly the linked issue look like bugs that should be reported to the beamer maintainers. Even if many people involved frequent this site it is better to have this officially logged at https://github.com/josephwright/beamer/issues – moewe Sep 06 '18 at 13:53
  • @moewe To be honest, I don't think it is the same issue. The problem in the present question is simply that the height of the second minipage changes between slides which moves the common baseline. The issue from the linked question is much more difficult - I think it boils down to some change in vertical skip for nested itemizations, but I could not yet find it in the code. – samcarter_is_at_topanswers.xyz Sep 06 '18 at 14:11
  • @samcarter I'll take your word for it, you are the beamer expert. But surely the other issue is worth a bug report? – moewe Sep 06 '18 at 14:13
  • @moewe Yes, probably. I was actually planing to open an issue, but was waiting a day or two to see if I can come up with an idea how to fix. If you'd like to write one now, please feel free to do so! – samcarter_is_at_topanswers.xyz Sep 06 '18 at 14:17
  • @samcarter The issue is not pressing to me and I don't think I could provide useful insights. I just wanted to make sure that the issue does not fade into oblivion. If it is still on your radar all is well. – moewe Sep 06 '18 at 14:41
  • yes this is not the same issue. On the other topic that you relate, it's a space problem between itemize and enumerate. Thank's for the github link, I didn't have any idea about beamer on github :) – Lionel Sep 07 '18 at 07:11
  • @moewe Just to keep you informed: this problem has already been reported, see https://github.com/josephwright/beamer/issues/306 – samcarter_is_at_topanswers.xyz Sep 07 '18 at 11:41
  • @samcarter Thank you. (I probably should have checked ...) – moewe Sep 07 '18 at 11:45

1 Answers1

5

Just to understand where your problem comes from, you could imagine the minipages as boxes. In your example they behave like this:

enter image description here


I would suggest columns instead of ordinary minipages. The main advantage is that they allow you to specify a top alignment across the columns which will allow a stable positions despite the fact that the second column changes height between the slides.

Alternatively you could use an overlayarea, but I think using columns is easier.

Unrelated to the problem: instead of replacing the whole itemize environment, you could just pass the overlay instructions to the individual items.

\documentclass[t]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%\usepackage{mwe}

\begin{document}
\begin{frame}
\frametitle{Frame Title}
\begin{columns}[T,onlytextwidth]
\begin{column}{.24\textwidth}
    \vspace*{3cm}
    \includegraphics[width=\textwidth]{example-image}
\end{column}
\begin{column}{.74\textwidth}
    \includegraphics<1-2>[width=\textwidth]{example-image-a}
    \includegraphics<3>[width=\textwidth]{example-image-b}
    \begin{itemize}
        \item<only@1> blablabla1
        \item<only@2> blablabla2a
        \item<only@2> blablabla2b
        \item<only@3> blablabla3
    \end{itemize}
\end{column}
\end{columns}
\end{frame}
\end{document}

enter image description here