I am trying to get tikz to draw some arrows for me and I keep getting the following error message:
Package pgfkeys Error: I do not know the key '/tikz/line' and I am going to ignore it. Perhaps you misspelled it. \path [line] (
When I try using a test document, everything works well but it does not work in my intended document.
\begin{tikzpicture}[node distance = 5cm, auto]
\node [startstop] (ba) {Block A};
\node [startstop, right of=ba] (bb) {Block B};
\path [line] (ba) -- (bb);
\end{tikzpicture}
Here is the rough structure of my document:
%Some other packages used here
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\begin{document}
\tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm,
minimum height=1cm,text centered, draw=black, fill=red!30]
%% Edit Begin %%
\tikzstyle{line} = [draw, -latex']
%% Edit End %%
%% Some matter here
\begin{tikzpicture}[node distance = 5cm, auto]
\node [startstop] (ba) {Block A};
\node [startstop, right of=ba] (bb) {Block B};
%% Works
%% \path [line] (ba) -- (bb);
%% Does not work
\draw [arrow] (ba) -- (bb);
\end{tikzpicture}
%% More matter
\end{document}
Is there something silly that I am missing here?
When I compile the document, I do see the blocks but not the arrows and I have looked into almost all the posts about similar issues on the internet and the issue is typically not using the right \usetikzlibrary
commands.
In my case, I am using all the right libraries but I still keep getting this cryptic error message.
Please help.
--- Edit ---
Added the tikzstyle definition for "line".
When I try to use the inbuilt arrow
, I get a similar error message:
Package pgfkeys Error: I do not know the key '/tikz/arrow' and I am going to ignore it. Perhaps you misspelled it. \draw [arrow]
For now, I can proceed using the "line" that I am defining but would be nice to know why the \draw [arrow]
does not work.
style
calledline
. At least it's not present in the code you showed to us.[arrow]
isn't a predefined style either, which is why you're getting the exact same error.