I have been trying to include pdf graphics in a document with this simple command:
\documentclass{beamer}
\begin{document}
\begin{frame}
\only<1>{\includegraphics[width=\textwidth]{test}}
\only<2>{\includegraphics[width=\textwidth]{test}}
\only<3>{\includegraphics[width=\textwidth]{test}}
\end{frame}
\end{document}
Unfortunately, the three pictures (that are supposed to be identical), are not aligned identically (from the top).
Here is the test.pdf used for generating the pdf: http://imgur.com/1nOiT
Here is the generated pdf: http://imgur.com/UUu0v (as you can(not?) see), the first and second image are not aligned.
Now if someone knows why it acts like this? Here I put a VME since it seems to me that no package were necessary except for the class Beamer. I have tried with my "usual" packages, maybe I am just missing the right one?
Just so you know, what I was able to do so far: if I put a ~ after {test}, then it gets aligned (note that it will not work on this minimal example, there are some packages missing).
Also something I noticed (because when I first met this probleme I had many more \only), it is always the one before last only that messes up! No matter how many \only, and then the last one will be aligned with the previous one (this is why we need at least three only lines).
tildemark, though I would really like to understand why it does not work. – Gopi May 14 '12 at 15:04beamerdocumentation mentions this in Section 9.5 Dynamically Changing Text or Images: "The trouble with this approach [using the\onlycommand] is that it may lead to slight, but annoying differences in the heights of the lines, which may cause the whole frame to “wobble” from slide to slide. This problem becomes much more severe if the replacement text is several lines long. To solve this problem, you can use two environments:overlayareaandoverprint. The first is more flexible, but less user-friendly." – Gonzalo Medina May 14 '12 at 15:15