I want to create an interactive slide, which will have two parts:
- In the left side, some comments will be given in
enumerate
environment (one will be highlighted at each overlay) - In the right side, an image will accompany the currently highlighted text (say, an arrow will be shown in that image)
For example, have a look at frame numbered 23 of this file.
Screen-shot:
What is the best way to do this?
As per asked, this is (a short version of) what I am trying…
MWE
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{minipage}{0.2\textwidth}
\begin{enumerate}
\item this is 1
\item this is 2
\end{enumerate}
\end{minipage}
\hfill
\begin{minipage}{0.75\textwidth}
\only<1> {\includegraphics[width=.75\textwidth]{fig4-2}}
\only<2> {\includegraphics[width=.75\textwidth]{fig4-3}}
\end{minipage}
\end{frame}
\end{document}
The images are:
fig4-2
fig4-3
Update
As @GonzaloMedina replies on the left-hand-side part (that solves my current problem), now I am left with dynamically creating the images. That means, rather than creating each image separately and then including is a tiresome and monotonous job. There should be some better way to reproduce one image from its predecessor. To complete the whole question, as per his (Gonzalo Medina) suggestion, I am creating this follow-up question.
Best Answer
Here's one way to do it:
The code:
Using the
tikzmark
library, the\Highlight
command places a colorized rectangle in the background. I assumed here that the text to be highlighted spans no more than a line; otherwise, a modification on the definition will be required; for example,The code needs two or thee runs to stabilize.