# Spurious space problem

I have a problem of spurious space, but I can't find its origin.

Here is my MWE:

\documentclass{beamer}

\begin{document}
\begin{frame}{Dimensions et boites}{Commandes de manipulation des boites}
\parbox[c][.3\textheight][t]{\columnwidth}{%
%   \mbox{}%
\only<+>{%
\begin{itemize}
\item Exemple:
\end{itemize}
\parbox[c][.15\textheight][c]{\columnwidth}{%
\centering\fbox{exemple}\raisebox{0pt}{\fbox{exemple}}\fbox{exemple}%
\vphantom{\raisebox{-1ex}{\fbox{exemple}}\raisebox{\totalheight}{\fbox{exemple}}}
}%
}%
\only<+>{%
\begin{itemize}
\item Exemple:
\end{itemize}
\parbox[c][.15\textheight][c]{\columnwidth}{%
\centering\fbox{exemple}\raisebox{1ex}{\fbox{exemple}}\fbox{exemple}
\vphantom{\raisebox{-1ex}{\fbox{exemple}}\raisebox{\totalheight}{\fbox{exemple}}}
}%
}%
\only<+>{%
\begin{itemize}
\item Exemple:
\end{itemize}
\parbox[c][.15\textheight][c]{\columnwidth}{%
\centering\fbox{exemple}\raisebox{\totalheight}{\fbox{exemple}}\fbox{exemple}
\vphantom{\raisebox{-1ex}{\fbox{exemple}}\raisebox{\totalheight}{\fbox{exemple}}}
}%
}%
\only<+>{%
\begin{itemize}
\item Exemple:
\end{itemize}
\parbox[c][.15\textheight][c]{\columnwidth}{%
\centering\fbox{exemple}\raisebox{-1ex}{\fbox{exemple}}\fbox{exemple}
\vphantom{\raisebox{-1ex}{\fbox{exemple}}\raisebox{\totalheight}{\fbox{exemple}}}
}%
}%
}
\end{frame}
\end{document}


The \vphantom construction is here to make no vertical shift between the 4 baselines.

The first slide of the frame is slightly left shifted in comparison to the next 3, as shown on the picture below, resulting a bad looking animation.

-
After the \fbox{exemple} (second, third and last slide)? –  Qrrbrbirlbel Mar 7 '13 at 17:01

You have \fbox{exemple}% in the first case but just \fbox{exemple} in the other cases so the spacing is out by one space.
Thanks, but why LaTex take this space into account? The paragraph is centred and this is the last space! Does \vphantom count as a box and not as a space? –  Lionel MANSUY Mar 7 '13 at 18:50
if you delete the % in the first case the line is longer by one space so it all moves to the left by half a space so matches the others. But really I don't think that hard Just seeing the subject line before I saw the code it was bound to be a missing % so I just spotted it straight away and answered although I did run the code just to check before posting. –  David Carlisle Mar 7 '13 at 19:11