The following latex code prints rows one at a time. However all the cells of the rows don't come out aligned. How can I fix it.
\documentclass{beamer}
\usepackage{tabularx}
\begin{document}
\begin{frame}{}
\begin{tabularx}{3.50in}{lXX}
\hline
& Observation & Conclusion \\
\hline
\uncover<2->{1.} & \uncover<2->{Observation 1 } & \uncover<2->{Conclusion 1} \\
\uncover<3->{2.} & \uncover<3->{Observation 2} & \uncover<3->{Conclusion 2} \\
\end{tabularx}
\end{frame}
\end{document}
The output looks as follows :
As we can see cells in first column do not align with the rest of the rows. Will appreciate any input as to how to fix this.
Best Answer
TeX is in a funny state at the start of table cells, it's best to avoid doing anything too clever there and beamer gradual reveals come in that category:-)
\leavevmode
gets you to a safer place.For the first
l
column you're not leaving a mode at all (\relax
would have done as well) you are just forcing TeX to stop looking for\multicolumn
etc. In theX
columns you need to stop the look-ahead for spanning columns but in addition you need to start the paragraph so the specials and any other nodes that beamer's magic drops at that position go at the start of the first line of the paragraph and not before the paragraph. You see the same with\color
(which is why\textcolor
starts with\leavevmode
as does\mbox
and most other latex commands of this sort.