I'm trying to learn how to use PGF/TikZ to draw pictures, in particular a chain of nodes.

I have the following picture:

\begin{tikzpicture}[start chain, node distance=5mm]
  \node [on chain,join] {$t_\mathrm{opt flow}$};  
  \node [on chain,join] {$foo$};

I would expect this to yield two nodes connected by a simple line. Instead, when I run LaTex, I get the following error:

./NIQ_Principles.tex:39: Package PGF Math Error: Unknown function `of'.
./NIQ_Principles.tex:40: Extra }, or forgotten \endgroup.\endpgfpicture ... \pgf@y }\endgroup \hss \egroup 
                                                  \pgf@insertlayers \endgrou...

Can someone help me understand what I'm doing wrong?


Here is my complete example:




\begin{tikzpicture} [start chain, node distance=5mm]
  \node [on chain,join] {foo};  
  \node [on chain,join] {bar};


And here is the output I get:

ERROR: Package PGF Math Error: Unknown function `of'.

--- TeX said ---

See the PGF Math package documentation for explanation.
Type  H <return>  for immediate help.

l.10   \node [on chain,join]
--- HELP ---
From the .log file...

This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.

I can't really claim that I'm as smart as Mr Poirot, so can someone point me in the right direction?

  • With a ecm "example complete and minimal" perhaps i's possible to give a correct answer. Your example compiles with pgf 2.1 and the library chains (with pdflatex and latex). Do you try an example from the pgfmanual ? you can see if you miss something or see if you need to install a correct version of pgf – Alain Matthes Jun 12 '11 at 6:35
  • 1
    Package PGF Math Error ? perhaps you have two versions of pgf on your distribution ? – Alain Matthes Jun 12 '11 at 6:44
  • @Altermundus I've added a complete example to the question, one that doesn't work on my machine but which is very close to the examples given in the TikZ documentation. – lindelof Jun 13 '11 at 5:27
  • your example works with pgf 2.1 cvs without error – Alain Matthes Jun 13 '11 at 5:49

I found that the pgf package installed under Ubuntu was version 2.00, whereas the latest version (and the one from whose documentation I was trying the examples) was 2.10.

Installing the latest version of pgf under my local texmf tree solved the problem.

  • It would be great of you accept your answer by clicking the check mark on the left of the answer. – Stefan Kottwitz Nov 27 '11 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.