# Weird tikz/pgfkeys error while trying example from the tikz manual.

I am still learning to use tikz from the manual. I got an error for this code:

\documentclass[twocolumn,english]{article}
\usepackage{tikz}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\node[fill=yellow,text width=3cm,align=center]{This is a
demonstration text for showing how line breaking works.};
\end{tikzpicture}
\caption{Dim}
\label{fig:dim}
\end{figure}
\end{document}


Here is the error in pgfkeys (is this package related to pgf/tikz?):

! Package pgfkeys Error: I do not know the key '/tikz/align' and I am going to
ignore it. Perhaps you misspelled it.


What am I doing wrong?

-
Works for me with PGF2.10. What version of TikZ/PGF are you using (or from what distribution?)? Are you sure that your version of TikZ aligns with your version of the manual? Try text align instead (as I think it used to be called that). –  Andrew Stacey Dec 8 '10 at 11:13
I'm just using the default packages in Ubuntu 10.10 Maverick (TexLive 2009). And no, text align does not work either. How do I install more recent versions of these packages in Ubuntu? –  donatello Dec 8 '10 at 11:53
The PGF/tikZ version is defined in the file pgfrcs.code.tex, and the version documented in the manual is on the front page. If these don't match, perhaps you have a problem in your TeX inputs path. –  Matthew Leingang Dec 8 '10 at 13:55

I can confirm that your example produces this error with TikZ 2.00 which is shipped with Ubuntu 10.10.

With TikZ 2.00 use the key text centered:

\node[fill=yellow,text width=3cm,text centered]{This is a
demonstration text for showing how line breaking works.};


This may help if you don't like to update pgf manually but wish to wait for an update in the ubuntu repositories. You could download the current version of pgf on http://sourceforge.net/projects/pgf/ as tds file and extract that to the appropriate place and run sudo texhash.

Perhaps somebody builds a debian package which is easy to install (sudo dpkg -i packagename.deb). At least the update for Debian (thus for Ubuntu as well) is on the wishlist. When it is packaged, you may find it on http://packages.debian.org/pgf .

-
I managed to install the newer version by hand. Thank you for your answer! Does the pgf manual also get installed when installing from Ubuntu repos? If so, where is it? I couldn't find it, and thats why I got the latest manual from the tikz site and was using that. –  donatello Dec 8 '10 at 15:27
@donatello: Try texdoc -m tikz, which produces (among other things) /usr/share/texmf/doc/pgf/pgfmanual.pdf.gz when I run it. Note that, again from my own experience, if you manually upgrade pgf into your ~/texmf tree, then the copy of the manual that comes with it will supercede the one that was installed by Ubuntu. (That's a good thing.) –  Ryan Reich Dec 8 '10 at 15:52
@Ryan: Thanks for the command. I found the old doc with texhash -m pgf though. –  donatello Dec 8 '10 at 16:44

Your example works fine for me with tikz.sty 2010/10/13 v2.10 (rcs-revision 1.76), pgf.sty 2008/01/15 v2.10 (rcs-revision 1.12) (which is the current version in miktex).

-