TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?





%define new colors

%set up color for table of contents
    colorlinks, linkcolor={medium-blue},
    citecolor={dark-blue}, urlcolor={medium-blue}


%preven linebreak between subsection header and its content
\title{\textbf{Solution for Chapter 1}}


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

        (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)
share|improve this question
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
up vote 5 down vote accepted

The only way to obtain an up-to-date version of both systems (TeX Live and MiKTeX) would be via the respective update managers (tlmgr and mpm). However, in general, this is not the case.

The most recent download of TeX Live is 2011 (dated July 20, 2011), while the most recent version of MiKTeX is 2.9 (dated October 2010). If these versions are downloaded as-is, they would have different versions of the packages, possibly leading to different compatibility issues.

The best way to assess the differences between an installation would be to check your .log file, which should output some version information for each package. That way you'll see which version has the most up-to-date (and likely, more compatible) packages.

share|improve this answer
Thanks a lot. So should I update TikZ itself rather than the whole TeXLive? and what's the easiest way to update TeXLive? – Chan Aug 5 '11 at 5:31
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
Once again, thank you. – Chan Aug 5 '11 at 6:15
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

Your Answer


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.