Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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?

share|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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

Not the answer you're looking for? Browse other questions tagged or ask your own question.