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.
\documentclass{standalone}

\usepackage{tikz,pgf}

\usetikzlibrary{decorations.markings,%
    snakes,fit,scopes,arrows,calc,shapes.misc,positioning,%
    shapes.arrows,chains,matrix,positioning,decorations.pathmorphing,shapes,backgrounds,decorations.text}

\begin{document}

\tikzset{
    fuzzy/.style = {decorate, decoration = {random steps, segment length = 0.5mm, amplitude = 0.15pt}},
    ns/.style = {rectangle,minimum size = 6mm,rounded corners = 3mm,very thick,draw,font = \ttfamily,fuzzy}
}

\newcommand{\OL}[1]{{$\overline{x}_{#1}$}}
\newcommand{\NL}[1]{{${x}_{#1}$}}

\begin{tikzpicture} [
        >=latex, thick, 
        ns/.style = {rectangle, draw, fill = white, fuzzy, rounded corners = 3mm},
        decision/.style = {rectangle, draw, fill = gray, fuzzy, rounded corners = 3mm},
    ]
    \ttfamily
    \begin{scope}
        \coordinate node[decision] (nx12) at (0,0) {\OL{12}};
        \coordinate node[decision] (x5) at ($(nx12)+(1,1)$) {\NL{5}};
        \coordinate node[decision] (nx8) at ($(nx12)+(1,-1)$) {\OL{8}};

        \coordinate node[ns] (x2) at ($(x5)+(2,1)$) {\NL{2}};
        \coordinate node[ns] (nx7) at ($(nx12)+(2,-.5)$) {\OL{7}};
        \coordinate node[ns] (x4) at ($(x5)+(4,1)$) {\NL{4}};
        %\coordinate node[ns] (nx13) at ($(x4)+(1,1)$) {\OL{13}};
        %\coordinate node[ns] (x13) at ($(x4)+(1,-1)$) {\NL{13}};
    \end{scope}

\end{tikzpicture}

\end{document}

If one comments the x4 everything goes smoothly, but now it is "<...>must have a (possibly empty) label<...>"

share|improve this question
    
Your code compiles just fine for me. What version of PGF are you using (I'm using PGF2.10)? –  Andrew Stacey Jan 28 '12 at 19:41
    
judging from the usage of the snakes library he is using an older version. Compiles fine here as well by the way. –  Roelof Spijker Jan 28 '12 at 19:54
    
@wh1t3: I do remember your saying about the "deprecated" snakes, thanks... \pgfversion gives 2.00... Thanks guys, have to update my pgf. –  Ilonpilaaja Jan 28 '12 at 20:06
    
Hm, funny thing is that now I've updated to pgf 2.10: went to sourceforge and unpacked the entire thing into ~/texmf. But running pdflatex again gives the same error, although \pgfversion says 2.10 –  Ilonpilaaja Jan 29 '12 at 15:54
    
SOLVED: updating the pgf installation (as above) plus removing the space between \coordinate[ns]_(x4) did the trick. Now (I know there is no topic discussion in comments) what's wrong with the space? I have a Finnish keyboard, and sometimes when compiling C-programs gcc also complains about "stray \302 in line x", so these two issues can be connected... –  Ilonpilaaja Jan 29 '12 at 16:18
show 1 more comment

closed as too localized by Andrew Stacey, Marco Daniel, Paulo Cereda, egreg, Torbjørn T. Jan 30 '12 at 11:20

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.