1

Maybe somebody could give me a solution. I want to make as it is shown in the picture to appear in different slides (not repeating the code)tikzmarkin.

I want matrix without any highlights to appear in the first slide, then blue highlights and arrow in the second slide, and the third slide has to have the view as shown in the picture. I can get this sequence for \tikzmarkin objects just if I write the number of slide in the brackets <>. But I have no idea how to do this with the arrows.

Thanks very much for any help, Rasa

\documentclass[]{beamer}

\usepackage[customcolors,beamer]{hf-tikz}
\begin{document}

\begin{frame}{}
\[
\mathbf{G}:=\left[\begin{array}{cc}  
\tikzmarkin<1,2,3>[set fill color=blue!50!cyan!30,
 set border color=blue!40!black]{a}g_{11} & \tikzmarkin<1>[set fill color=green!50!lime!30,
 set border color=green!40!black]{b}g_{12}\\  g_{21} \tikzmarkend{a} & g_{22}\tikzmarkend{b} \end{array}\right]=
 \left[\begin{array}{cc} \tikzmarkin<1>[set fill color=blue!50!cyan!30,
  set border color=blue!40!black]{c}{\mathbf{G}_{1}}
  \tikzmarkend{c}
  & \tikzmarkin<1>[set fill color=green!50!lime!30,
  set border color=green!40!black]{d}\mathbf{G}_{2}\tikzmarkend{d}     \end{array}\right].
  \tikz[overlay,remember picture]{\draw [blue,-stealth]     ([xshift=2.5mm,yshift=0.5mm]a.east) to [out=35,in=145]    ([xshift=2.5mm,yshift=0.5mm]c.east);}
 \tikz[overlay,remember picture]{\draw [green,-stealth]     ([xshift=2.5mm,yshift=0.5mm]b.east) to [out=35,in=145]   ([xshift=2.5mm,yshift=0.5mm]d.east);}
 \]
 \end{frame}
 \end{document}
Rasa
  • 71

1 Answers1

2

Like this?

\documentclass[]{beamer}
 \usepackage[customcolors,beamer]{hf-tikz}
 \usetikzlibrary{arrows.meta}

 \begin{document}
\begin{frame}{}
\[
\mathbf{G}:=\left[\begin{array}{cc}  
  \tikzmarkin<1,2>[set fill color=blue!50!cyan!30, set border color=blue!40!black] {a} g_{11}  &
  \tikzmarkin<1>[set fill color=green!50!lime!30, set border color=green!40!black]{b}g_{12} \\
  g_{21} \tikzmarkend{a} &  g_{22} \tikzmarkend{b} 
\end{array}\right] = \left[\begin{array}{cc} 
  \tikzmarkin<1>[set fill color=blue!50!cyan!30, set border color=blue!40!black]{c} \mathbf{G}_{1} \tikzmarkend{c}
  & \tikzmarkin<1>[set fill color=green!50!lime!30, set border color=green!40!black]{d} \mathbf{G}_{2} \tikzmarkend{d} 
\end{array}\right].
\only<1> {\tikz[overlay,remember picture]{\draw [blue,-stealth]
           ([xshift=2.5mm,yshift=0.5mm]a.east) to [out=35,in=145]([xshift=2.5mm,yshift=0.5mm]c.east);}
         \tikz[overlay,remember picture]{\draw [green,-stealth]
           ([xshift=2.5mm,yshift=0.5mm]b.east) to [out=35,in=145]([xshift=2.5mm,yshift=0.5mm]d.east);}}
\]
\end{frame}
\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120