I am showing a table one cell per slide and, once each row is completely shown, I use tikz to draw one arrow over the row.
While the cells are appearing, the table stays fixed on the same place of the slide, however, when the arrow is shown, the table moves (usually going up on the y-axis).
Do you know what I could do to keep the table fixed the whole time?
As an example, consider the code below, which produces this PDF.
\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{frame}
\begin{table}
\centering
\begin{tabular}{|c|c|c|}
\hline
& $u = 1$ & $u = 2$
\
\hline
$v = 1$ & \onslide<2-7>{ A } & \onslide<3-7>{ B }
\
\hline
$v = 2$ & \onslide<5-7>{ C } & \onslide<6-7>{ D } \
\hline
\end{tabular}
\end{table}
%% draw an arrow over the first row of the table
\only<4>{
\begin{tikzpicture}[overlay,remember picture]
\draw [->,thick,color=red] (5, 1.25) to (8, 1.25);
\end{tikzpicture}
}
%% draw an arrow over the second row of the table
\only<7>{
\begin{tikzpicture}[overlay,remember picture]
\draw [->,thick,color=red] (5, 0.75) to (8, 0.75);
\end{tikzpicture}
}
\end{frame}
\end{document}
