Ho scaricato della documentazione e copiato un esempio
che potrebbe avvicinarsi a quello che vorrei fare.
E cominciamo bene… perché
`\begin{figure}[!htb]
\begin{center}
\begin{tikzpicture}
[
xscale = 1, % to scale horizontally everything but the text
yscale = 1, % to scale vertically everything but the text
]\uncover<1->
{
% nodes declaration
\node (nGray) [GenericNodeStyle, text=gray] at (-5, 0) {gray};
\node (nRed) [GenericNodeStyle, text=red] at (1, 2) {red};
\node (nBlue) [GenericNodeStyle, text=blue] at (1, -1) {blue};
\node (nYellow) [GenericNodeStyle, text=yellow!80!black] at (4, 1.5) {yellow};
}\uncover<2->
{
% first straight connection
\draw
[
color = black!40!white,
ultra thick,
->
]
(nGray) — (nRed);
}\uncover<3->
{
\draw
[
color = blue,
ultra thick,
->
]
(nBlue.east) — (nYellow.240);
}
\end{tikzpicture}
\end{center}
\end{figure}`
mi dà subito errore:
`! Undefined control sequence.
l.309 \uncover
<1->
?
`
Da che cosa può dipendere?M.
Il comando che non viene riconosciuto è di beamer. Dove hai usato quel codice?
A parte questo, potresti inviare un documento minimale, così è èiù semplice individuare l’eventuale errore. Ricordati che con tikz vanno caricate le librerie necessarie per la composizione del disegno. Immagino che “GenericNodeStyle” sia uno stile che deve essere dichiarato prima del codice. Dove hai preso quel codice?
Questo codice compila di sicuro:
`\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\frame{
\begin{tikzpicture}
[
xscale = 1, % to scale horizontally everything but the text
yscale = 1, % to scale vertically everything but the text
]
\uncover<1->
{
% nodes declaration
\node (nGray) [text=gray] at (-5, 0) {gray};
\node (nRed) [text=red] at (1, 2) {red};
\node (nBlue) [text=blue] at (1, -1) {blue};
\node (nYellow) [text=yellow!80!black] at (4, 1.5) {yellow};
}
\uncover<2->
{
% first straight connection
\draw
[
color = black!40!white,
ultra thick,
->
]
(nGray) — (nRed);
}
\uncover<3->
{
\draw
[
color = blue,
ultra thick,
->
]
(nBlue.east) — (nYellow.240);
}
\end{tikzpicture}
}
\end{document}`
Ciao
Ivan