1

I want to let these boxes and text-labels fade after sometime, as it would lead to unwarranted cluttering in the image. Also, I want to ultimately put the image slideshow as a part of the beamer presentation.

 \documentclass{standalone}
 \usepackage{graphicx}
 \usepackage{tikz}
 \begin{document}
 \begin{tikzpicture}[
 every pin edge/.style={thick,blue!50},pin distance=15mm,
 cir/.style = {align=center,circle,fill=blue!50,minimum size=6pt,inner sep=0pt}]
 \node[anchor=south west,inner sep=0] (image) at (0,0) 
 {\includegraphics[width=1\textwidth]{example-image-a}};
 \begin{scope}
        [
          x={(image.south east)},
          y={(image.north west)}
        ]
 %     \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
 %     \foreach \x in {0,1,...,9} { \node [anchor=north,font=\tiny] at (\x/10,0) {0.\x}; }
 %     \foreach \y in {0,1,...,9} { \node [anchor=east,font=\tiny] at (0,\y/10) {0.\y}; }
  \begin{scope}[x={(image.south east)},y={(image.north west)}]
   \only<2->
   { 
   \node [cir,pin=20:{Standard}] at (0.55,0.75) {};
   \draw[red,ultra thick,rounded corners] (0.315,0.5) rectangle (0.59,0.87);
   }
   \only<3->
   {
   \node [cir,pin=240:{Standard2}] at (0.45,0.25) {};
   \draw[red,ultra thick,rounded corners] (0.3,0.02) rectangle (0.61,0.41);
   }
   \only<4->
   {
   \node [cir,pin=110:{ABCD}] at (0.16,0.45) {};
   \draw[blue,ultra thick,rounded corners] (0.10,0.29) rectangle (0.28,0.6);
   }
   \only<5->
   {
   \node [cir,pin=60:\parbox{4cm}{EFGHI}] at (0.82,0.45) {};
   \draw[blue,ultra thick,rounded corners] (0.7,0.29) rectangle (0.85,0.5);
   }
   \only<6->
   {
   \node [cir,pin=20:\parbox{4cm}{lorem}] at (0.65,0.15) {};
   \draw[green,ultra thick,rounded corners] (0.6,0.12) rectangle (0.7,0.28);
   }
 \end{scope}
 \end{scope}
 \end{tikzpicture}
 \end{document}`
3
  • 1
    Please clean up your post ;-) The class is standalone, not stanalone ;-)
    – user31729
    Commented Jan 25, 2015 at 9:47
  • 1
    Remove the - from numbers like \only<2> and so on.
    – user11232
    Commented Jan 25, 2015 at 10:02
  • <metacomment> What is the purpose of the -? Commented Jan 25, 2015 at 10:04

1 Answer 1

3

You can put the boxes one per frame by \only<slide number>. If you don't know the slide number in a large presentation, but want to display them one by one, then use \only<+>. like in

 \documentclass{beamer}
 \usepackage{tikz}
 \begin{document}
 \begin{frame}
 \begin{overprint}
 \begin{tikzpicture}[
 every pin edge/.style={thick,blue!50},pin distance=15mm,
 cir/.style = {align=center,circle,fill=blue!50,minimum size=6pt,inner sep=0pt}]
 \node[anchor=south west,inner sep=0] (image) at (0,0)
 {\includegraphics[width=1\textwidth]{example-image-a}};
 \begin{scope}
        [
          x={(image.south east)},
          y={(image.north west)}
        ]
 %     \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);
 %     \foreach \x in {0,1,...,9} { \node [anchor=north,font=\tiny] at (\x/10,0) {0.\x}; }
 %     \foreach \y in {0,1,...,9} { \node [anchor=east,font=\tiny] at (0,\y/10) {0.\y}; }
  \begin{scope}[x={(image.south east)},y={(image.north west)}]
   \only<+>
   {
   \begin{scope}[overlay]
   \node [cir,pin=20:{Standard}] at (0.55,0.75) {};
   \draw[red,ultra thick,rounded corners] (0.315,0.5) rectangle (0.59,0.87);
   \end{scope}
   }
   \only<+>
   {
   \begin{scope}[overlay]
   \node [cir,pin=240:{Standard2}] at (0.45,0.25) {};
   \draw[red,ultra thick,rounded corners] (0.3,0.02) rectangle (0.61,0.41);
   \end{scope}
   }
   \only<+>
   {
   \begin{scope}[overlay]
   \node [cir,pin=110:{ABCD}] at (0.16,0.45) {};
   \draw[blue,ultra thick,rounded corners] (0.10,0.29) rectangle (0.28,0.6);
   \end{scope}
   }
   \only<+>
   {
   \begin{scope}[overlay]
   \node [cir,pin=60:\parbox{4cm}{EFGHI}] at (0.82,0.45) {};
   \draw[blue,ultra thick,rounded corners] (0.7,0.29) rectangle (0.85,0.5);
   \end{scope}
   }
   \only<+>
   {
   \begin{scope}[overlay]
   \node [cir,pin=20:\parbox{4cm}{lorem}] at (0.65,0.15) {};
   \draw[green,ultra thick,rounded corners] (0.6,0.12) rectangle (0.7,0.28);
   \end{scope}
   }
 \end{scope}
 \end{scope}
 \end{tikzpicture}
 \end{overprint}
 \end{frame}

 \end{document}

enter image description here

I have used scope to overlay the marks so that the slide doesn't jump. Corrections are needed for the positions of lines and nodes which I have left out.

6
  • Do the slides have relative numbering in \only? Or do we have to know the slide number in advance? Commented Jan 25, 2015 at 10:06
  • 1
    @envy_intelligence You have to know them. You have to decide what is shown on which slide.
    – user11232
    Commented Jan 25, 2015 at 10:07
  • Ok, but the image A slideshow is going to be part of a bigger presentation. If there are X number of slides before the Image A, should it be \only<X+1> ? . Please advise me regarding the numbering. Commented Jan 25, 2015 at 10:12
  • 1
    @envy_intelligence Oh! then use \only<+>. I will update the answer.
    – user11232
    Commented Jan 25, 2015 at 10:19
  • 1
    No need to load graphicx with beamer (the class already loads it). Commented Jan 25, 2015 at 17:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .