Presentation, graph, image positioning
Author
Octavian Ganea
Last Updated
10年前
License
Creative Commons CC BY 4.0
Abstract
Presentation, graph, image positioning
\documentclass{beamer} %
\usetheme{CambridgeUS}
\usepackage[latin1]{inputenc}
\usepackage{times}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{float}
\usepackage[export]{adjustbox}
\usepackage{graphicx}% http://ctan.org/pkg/graphicx
\usetikzlibrary{arrows,shapes}
\author{Author}
\title{Presentation title}
\begin{document}
% For every picture that defines or uses external nodes, you'll have to
% apply the 'remember picture' style. To avoid some typing, we'll apply
% the style to all pictures.
\tikzstyle{every picture}+=[remember picture]
% By default all math in TikZ nodes are set in inline mode. Change this to
% displaystyle so that we don't get small fractions.
\everymath{\displaystyle}
\begin{frame}
\frametitle{Example}
\tikzstyle{na} = [baseline=-.5ex]
% Below we mix an ordinary equation with TikZ nodes. Note that we have to
% adjust the baseline of the nodes to get proper alignment with the rest of
% the equation.
\includegraphics[width=0.09\textwidth]{1.jpg}
\tikz[na] \node[coordinate] (n1) {};
\hspace*{2cm}
\tikz[na]\node [coordinate] (n2) {};
\includegraphics[width=0.07\textwidth]{2.jpg}
\hspace*{2cm}
\tikz[na]\node [coordinate] (n3) {};
\includegraphics[width=0.07\textwidth]{3.jpg}
\hspace*{\fill}
\vskip 0.4cm
\includegraphics[width=0.12\textwidth]{11.jpg}
\tikz[na] \node[coordinate] (n11) {};
\hspace*{2cm}
\tikz[na]\node [coordinate] (n22) {};
\includegraphics[width=0.1\textwidth]{22.jpg}
\hspace*{2cm}
\tikz[na]\node [coordinate] (n33) {};
\includegraphics[width=0.13\textwidth]{33.jpg}
\hspace*{\fill}
\vskip 0.5cm
\tikz[baseline]{
\node[fill=blue!20,anchor=base] (t1)
{M{\"u}ller};
}, a
\tikz[baseline]{
\node[fill=red!20, ellipse,anchor=base] (t2)
{player};
} of
\tikz[baseline]{
\node[fill=green!20,anchor=base] (t3)
{Germany};
}
, helped his team to reach the
\tikz[baseline]{
\node[fill=yellow!20,ellipse, anchor=base] (t4)
{final};
} of the
\tikz[baseline]{
\node[fill=orange!20,ellipse, anchor=base] (t5)
{cup};
} by scoring the first goal against Brazil.
\vskip 0.3cm
\includegraphics[width=0.07\textwidth]{4.jpg}
\tikz[na] \node[coordinate] (n4) {};
\hspace*{4cm}
\tikz[na]\node [coordinate] (n5) {};
\includegraphics[width=0.1\textwidth]{5.jpg}
\hspace*{\fill}
\includegraphics[width=0.13\textwidth]{44.jpg}
\tikz[na] \node[coordinate] (n44) {};
\hspace*{4cm}
\tikz[na]\node [coordinate] (n55) {};
\includegraphics[width=0.1\textwidth]{55.jpg}
\hspace*{\fill}
% Now it's time to draw some edges between the global nodes. Note that we
% have to apply the 'overlay' style.
\begin{tikzpicture}[overlay]
\path[->]-> (n1) edge [out=0, in=15] (t1);
\path[->]-> (n11) edge [bend left] (t1);
\path[->]-> (n2) edge (t2);
\path[->]-> (n22) edge (t2);
\path[->]-> (n3) edge (t3);
\path[->]-> (n33) edge (t3);
\path[->]-> (n4) edge [out=0, in=-45] (t4);
\path[->]-> (n44) edge [out=0, in=-30] (t4);
\path[->]-> (n5) edge (t5);
\path[->]-> (n55) edge (t5);
\end{tikzpicture}
\end{frame}
\end{document}