• # Trouvé

    Posté par . En réponse au message [Résolu]LaTeX tikz. Évalué à 6.

    J’ai trouvé ma réponse ici.

    Voici le code avec une frame que j’avais oublié.

    \documentclass[hyperref={pdfpagemode=FullScreen,colorlinks=true},xcolor=table]{beamer}
    \usepackage[frenchb]{babel}
    \usepackage[utf8x]{inputenc}
     \usepackage{default}
     \usepackage{multicol}
     \usetheme{Warsaw} \setbeamertemplate{headline}{}
     %\usetheme{Berkeley}
     %\usetheme{Marburg}
     \usepackage{tikz}
     \usetikzlibrary{positioning}
     %\usetikzlibrary{calc}
     \begin{document}
     \tikzstyle{every picture}+=[remember picture]
     \tikzstyle{na} = [baseline=-.5ex]
    \begin{frame}{exemple}
     \begin{tikzpicture}
     [inner sep=2mm,
     espace/.style={rectangle,draw=blue!50,fill=blue!20,thick},
     depots/.style={rectangle,draw=black!50,fill=black!20,thick},
     index/.style={rectangle,draw=green!50,fill=green!20,thick}]
     \node[espace] (Principe_Espace_de_travail) {Espace de travail};
     \node[index] (Principe_Index) [above=of Principe_Espace_de_travail]{Index};
     \node[depots] (Principe_Depot) [above=of Principe_Index]{Dépôt};
     \node[depots] (Principe_Distant) [right= of Principe_Depot]{Dépôt distant};
     \draw[->] (Principe_Espace_de_travail.100) -- node[auto] {add} (Principe_Index.260);
     \draw[->] (Principe_Index.100) -- node[auto] {commit} (Principe_Depot.260);
     \draw[->] (Principe_Depot.280) to[bend left=70] node[auto] {checkout} (Principe_Espace_de_travail.80);
     %\draw[->] ($(Principe_Depot.east)+(0,1mm)$) -- node[auto] {push} ($(Principe_Distant.west)+(0,1mm)$);
     \draw[->] ([yshift=1mm]Principe_Depot.east) -- node[auto] {push} ([yshift=1mm]Principe_Distant.west);
     \draw[->] ([yshift=-1mm]Principe_Distant.west) -- node[auto] {fetch} ([yshift=-1mm]Principe_Depot.east);
     \end{tikzpicture}
    \end{frame}
    \end{document}