Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 2
Ajout des coordonnées relatives

10 Mai '16, 14:35

jerome%20dequeker's gravatar image

jerome dequeker
836714

\documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \begin{document} \begin{frame} \begin{tikzpicture} \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (a)at(5,4){a}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (b)at(4,3){b}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (c)at(6,3){c}; \node[draw,circle,rounded corners=3pt,fill=blue!10] (un)at(5,2){1}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (deux)at(5,1){2}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (trois)at(5,0){3}; \draw[->,draw=blue,fill=blue,line width=0.25mm] (b) -- (a) node[midway,left]{texte1}; \draw[->,draw=blue,fill=blue,line width=0.25mm] (c) -- (a) node[midway,right]{texte2}; \only<2>{ \draw[->,draw=blue,fill=blue,line width=1mm] (un.south) -- (deux.north); \draw[->,draw=blue,fill=blue,line width=1mm] (deux.south) -- (trois.north); \draw[->,draw=blue,fill=blue,line width=1mm] (a.south) -- (un.north); \draw[->,draw=blue,fill=blue,line width=1mm] (b) -- (un); \draw[->,draw=blue,fill=blue,line width=1mm] (c) -- (un); } \end{tikzpicture} \end{frame} \end{document} Ou avec des coordonnées relatives (à ajuster plus facilement que les coordonnées absolues) : \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{frame} \begin{tikzpicture}[every text node part/.style={align=center}] \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (trois)at(5,0){Texte vraiment \\ très long}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] at ($(trois)+(0,1.5)$) (deux) {Texte vraiment très long}; \node[draw,circle,rounded corners=3pt,fill=blue!10] at($(deux)+(0,2.5)$) (un) {Texte vraiment \\ très long}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] at($(un)+(0,2.5)$) (a) {Texte vraiment très long}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] at($(un)+(-3,1)$) (b) {Texte vraiment très long}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] at($(un)+(3,1)$) (c) {Texte vraiment très long}; \draw[->,draw=blue,fill=blue,line width=0.25mm] (b) -- (a) node[midway,left]{bla bla bla}; \draw[->,draw=blue,fill=blue,line width=0.25mm] (c) -- (a) node[midway,right]{bla bla bla}; \only<2>{ \draw[->,draw=blue,fill=blue,line width=1mm] (un.south) -- (deux.north); \draw[->,draw=blue,fill=blue,line width=1mm] (deux.south) -- (trois.north); \draw[->,draw=blue,fill=blue,line width=1mm] (a.south) -- (un.north); \draw[->,draw=blue,fill=blue,line width=1mm] (b) -- (un); \draw[->,draw=blue,fill=blue,line width=1mm] (c) -- (un); } \end{tikzpicture} \end{frame} \end{document}
cliquez ici pour masquer/afficher la révision 1

10 Mai '16, 10:43

jerome%20dequeker's gravatar image

jerome dequeker
836714

\documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \begin{document} \begin{frame} \begin{tikzpicture} \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (a)at(5,4){a}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (b)at(4,3){b}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (c)at(6,3){c}; \node[draw,circle,rounded corners=3pt,fill=blue!10] (un)at(5,2){1}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (deux)at(5,1){2}; \node[draw,rectangle,rounded corners=3pt,fill=blue!10] (trois)at(5,0){3}; \draw[->,draw=blue,fill=blue,line width=0.25mm] (b) -- (a) node[midway,left]{texte1}; \draw[->,draw=blue,fill=blue,line width=0.25mm] (c) -- (a) node[midway,right]{texte2}; \only<2>{ \draw[->,draw=blue,fill=blue,line width=1mm] (un.south) -- (deux.north); \draw[->,draw=blue,fill=blue,line width=1mm] (deux.south) -- (trois.north); \draw[->,draw=blue,fill=blue,line width=1mm] (a.south) -- (un.north); \draw[->,draw=blue,fill=blue,line width=1mm] (b) -- (un); \draw[->,draw=blue,fill=blue,line width=1mm] (c) -- (un); } \end{tikzpicture} \end{frame} \end{document}