Hallo,
das mit dem Anzeigen der Nodennamen lässt sich noch halbwegs einfach machen. Bei den Pfeilen wirst du aber kaum ohne zusätzliches Schreiben auskommen.
Eine Möglichkeit wäre
Code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\newcommand\coordbez[2]{}
\newcommand\showtikznodenames{%
\tikzset{name/.append style={/tikz/label={[green]\textbf{##1}}}}%
\renewcommand\coordbez[2]{\draw[->,red,very thick](##1)--(##2);}%
}
\begin{document}
\begin{tikzpicture}
\showtikznodenames
\node[rectangle,draw] (o1) {Objekt 1};
\node[rectangle,draw,below right = 2cm and 2cm of o1] (o2) {Objekt 2};\coordbez{o1}{o2}
\end{tikzpicture}
\hfill
\begin{tikzpicture}
\node[rectangle,draw] (o1) {Objekt 1};
\node[rectangle,draw,below right = 2cm and 2cm of o1] (o2) {Objekt 2};\coordbez{o1}{o2}
\end{tikzpicture}
\end{document}
\end{document}
Eine andere bei der die Abhängigkeiten unter die Noden geschrieben werden:
Code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{depending on/.style={}}
\newcommand\showtikznodenames{%
\tikzset{
name/.append style={/tikz/label={[green]\textbf{##1}}},
depending on/.style={label={[red!40,label position=below]\textbf{(##1)}}}
}}
\begin{document}
\begin{tikzpicture}\showtikznodenames
\node[rectangle,draw,name=o1] {Objekt 1};
\node[rectangle,draw,depending on=o1,below right = 2cm and 2cm of o1] (o2) {Objekt 2};
\node[rectangle,draw,depending on=o2,below left = 1cm and 2cm of o2] (o3) {Objekt 3};
\path(o1)--coordinate [depending on={o1,o2}](o4)(o2);
\draw[dashed](o3)--(o4);
\end{tikzpicture}
\hfill
\begin{tikzpicture}
\node[rectangle,draw,name=o1] {Objekt 1};
\node[rectangle,draw,depending on=o1,below right = 2cm and 2cm of o1] (o2) {Objekt 2};
\node[rectangle,draw,depending on=o2,below left = 1cm and 2cm of o2] (o3) {Objekt 3};
\path(o1)--coordinate [depending on={o1,o2}](o4)(o2);
\draw[dashed](o3)--(o4);
\end{tikzpicture}
\end{document}
Gruß
Elke
Lesezeichen