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.

I have been trying to create a list and a bunch of subfigures (both on each half of the slide). I have used \setbeamercovered{transparent}to progress along the list per keystroke. I want this keystroke to also be used to draw tikz overlays on the figure. I saw quite a few solutions, but all of them were using just a single figure. I cant seem to get it working for subfigures. Can someone please help me out..

Here is my minimal code..

\frame  
{  
  \setbeamercovered{transparent}  
\frametitle{Title}  
\begin{minipage}[t]{0.5\linewidth}  
\begin{itemize}[<+->]  
\item  
\item  
\item  
\item  
\end{itemize}  
\end{minipage}  
\hfill   
\vspace{-120pt}  
\begin{minipage}[t]{2\linewidth}  
\setcounter{subfigure}{0}  
\begin{figure}[!th]  
\centering  
\subfigure[1]{  
\includegraphics[scale=.25]{scen-q.pdf}  
\label{fig:scen1subfig1}  
}  
\hspace{-10pt}  
\subfigure[2]{  
\includegraphics[scale=.25]{scen-b.pdf}  
\label{fig:scen1subfig2}  
}
\newline
\subfigure[3]{
\includegraphics[scale=.25]{scen-s.pdf}
\label{fig:scen1subfig3}
}  
\subfigure[4]{  
\includegraphics[scale=.25]{scen-sw.pdf}  
\label{fig:scen1subfig4}  
}  
\hspace{130pt}  
\label{fig:scencomp}  
\end{figure}  
\end{minipage}  
}

I have seen this as a solution before

\begin{tikzpicture}    
\node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=1\textheight]{5.pdf}};  
\draw<1>[red,ultra thick,rounded corners] (1.6,1) rectangle (\textheight-1cm,5);  
\draw<2>[red,ultra thick,rounded corners] (5.7,4.1) rectangle (7.5,4.9);  
\end{tikzpicture} 

But how do I do the same for subfigures?

share|improve this question
    
Can you complete your code snippet to a minimal working example (MWE) that illustrates your problem and shows which packages you use? –  percusse Oct 9 '12 at 15:57

1 Answer 1

I am not sure if this is the kind of overlay effect that you are trying to achieve; I used \onslide so that each image will become visible simultaneously with a corresponding item:

\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}
\usepackage{subfigure}

\begin{document}

\begin{frame}  
\frametitle{Title}  

\begin{minipage}[t]{0.5\linewidth}  
\begin{itemize}[<+->]  
\item  First item.
\item  Second item.
\item  Third item.
\item  Fourth item.
\end{itemize}  
\end{minipage}%  
\begin{minipage}[t]{0.5\linewidth}  
\setcounter{subfigure}{0}  
\begin{figure} 
\onslide<1->{\subfigure[1]{%  
  \includegraphics[height=1cm,width=2cm]{scen-q.pdf}
}%
\label{fig:scen1subfig1}}\hfill
\onslide<2->{\subfigure[2]{% 
  \includegraphics[height=1cm,width=2cm]{scen-b.pdf}  
}%
\label{fig:scen1subfig2}}\\
\onslide<3->{\subfigure[3]{%
  \includegraphics[height=1cm,width=2cm]{scen-s.pdf}
}%  
\label{fig:scen1subfig3}}\hfill
\onslide<4>{\subfigure[4]{%  
  \includegraphics[height=1cm,width=2cm]{scen-sw.pdf}  
}%
\label{fig:scen1subfig4}}%
\caption{test figure}
\label{fig:scencomp}  
\end{figure}  
\end{minipage}  
\end{frame}

\end{document}

enter image description here

Please notice that I included some % characters that are essential to suppress spurious blank spaces. Also, subfigure is an obsolete package, so it would be a good idea to use subcaption instead.

Since I didn't have your actual figures, I used \PassOptionsToPackage{demo}{graphicx}; this simply replaces actual figures with black rectangles; delete that line in your actual document.

share|improve this answer
    
Hi, thanks so much for your response..I will try it out immediately! –  jamie Oct 10 '12 at 8:36
    
Hi, as a more elegant way to solve my problem, I came across \fcolorbox. With this I can draw boxes on top of my figures and highlight what I wanna speak about, but I am now restricted by the size of this box. Is there a way to draw a box to any size without putting text into it? –  jamie Oct 10 '12 at 13:13
    
@jamie sure, but it's hard to give precise advise without seeing some code illustrating what are you trying to do. Can you please edit your question and add (not replace, just add) the new information and a minimal example (as in my answer) of your code? –  Gonzalo Medina Oct 10 '12 at 13:34

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.