# How is TikZ on Windows different with TiKZ on Linux?

This code snippet compiles fine on Windows 7. However, when I ran it on Linux, the compiler complained that it couldn't find the key /tikz/align. Obviously, get rid of the option align=flush center solved the compiler errors, but the consequence was I don't get my expected display. Am I missing some other packages here? or there are several differences between TeXLive and MikTeX?

\documentclass[10pt,letterpaper]{article}

\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{ntheorem}
\usepackage{polynomial}
\usepackage{layouts}
\usepackage{enumerate}
\usepackage{mdwtab}

\usepackage[version=0.96]{pgf}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,automata,backgrounds,petri,positioning}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.shapes}
\usetikzlibrary{decorations.text}
\usetikzlibrary{decorations.fractals}
\usetikzlibrary{decorations.footprints}

\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}
\usepackage[bookmarksopen,bookmarksdepth=3]{hyperref}
\usepackage{titlesec}
\usepackage{xcolor}

%define new colors
\definecolor{dark-red}{rgb}{0.4,0.15,0.15}
\definecolor{dark-blue}{rgb}{0.15,0.15,0.4}
\definecolor{medium-blue}{rgb}{0,0,0.5}

\hypersetup{
citecolor={dark-blue}, urlcolor={medium-blue}
}

\usepackage{tocloft}

%preven linebreak between subsection header and its content
\usepackage{titlesec}
\titleformat{\subsection}[runin]{\normalfont\bfseries}{\thesubsection.}{3pt}{}
\titleformat{\section}[runin]{\normalfont\bfseries}{\thesection.}{3pt}{}
%title
\title{\textbf{Solution for Chapter 1}}

\begin{document}

\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto]
\node[state,initial]    (q_1)                           {$q_1$};
\node[state,accepting]  (q_2)   [right=of q_1]          {$q_2$};
\node[state]            (q_3)   [below right=of q_1]    {$q_3$};

\path[->]
(q_1) edge  [bend left]     node {a}            (q_2)
(q_1) edge  [loop above]    node {b}            (q_1)
(q_2) edge  [bend left]     node {a,b}          (q_3)
(q_3) edge  [bend left]     node {a}            (q_2)
(q_3) edge  [bend left]     node {b}            (q_1);

\node [below=1cm, align=flush center,text width=8cm] at (q_3)
{
$M_1$
};
\end{tikzpicture}
\end{document}

-
Have you checked that your TikZ versions are identical on both systems? You can check your version by inserting \pgfversion after \begin{document}; the version will then be printed in your document. I suspect your Linux version is older than 2.1, and should really be updated. –  Jake Aug 5 '11 at 5:06
@Jake: You're right. On my Linux system, it is 2.00. I do need an update. Thanks a lot. –  Chan Aug 5 '11 at 5:21
You might find this question useful on getting the most recent version of TikZ/PGF: tex.stackexchange.com/q/2044/86 –  Loop Space Aug 5 '11 at 8:44
@Andrew Stacey: Great thanks ;) –  Chan Aug 5 '11 at 11:39

The easiest, and possibly quickest, way is to only update what you need via tlmgr [pkg]. The tlmgr documentation gives all the options needed to update single packages (by specifying the package, say pgf) to everything (by specifying the option -all). –  Werner Aug 5 '11 at 5:40
I tried tlmgr but seemed like this command does not come with TeXlive2009. I'm running Ubuntu 10.04. I think I have to manually re-install TeXLive again. –  Chan Aug 5 '11 at 6:22
The version of TeXlive found in Ubuntu's repositories does not have tlmgr. To get that, you have to install TL with the installer found on the TL website. –  Torbjørn T. Aug 5 '11 at 7:22