# Vertical misalignment due to beamer onslide? [duplicate]

The following MWE displays the problem:

\documentclass{beamer}

\begin{document}

\begin{frame}\onslide<+->
\begin{tabular}{p{4cm}r}
Text\\Text & Text \\\hline
Text\\Text & Text \\\hline
Text\\Text & Text \\\hline
\onslide<+->Text & Why too high??\\
\end{tabular}

\end{frame}

\end{document}


When I remove the \onslide it looks correct. If I change the p{4cm} to say l, the this too works.

How can I get theis last line to be correctly aligned?

-
the linked question came up in the automatic "related" list and is essentially identical. –  David Carlisle Apr 20 '13 at 22:13

## marked as duplicate by David Carlisle, egreg, Stefan Kottwitz♦Apr 20 '13 at 22:35

It's best to avoid specials of any sort (beamer, color,...} at the start of a parbox or p table cell.

\documentclass{beamer}

\begin{document}

\begin{frame}\onslide<+->
\begin{tabular}{p{4cm}r}
Text\\Text & Text \\\hline
Text\\Text & Text \\\hline
Text\\Text & Text \\\hline
\mbox{}\onslide<+->Text & Why too high??\\
\end{tabular}

\end{frame}

\end{document}


p is \parbox[t] so aligns on its top row but a special before the first row comes above the row so is the first thing in the vertical list and sets the alignment of the box. The \mbox{} starts the first text line then the special comes inside that line so does not affect the alignment point of the vertical list.

-
Many thanks. When I did a search, the related question wasn't shown. Assuming it is identical, should I do something? –  Geoff Apr 20 '13 at 22:16
@Geoff you don't really need to do anything really: you can accept the answer here (assuming it works) (or not, whichever:-) but probably the question will get closed later so as not to leave too many similar open questions to help focus later searches. –  David Carlisle Apr 20 '13 at 22:20