0

I want an arrow between the two figures, I know I can do it using Tikz, but how can I define the coordinates of the middle points between the figures.

  \documentclass{beamer}
   \usepackage{tikz}
 \begin{document}
\begin{frame}{Advantages Vs. a Word processor}
 \underline{How dose it look like?} \\ \vspace{1em}

            \begin{columns}[T,onlytextwidth]
            \begin{column}{.4\textwidth}
            {\tikz\node[coordinate](start1){};}
            \includegraphics[scale=0.17]{Lat001.png}
            
            
\end{column}
  
 \documentclass{beamer}
 \begin{column}{.4\textwidth}
{\tikz\node[coordinate](end1){};}
     \includegraphics[width=15cm,
  height=5cm,
  keepaspectratio]{Lat002.png}       
            \end{column}
            \end{columns}
            
           % \begin{tikzpicture}[overlay, remember picture, -latex, color=blue!15!red, 
% yshift=1ex, shorten >=1pt, shorten <=1pt, line width=0.1cm]
  % \path[->] (start1) edge [out=150, in=240] (end1);
%\end{tikzpicture}
\end{frame}
 \end{document}
3
  • ??????? your code does not compile
    – js bibra
    Sep 24 '20 at 5:04
  • You need figures to compile it, should I upload them
    – Diana
    Sep 24 '20 at 5:07
  • 1
    The problem with your MWE is not so much the missing images but the two \documentclass commands,
    – user30471
    Sep 24 '20 at 5:52
1

Of course, it depends what you want to put on this slide but I would not use a columns environment for the images. Instead, I would put both images inside a single tizpicture environment. Doing this way it is easy to draw the an arrow between them:

\begin{tikzpicture}
  \node (start1) at (0,0) {\includegraphics[scale=0.17]{example-image-a}};
  \node (end1) at   (10,0) {
    \includegraphics[width=15cm, height=5cm, 
        keepaspectratio=0.17]{example-image-b}
  };
  \draw[thick, ->](start1.east)--(end1.west);
\end{tikzpicture}

If you really need to put the images inside a columns environment then you can use TikZmark:

\begin{columns}[T,onlytextwidth]
  \begin{column}{.4\textwidth}
     \tikzmarknode{start2}{
       \includegraphics[scale=0.17]{example-image-a}
     }
  \end{column}
  \begin{column}{.4\textwidth}
    \tikzmarknode{end2}{
      \includegraphics[width=15cm, height=5cm, 
          keepaspectratio=0.17]{example-image-b}
    }
    \tikz[remember picture,overlay]{
       \draw[thick, ->](start2.east)--(end2.west);
    }
  \end{column}
\end{columns}

These two approaches lead to the following:

enter image description here

Of course, you will need to fine-tune the image placement and size using your real images. Here I have used example images from the mwe package. Here is the full code:

\documentclass{beamer}
\usepackage{tikz}
\usepackage{mwe}
\usetikzlibrary{tikzmark}

\begin{document}

  \begin{frame}{Advantages Vs. a Word processor}
    \underline{How does it look like?} \\ \vspace{1em}

   \begin{tikzpicture}
     \node (start1) at (0,0) {
       \includegraphics[scale=0.17]{example-image-a}
     };
     \node (end1) at   (10,0) {
        \includegraphics[width=15cm, height=5cm, 
            keepaspectratio=0.17]{example-image-b}
     };
     \draw[thick, ->](start1.east)--(end1.west);
   \end{tikzpicture}

  \end{frame}

  \begin{frame}[fragile]{Advantages Vs. a Word processor}
    \underline{How does it look like?} \\ \vspace{1em}

    \begin{columns}[T,onlytextwidth]
      \begin{column}{.4\textwidth}
         \tikzmarknode{start2}{
            \includegraphics[scale=0.17]{example-image-a}
         }
      \end{column}
      \begin{column}{.4\textwidth}
        \tikzmarknode{end2}{
          \includegraphics[width=15cm, height=5cm,
                  keepaspectratio=0.17]{example-image-b}
        }
        \tikz[remember picture,overlay]{ 
           \draw[thick, ->](start2.east)--(end2.west); 
        }
      \end{column}
    \end{columns}

  \end{frame}

 \end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.