I have a beamer frame with a large matrix. I want to add some annotations to it, for which I use tikz overlays. However, the matrix (I suppose that it is the resizebox, actually) changes its width from frame to frame, which is highly undesired. Here is a minimum working example:
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node(#1) {};}
\frame
{
\resizebox{\textwidth}{!}
{
$\left(\begin{array}{rrrrrrrrrrrrrrrrrrrrrrrrrr}a & b & c & d & e & f & g & h & i & j & k & l & m & n & o & p & q & r & s & t & u & v & w & x & y & z\\ a & \tikzmark{b}b & c & d & e & f & g & h & i & j & k & l & m & n & o & p & q & r & s & t & u & v & w & x & y & z\end{array}\right)$
\only<1>
{
\begin{tikzpicture}[overlay,remember picture,-latex]
\draw[->] (b.east) -- +(1,-0.5) node[below] (btext) {This is b};
\end{tikzpicture}
}
}
\only<2>
{
\begin{tikzpicture}[overlay,remember picture,-latex]
\node[at=(btext)] {More text};
\end{tikzpicture}
}
}
\end{document}
The (undesired) effect looks like this:
I am using the overlay because I do not want the matrix to change its width from slide to slide. I am aware that my second text is outside of the resizebox - I want it to be overlayed with normal text size, i.e., so that it is unaffected by the resizebox.
What can I do to keep the width of the matrix unchanged between slides?