두 그림 사이의 노드 정의

두 그림 사이의 노드 정의

두 그림 사이에 화살표를 원합니다. Tikz를 사용하여 할 수 있다는 것을 알고 있지만 그림 사이의 중간점 좌표를 어떻게 정의할 수 있습니까?

  \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}

답변1

물론 이 슬라이드에 무엇을 넣고 싶은지에 따라 다르지만 저는 columns이미지에 환경을 사용하지 않을 것입니다. 대신 두 이미지를 단일 환경에 넣겠습니다 tizpicture. 이렇게 하면 둘 사이에 화살표를 그리는 것이 쉽습니다.

\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}

실제로 환경 내부에 이미지를 넣어야 하는 경우 columns다음을 사용할 수 있습니다.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}

이 두 가지 접근 방식은 다음과 같은 결과를 가져옵니다.

여기에 이미지 설명을 입력하세요

물론 실제 이미지를 사용하여 이미지 배치와 크기를 미세 조정해야 합니다. 여기서는 다음의 예제 이미지를 사용했습니다.패키지. 전체 코드는 다음과 같습니다.

\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}

관련 정보