我有一个表格beamer
我想要使用 来揭示其内容\onslide
。在tabularx
(或tabular
带有p
-column)这会在 -column 中产生奇怪的垂直空白X
。您知道它从何而来和/或如何解决它吗?
以下是我使用的代码:
\begin{tabularx}{\textwidth}{|l|X|}
\hline
First line & A very long sentence that takes up more than one line because of its length\\
\onslide<2->{Second line} & \onslide<2->{A slightly longer sentence that takes up more than one line because of its length} \\
\hline
\end{tabularx}
或者使用p
-column:
\begin{tabular}{|l|p{0.7\textwidth}|}
\hline
First line & A very long sentence that takes up more than one line because of its length\\
\onslide<2->{Second line} & \onslide<2->{A slightly longer sentence that takes up more than one line because of its length} \\
\hline
\end{tabular}
答案1
您需要避免将 beamer 特殊功能(或任何特殊功能)放在 parbox 的开始处:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{tabular}{|l|p{0.7\textwidth}|}
\hline
First line & A very long sentence that takes up more than one line because of its length\\
\onslide<2->{Second line} & \leavevmode\onslide<2->{A slightly longer sentence that takes up more than one line because of its length} \\
\hline
\end{tabular}
\end{frame}
\end{document}