Um exemplo sobre diagramas e gráficos com Tikz no manual V2.10 Página 70 falha

Um exemplo sobre diagramas e gráficos com Tikz no manual V2.10 Página 70 falha

Uma captura de tela do livro

Minha dúvida é que não consigo compilar os códigos fornecidos na página 70 do Manual TikZ V2.10. Acabei de adicionar alguns pacotes, mas ele não pode ser compilado. Alguém pode ajudar? Meus códigos são mostrados abaixo:

\documentclass[tikz]{standalone}
\usetikzlibrary{calc,shapes,positioning,arrows,graphs}
\begin{document}

\tikz [>=stealth', black!50, text=black, thick,
every new ->/.style = {shorten >=1pt},
graphs/every graph/.style = {edges=rounded corners},
skip loop/.style = {to path={-- ++(0,#1) -| (\tikztotarget)}},
hv path/.style = {to path={-| (\tikztotarget)}},
vh path/.style = {to path={|- (\tikztotarget)}},
nonterminal/.style = {
rectangle, minimum size=6mm, very thick, draw=red!50!black!50, top color=white,
bottom color=red!50!black!20, font=\itshape, text height=1.5ex,text depth=.25ex},
terminal/.style = {
rounded rectangle, minimum size=6mm, very thick, draw=black!50, top color=white,
bottom color=black!20, font=\ttfamily, text height=1.5ex, text depth=.25ex},
shape = coordinate
]
\graph [grow right sep, branch down=7mm, simple] {
/ -> unsigned integer[nonterminal] -- p1 -> "." [terminal] -- p2 -> digit[terminal] --
p3 -- p4 -- p5 -> E[terminal] -- q1 ->[vh path]
{[nodes={yshift=7mm}]
"+"[terminal], q2, "-"[terminal]
} -> [hv path]
q3 -- /unsigned integer [nonterminal] -- p6 -> /;
p1 ->[skip loop=5mm] p4;
p3 ->[skip loop=-5mm] p2;
p5 ->[skip loop=-11mm] p6;
q1 -- q2 -- q3; % make these edges plain
};

\end{document}

Responder1

insira a descrição da imagem aqui

Atualizei minhas bibliotecas de pacotes e agora funciona. É necessário atualizar as bibliotecas de pacotes após instalar o software MikTex. Obrigado Gonzalo, cfr e Paul ^_^

informação relacionada