I tried to use the tikz chains feature today, and all was good for a few hours, but now I get an error every time I try to use chains
./test.tex:7: Package pgfkeys Error: I do not know the key '/tikz/nonterminal' and I am going to ignore it. Perhaps you misspelled it. [ \node [nonterminal]]
./test.tex:8: Package pgfkeys Error: I do not know the key '/tikz/terminal' and I am going to ignore it. Perhaps you misspelled it. [ \node [terminal]]
./test.tex:9: Package pgfkeys Error: I do not know the key '/tikz/terminal' and I am going to ignore it. Perhaps you misspelled it. [ \node [terminal]]
./test.tex:10: Package pgfkeys Error: I do not know the key '/tikz/terminal' and I am going to ignore it. Perhaps you misspelled it. [ \node [terminal]]
And here is the code
\documentclass[a4paper]{memoir}
% Add packages
\usepackage{tikz}
\usetikzlibrary{chains}
\begin{document}
\begin{figure}
\begin{tikzpicture}[start chain,node distance=5mm, every node/.style={on chain,join}, every join/.style={->}]
\node [nonterminal] {unsigned integer};
\node [terminal] {.};
\node [terminal] {digit};
\node [terminal] {E};
\end{tikzpicture}
\end{figure}
\end{document}
Any good ideas on how to repair the chain?
Best Answer
As Qrrbrbirlbel (name chosen to be difficult to write? :p) said, you haven't defined your
terminal
andnonterminal
style. The pgfkeys errors are hinting about this as they complain thattikz/nonterminal
andtikz/terminal
are unknown. Some times,TikZ
recognise if you try to use keys from atikzlibrary
you should have loaded withusetikzlibrary
, and will say so.In the
TIKZandPGF-manual
the styles are set withtikzset
, but are given in thetikzpicture
options ([]
) in the examples on page 60 and 61. You'll also need to load theshapes.misc
library to be able to produce therounded rectangle
. The code is given below:which produces the output