von Bartman » Do 2. Apr 2020, 15:33
Verwende die Option preview der Klasse, wenn Du die figure-Umgebung aus dem Beispiel nicht entfernst.
Du kannst die Bibliotheken fit und backgrounds einsetzen:
\documentclass[tikz, border=5pt]{standalone}
\usetikzlibrary{shapes,arrows.meta,positioning,fit,backgrounds}
\begin{document}
\begin{tikzpicture}[
auto,
thick,
StartEnde/.style = {
draw,
fill=gray!55,
rounded rectangle,
rounded corners,
minimum width=12em,
minimum height=3em,
align=center
},
Block/.style = {
draw,
fill=gray!15,
rounded corners,
minimum width=12em,
minimum height=3em,
align=center
},
Entscheidung/.style = {
draw,
fill=gray!35,
diamond,
text width=6em,
align=flush center,
inner sep=0pt
},
Linie/.style = {
draw,
-Stealth
}
]
\node [StartEnde] (1) {Start};
\node [Block, below=of 1] (2) {Schritt 1};
\node [Block, below=of 2] (3) {Schritt 2};
\node [Block, below=of 3] (4) {Schritt 3};
\node [Block, below=of 4] (5) {noch was};
\begin{scope}[on background layer]
\node [
draw,
rounded corners,
fill=gray!40,
fit=(2)(3)(4),
label={[anchor=south east]above:für alle Produkte}
] (box) {};
\end{scope}
\node [Entscheidung, below=of 5] (6) {Abbruch- kriterium?};
\node [StartEnde, below=of 6] (7) {Ziel};
\path [Linie]
(1) edge (2)
(2) edge (3)
(3) edge (4)
(4) edge (5)
(5) edge (6)
(6) edge (7)
;
\path [Linie] (6) -- node {nein} + (4,0) |- (box);
\path [Linie] (6) -- node {ja} (7);
\end{tikzpicture}
\end{document}
Verwende die Option [tt]preview[/tt] der Klasse, wenn Du die [tt]figure[/tt]-Umgebung aus dem Beispiel nicht entfernst.
Du kannst die Bibliotheken [tt]fit[/tt] und [tt]backgrounds[/tt] einsetzen:
[code]\documentclass[tikz, border=5pt]{standalone}
\usetikzlibrary{shapes,arrows.meta,positioning,fit,backgrounds}
\begin{document}
\begin{tikzpicture}[
auto,
thick,
StartEnde/.style = {
draw,
fill=gray!55,
rounded rectangle,
rounded corners,
minimum width=12em,
minimum height=3em,
align=center
},
Block/.style = {
draw,
fill=gray!15,
rounded corners,
minimum width=12em,
minimum height=3em,
align=center
},
Entscheidung/.style = {
draw,
fill=gray!35,
diamond,
text width=6em,
align=flush center,
inner sep=0pt
},
Linie/.style = {
draw,
-Stealth
}
]
\node [StartEnde] (1) {Start};
\node [Block, below=of 1] (2) {Schritt 1};
\node [Block, below=of 2] (3) {Schritt 2};
\node [Block, below=of 3] (4) {Schritt 3};
\node [Block, below=of 4] (5) {noch was};
\begin{scope}[on background layer]
\node [
draw,
rounded corners,
fill=gray!40,
fit=(2)(3)(4),
label={[anchor=south east]above:für alle Produkte}
] (box) {};
\end{scope}
\node [Entscheidung, below=of 5] (6) {Abbruch- kriterium?};
\node [StartEnde, below=of 6] (7) {Ziel};
\path [Linie]
(1) edge (2)
(2) edge (3)
(3) edge (4)
(4) edge (5)
(5) edge (6)
(6) edge (7)
;
\path [Linie] (6) -- node {nein} + (4,0) |- (box);
\path [Linie] (6) -- node {ja} (7);
\end{tikzpicture}
\end{document}[/code]