4

I want to uncover the text nodes of a tikzpicture. This is the desired result:

Slide 1

enter image description here

Slide 2

enter image description here

MWE

\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}

\begin{tikzpicture}
\draw[ultra thick] (-3,-2) -- node[below] {a} (3,-2) -- node[right] {b} (2,3) -- node[above] {c} (-2,2) -- node[left] {d} cycle;
\end{tikzpicture}

\end{frame}

\end{document}

What I tried so far...

1

\uncover<2->{node[below] {a}}

2

{\uncover<2->{node[below] {a}}}

3

node[below] \uncover<2->{{a}}

4

node[below] {\uncover<2->{{a}}}

5

node[below] {\uncover<2->{a}}

6

node[below] {{\uncover<2->{a}}}

...but I got always errors.

5

I think that you need to use \uncover on separate \draw commands like:

\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame}

\begin{tikzpicture}
  \uncover<1>{\draw[ultra thick](-3,-2)--(3,-2)--(2,3)--(-2,2)--cycle;}
  \uncover<2->{\draw[ultra thick](-3,-2)--node[below]{a}(3,-2)--node[right]{b}(2,3)--node[above]{c}(-2,2)--node[left]{d} cycle;}
\end{tikzpicture}

\end{frame}

\end{document}

This produces:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.