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

16 Fév '21, 10:05

samcarter's gravatar image

samcarter
8.7k2817

Avec `text=black` : \documentclass[tikz, border = 10pt]{standalone} \usetikzlibrary{shapes.geometric, backgrounds, positioning-plus, node-families, calc} \tikzset{ basic box/.style = { shape = rectangle, align = center, draw = #1, fill = #1!25, rounded corners, text=black}, header node/.style = { Minimum Width = header nodes, font = \strut\Large\ttfamily, text depth = +0pt, fill = white, draw, text=black}, header/.style = {% inner ysep = +1.5em, append after command = { \pgfextra{\let\TikZlastnode\tikzlastnode} node [header node] (header-\TikZlastnode) at (\TikZlastnode.north) {#1} node [span = (\TikZlastnode)(header-\TikZlastnode)] at (fit bounding box) (h-\TikZlastnode) {} }, }, hv/.style = {to path = {-|(\tikztotarget)\tikztonodes}}, vh/.style = {to path = {|-(\tikztotarget)\tikztonodes}}, fat blue line/.style = {ultra thick, blue} } \begin{document} \begin{tikzpicture}[node distance = 1.2cm, thick, nodes = {align = center}, >=latex] \node[Minimum Width = loop, shape = rectangle, rounded corners, fill = red,text=black] (pic) {Pictures} ; \node[Minimum Width = loop, shape = rectangle, rounded corners, fill = yellow, below = of pic,text=black] (data) {Data Center} ; \begin{scope}[on background layer] \node[fit = (pic)(data), basic box = blue, header = ahem] (test) {ahem}; \end{scope} \node[left = of test, basic box = green, header = header-text-2] (cs) {Text and text and text and text\\ and text\\and text again}; \end{tikzpicture} \end{document}\end{document} ![alt text][1] [1]: https://texnique.fr/osqa/upfiles/document_1m1WqBl.png
cliquez ici pour masquer/afficher la révision 1

16 Fév '21, 10:04

samcarter's gravatar image

samcarter
8.7k2817

\documentclass[tikz, border = 10pt]{standalone} \usetikzlibrary{shapes.geometric, backgrounds, positioning-plus, node-families, calc} \tikzset{ basic box/.style = { shape = rectangle, align = center, draw = #1, fill = #1!25, rounded corners, text=black}, header node/.style = { Minimum Width = header nodes, font = \strut\Large\ttfamily, text depth = +0pt, fill = white, draw, text=black}, header/.style = {% inner ysep = +1.5em, append after command = { \pgfextra{\let\TikZlastnode\tikzlastnode} node [header node] (header-\TikZlastnode) at (\TikZlastnode.north) {#1} node [span = (\TikZlastnode)(header-\TikZlastnode)] at (fit bounding box) (h-\TikZlastnode) {} }, }, hv/.style = {to path = {-|(\tikztotarget)\tikztonodes}}, vh/.style = {to path = {|-(\tikztotarget)\tikztonodes}}, fat blue line/.style = {ultra thick, blue} } \begin{document} \begin{tikzpicture}[node distance = 1.2cm, thick, nodes = {align = center}, >=latex] \node[Minimum Width = loop, shape = rectangle, rounded corners, fill = red,text=black] (pic) {Pictures} ; \node[Minimum Width = loop, shape = rectangle, rounded corners, fill = yellow, below = of pic,text=black] (data) {Data Center} ; \begin{scope}[on background layer] \node[fit = (pic)(data), basic box = blue, header = ahem] (test) {ahem}; \end{scope} \node[left = of test, basic box = green, header = header-text-2] (cs) {Text and text and text and text\\ and text\\and text again}; \end{tikzpicture} \end{document}