4

Hopefully, my question describes what I need. I want to add small colored box contains text or equation describing a picture in a presentation, I want the picture to come first, then the box, which may appear on one corner of the picture or just a above the picture. I found some stuff here, but not what I need now. Further more, I'm using two pictures on the side, so, I want to show the left picture first followed by the text box, then the other one, followed by another text box. I tried use another caption above the picture, but doesn't look good. This my code, I'm trying:

\documentclass[10pt]{beamer} 
\usepackage{beamerthemeWarsaw}
\usepackage{amsmath}        
\usepackage{graphicx}
\usepackage{epsfig} 
\usepackage{epstopdf}
\begin{document}
\begin{frame}{Robot Simulation}
\begin{columns}[c]
    \column{2in}  % slides are 3in high by 5in wide
    \begin{figure}[!h]
        \centering
        \caption{$\theta  = \begin{bmatrix} 0 & 0 & 0 & 0 \end{bmatrix} $}
        \includegraphics[scale=0.4]{Picture 1}
        \caption{Home position}
        \label{Home_Position}
    \end{figure}
    \column{2in}
    \begin{figure}[!h]
        \centering
        \includegraphics[scale=0.4]{Picture 2}
        \caption{Upright position}
        \label{Up_right}
    \end{figure}
\end{columns}
\end{frame}
\end{document}
AlFagera
  • 441

1 Answers1

4

Like this?

\documentclass[10pt]{beamer}
\usepackage{beamerthemeWarsaw}
\usepackage{amsmath}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{frame}{Robot Simulation}
\begin{columns}[c]
    \column{2in}  % slides are 3in high by 5in wide
    \begin{figure}[!h]
        \centering
        \onslide<2->{
        \begin{tcolorbox}[width=\columnwidth,colback=olive!60,colframe=red,center upper]
        $\theta  = \begin{bmatrix} 0 & 0 & 0 & 0 \end{bmatrix} $
        \end{tcolorbox}}
        \onslide<1->{\includegraphics[width=\columnwidth]{example-image}
        \caption{Home position}}
        \label{Home_Position}
    \end{figure}
    \column{2in}
    \begin{figure}[!h]
        \centering
        \onslide<4->{
        \begin{tcolorbox}[width=\columnwidth,colback=olive!60,colframe=red,center upper]
        $\theta  = \begin{bmatrix} 0 & 0 & 0 & 0 \end{bmatrix} $
        \end{tcolorbox}}
        \onslide<3->{\includegraphics[width=\columnwidth]{example-image-a}
        \caption{Upright position}}
        \label{Up_right}
    \end{figure}
\end{columns}
\end{frame}
\end{document}

enter image description here

Notes:

Use width for \includegraphics instead of scale.

  • Almost, just I want the equation to be in a colored box, I think I can try that. – AlFagera May 01 '15 at 13:13
  • When I put the equation, in a box, using tcolorbox command, the caption below the picture, disappeared, how can I locate, the box on top of the picture, right corner? – AlFagera May 01 '15 at 13:35
  • @AlFagera Please see the edit. –  May 01 '15 at 13:54
  • @ Harish Kumar, see my second comment, kindly. – AlFagera May 01 '15 at 14:15
  • @ Harish Kumar, Sorry, When I put the equation, in a box, using tcolorbox command, the caption below the picture, disappeared, how can I locate, the box on top of the picture, right corner, without more reducing the picture size? – AlFagera May 01 '15 at 14:48
  • @AlFagera They are not disappering in my code isn't it?. So I could not replicate the situation. However, you may try \begin{frame}[t] to put the contents little up. –  May 01 '15 at 14:55
  • No problem, I already tried with \begin{frame}[t] , I could show you my case, but I don't know really how to insert an active slide, as you did. I think we don't need to use @, since we're alone. Thanks you a did a good job, I'll vote up anyway, and I'll see. – AlFagera May 01 '15 at 15:40