Historique des modifications [retour]
cliquez ici pour masquer/afficher la révision 3
mineure

09 Aoû '17, 18:43

Pathe's gravatar image

Pathe
7.5k48207252

J'ai adapté la réponse fournie sur [stackexchange](https://tex.stackexchange.com/questions/348978/diagram-and-child-with-tikz). Je considère que le diagramme comporte deux colonnes ; dans les cellules de la première figurent des capitales simples (A, B, C, D & E) tandis que dans la deuxième il y a des capitales doubles (AA, BB, etc.). Les nœuds sont identifiés par les minuscules correspondantes. Le premier niveau comporte un sous-niveau, identifié par A.1, A.2 & A.3 pour les cellules et `a1`, `a2` et `a3 `a3` pour les nœuds. La deuxième colonne présente un niveau intermédiaire entre C & D, qui est identifié par CD pour la cellule, et `cd` pour le nœud. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows, shapes, positioning, shadows, trees} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english, frenchb]{babel} \usepackage{ucs} \usepackage{smartdiagram} %\usepackage{positioning, pgf, pgfarrows, pgfnodes, pgfautomata, pgfheaps, pgfshade} \usepackage{lmodern} \tikzset{ basic/.style = {draw, text width=12em, drop shadow, font=\sffamily, rectangle}, root/.style = {basic, rounded corners=2pt, thin, align=center, fill=cyan!30}, level 2/.style = {basic, rounded corners=6pt, thin, align=center, fill=cyan!60, text width=4em}, level 3/.style = {basic, thin, align=center, fill=pink!60, text width=6.5em} } \begin{document} \begin{tikzpicture}[font=\sffamily, level 1/.style={sibling distance=30mm}, edge from parent/.style={->,draw}, >=latex] % Racine de l'arbre \node[root] (a) {A} % Premier niveau : trois branches child {node[level 2] (a1) {A.1}} child {node[level 2] (a2) {A.2}} child {node[level 2] (a3) {A.3}}; % Niveaux suivants, positionnés les uns par rapport aux autres \begin{scope}[every node/.style={level 3}] \node [below = of a2, text width=6cm, draw](b) {B}; \node [below = of b, text width=4cm, draw](c) {C}; \node [below = of c, text width=4cm, draw](d) {D}; \node [below = of d, text width=2cm, draw](e) {E}; \end{scope} \foreach \i/\j in {a2/b, b/c, d/e} \draw[cyan, line width=1mm, >=latex, shorten >=.5mm, shorten <=1mm, ->] (\i)--(\j); \begin{scope}[every node/.style={text width=4cm, ellipse, draw, align=center, font=\sffamily, top color=white, bottom color=black!40}] \node[right = 2cm of a] (aa) {AA}; \node (bb) at (b-|aa) {BB}; \path (c)--coordinate (aux) (d) ; \node (cd) at (aux-|aa) {CD}; \node (ee) at (e-|aa) {EE}; \end{scope} \begin{scope}[line width=.5mm, >=latex, shorten >=1mm, shorten <=1mm, ->] \draw (a) -- (aa); \draw (b) -- (bb); \draw (c.east) --++(0:5mm)|- (cd); \draw (d.east) --++(0:5mm)|- (cd); \draw (e) -- (ee); \end{scope} \end{tikzpicture} \end{document} ![alt text][1] [1]: http://texnique.fr:80/osqa/upfiles/arbretikz.png
cliquez ici pour masquer/afficher la révision 2
mineure

09 Aoû '17, 18:43

Pathe's gravatar image

Pathe
7.5k48207252

J'ai adapté la réponse fournie sur stackexchange. [stackexchange](https://tex.stackexchange.com/questions/348978/diagram-and-child-with-tikz). Je considère que le diagramme comporte deux colonnes ; dans les cellules de la première figurent des capitales simples (A, B, C, D & E) tandis que dans la deuxième il y a des capitales doubles (AA, BB, etc.). Les nœuds sont identifiés par les minuscules correspondantes. Le premier niveau comporte un sous-niveau, identifié par A.1, A.2 & A.3 pour les cellules et a1, a2 `a1`, `a2` et a3 `a3 pour les nœuds. La deuxième colonne présente un niveau intermédiaire entre C & D, qui est identifié par CD pour la cellule, et cd `cd` pour le nœud. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows, shapes, positioning, shadows, trees} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english, frenchb]{babel} \usepackage{ucs} \usepackage{smartdiagram} %\usepackage{positioning, pgf, pgfarrows, pgfnodes, pgfautomata, pgfheaps, pgfshade} \usepackage{lmodern} \tikzset{ basic/.style = {draw, text width=12em, drop shadow, font=\sffamily, rectangle}, root/.style = {basic, rounded corners=2pt, thin, align=center, fill=cyan!30}, level 2/.style = {basic, rounded corners=6pt, thin, align=center, fill=cyan!60, text width=4em}, level 3/.style = {basic, thin, align=center, fill=pink!60, text width=6.5em} } \begin{document} \begin{tikzpicture}[font=\sffamily, level 1/.style={sibling distance=30mm}, edge from parent/.style={->,draw}, >=latex] % Racine de l'arbre \node[root] (a) {A} % Premier niveau : trois branches child {node[level 2] (a1) {A.1}} child {node[level 2] (a2) {A.2}} child {node[level 2] (a3) {A.3}}; % Niveaux suivants, positionnés les uns par rapport aux autres \begin{scope}[every node/.style={level 3}] \node [below = of a2, text width=6cm, draw](b) {B}; \node [below = of b, text width=4cm, draw](c) {C}; \node [below = of c, text width=4cm, draw](d) {D}; \node [below = of d, text width=2cm, draw](e) {E}; \end{scope} \foreach \i/\j in {a2/b, b/c, d/e} \draw[cyan, line width=1mm, >=latex, shorten >=.5mm, shorten <=1mm, ->] (\i)--(\j); \begin{scope}[every node/.style={text width=4cm, ellipse, draw, align=center, font=\sffamily, top color=white, bottom color=black!40}] \node[right = 2cm of a] (aa) {AA}; \node (bb) at (b-|aa) {BB}; \path (c)--coordinate (aux) (d) ; \node (cd) at (aux-|aa) {CD}; \node (ee) at (e-|aa) {EE}; \end{scope} \begin{scope}[line width=.5mm, >=latex, shorten >=1mm, shorten <=1mm, ->] \draw (a) -- (aa); \draw (b) -- (bb); \draw (c.east) --++(0:5mm)|- (cd); \draw (d.east) --++(0:5mm)|- (cd); \draw (e) -- (ee); \end{scope} \end{tikzpicture} \end{document} ![alt text][1] [1]: http://texnique.fr:80/osqa/upfiles/arbretikz.png
cliquez ici pour masquer/afficher la révision 1

09 Aoû '17, 18:41

Pathe's gravatar image

Pathe
7.5k48207252

C'est votre première visite ici ? Consultez la FAQ !

×