1

I am using the following code to create overlays with beamer

 \tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt={#1{}{invisible}}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
    },
  }

It works great except when one needs to use opacity in the path that is to be overlayed i.e.

\scoped[visible on=<2->]{\filldraw[shade, opacity=.5, color=red] (0,1) rectangle (0,0);}

does not work because of the opacity argument in the path itself. So this rectangle is always seen in all the overlays.

Anyway of a workaround?

Thanks

2
  • Why you cannot use \onslide with \transfade transitions between overlays?
    – vi pa
    Commented Jun 25, 2019 at 10:29
  • never used \transfade, I know \onslide does not work by itself. Can you give an example please
    – Jean Eid
    Commented Jul 3, 2019 at 14:00

1 Answer 1

2

This is a MWE with \transfade and \onslide. This work only in fullscreen mode.

\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\transfade
\begin{tikzpicture}
\onslide<2->{
\filldraw[shade, opacity=.5, color=red] (1,1) rectangle (0,0);
}
\end{tikzpicture}
\end{frame}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .