4

In beamer, I failed to show the text above a path from the second slide on using the overlay specification like <2-> and onslide<2->. How to do that?

\documentclass{beamer}
\usepackage{tikz}

\begin{document}
\begin{frame}{}
  \begin{tikzpicture}
    % Error: giving up on this path
    \draw (0,0) to node<2-> [sloped, above = 5pt] {text} (1,1);
    % Error: giving up on this path
    \draw (0,0) to \onslide<2->{node [sloped, above = 5pt] {text}} (1,1);
  \end{tikzpicture}
\end{frame}
\end{document}
7

No problem with overlay-beamer-styles.

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{overlay-beamer-styles}
\begin{document}
\begin{frame}{}
  \begin{tikzpicture}
    \draw (0,0) to node [visible on=<2->,sloped, above = 5pt] {text} (1,1);
  \end{tikzpicture}
\end{frame}
\end{document}
  • i wasn't aware of the tikz library overlay-beamer-styles. where it is documented? – Zarko Jul 17 '18 at 6:37
  • @Zarko texdoc aobs. – user121799 Jul 17 '18 at 6:40
  • 2
    thank you very much for info. it seems to be valuable source information. +1 for that! – Zarko Jul 17 '18 at 6:45

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.