Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

31 Mai '16, 07:36

saputello's gravatar image

saputello
11.1k174365

newcommand \newcommand in tikz Umgebung mit Fehler

Ich möchte einen neuen Befehl mit newcommand `\newcommand` erstellen. Dieser soll in einer tikzpicture `tikzpicture` Umgebung verwendet werden. Wenn ich den Code unten Erstellen möchte bekomme ich folgende Fehlermeldung: > Package >`Package pgfkeys Error: I do not know > the >the key '/tikz/below of=node1' and I > am >am going to ignore it. Perhaps you > misspelled >misspelled it. > ...artstop{node2}{Textinhalt}{below > of=node1} >...artstop{node2}{Textinhalt}{below >of=node1}` \documentclass{standalone} \pagestyle{empty} \usepackage[utf8]{inputenc} \usepackage{tikz} \tikzstyle{startstop} = [ % Start Stop Shape rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=red!30 ] \newcommand{\startstop}[3]{\node ({#1}) [startstop, {#3}] {#2};} \begin{document} \begin{tikzpicture}[node distance=2cm, auto] \node (node0) [startstop] {Start}; \node (node1) [startstop, below of=node0] {Text}; \startstop{node2}{Textinhalt}{below of=node1} \end{tikzpicture} \end{document} Wenn ich als 3. Argument meinem Befehl nur ein Wort übergebe funktioniert der Befehl einwandfrei. Wie kann ich meinen Befehl ändern, sodass ich ihn wie unten benutzen kann?
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

29 Mai '16, 16:58

raccoon's gravatar image

raccoon
2612

newcommand in tikz Umgebung mit Fehler

Ich möchte einen neuen Befehl mit newcommand erstellen. Dieser soll in einer tikzpicture Umgebung verwendet werden. Wenn ich den Code unten Erstellen möchte bekomme ich folgende Fehlermeldung: > Package pgfkeys Error: I do not know > the key '/tikz/below of=node1' and I > am going to ignore it. Perhaps you > misspelled it. > ...artstop{node2}{Textinhalt}{below > of=node1} \documentclass{standalone} \pagestyle{empty} \usepackage[utf8]{inputenc} \usepackage{tikz} \tikzstyle{startstop} = [ % Start Stop Shape rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=red!30 ] \newcommand{\startstop}[3]{\node ({#1}) [startstop, {#3}] {#2};} \begin{document} \begin{tikzpicture}[node distance=2cm, auto] \node (node0) [startstop] {Start}; \node (node1) [startstop, below of=node0] {Text}; \startstop{node2}{Textinhalt}{below of=node1} \end{tikzpicture} \end{document} Wenn ich als 3. Argument meinem Befehl nur ein Wort übergebe funktioniert der Befehl einwandfrei. Wie kann ich meinen Befehl ändern, sodass ich ihn wie unten benutzen kann?

Willkommen, erstes Mal hier? Schau mal unter FAQ!

×