Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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$};
\end{tikzpicture}

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?

UPDATE

Here is my complete example:

\documentclass{scrartcl}

\usepackage{tikz}
\usetikzlibrary{chains}

\begin{document}

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

\end{document}

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]
                             {bar};
--- 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?

share|improve this question
    
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
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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