我有一张由四列组成的表格。我希望前两列出现在第一张幻灯片上,而第三列和第四列应出现在第二张幻灯片上。在某种程度上,我使用以下代码实现了这一点。但是,我的水平线首先消失,然后又出现在第二张幻灯片上。查看图片
也许你知道我做错了什么?
\documentclass{beamer}
\usepackage{array}
\usepackage{boldline}
\usepackage{tikz}
\usepackage[utf8x]{inputenc}
\begin{document}
\begin{frame}[t]{Results 1: Whole Sample}
\label{wholesign}
\begin{center}
\scalebox{0.94}{
\begin{tabular} {>{\onslide<1->}lc>{\onslide<2->}cc}
\hlineB{2}
& 3SLS & 3SLS & 3SLS \\
& ($t$) & ($t-1$) & ($t-2$) \\ [1ex]
\hline
\alert {Outcome: entrepreneurship} & & & \\
Direct effect of FDI & \textbf{−} & \textbf{−} & \textbf{−} \\
Wages & \textbf{−} & \textbf{−} & \textbf{−} \\
Concentration ratio & \textbf{+} & \textbf{+} & \textbf{+} \\
\hline
& & & \\
\alert {Outcome: wages} & & & \\
FDI effect & \textbf{+} & \textbf{+} & \textbf{+} \\
\hline
& & & \\
\alert {Outcome: concentration ratio} \hspace*{0.7cm} & & & \\
FDI effect & \textbf{+} & \textbf{+} & \textbf{+} \\
\hline
& & & \\
%Total FDI effect & \textbf{−} & \textbf{−} & \textbf{−} \\
Observations & 3784 & 3782 & 3528 \\
\hlineB{2}
\end{tabular}
}
\end{center}
\end{frame}
\end{document}
答案1
怎么样
\documentclass{beamer}
\usepackage{array}
\usepackage{boldline}
\usepackage{tikz}
\usepackage[utf8x]{inputenc}
\begin{document}
\begin{frame}[t]{Results 1: Whole Sample}
\label{wholesign}
\begin{center}
\scalebox{0.94}{
\begin{tabular}{lc>{\onslide<2->}cc<{\onslide<1->}}
\hlineB{2}
& 3SLS & 3SLS & 3SLS \\
& ($t$) & ($t-1$) & ($t-2$) \\ [1ex]
\hline
\alert {Outcome: entrepreneurship} & & & \\
Direct effect of FDI & \textbf{AAA} & \textbf{AAA} & \textbf{AAA} \\
Wages & \textbf{AAA} & \textbf{AAA} & \textbf{AAA} \\
Concentration ratio & \textbf{+} & \textbf{+} & \textbf{+} \\
\hline
& & & \\
\alert {Outcome: wages} & & & \\
FDI effect & \textbf{+} & \textbf{+} & \textbf{+} \\
\hline
& & & \\
\alert {Outcome: concentration ratio} \hspace*{0.7cm} & & & \\
FDI effect & \textbf{+} & \textbf{+} & \textbf{+} \\
\hline
& & & \\
%Total FDI effect & \textbf{AAA} & \textbf{AAA} & \textbf{AAA} \\
Observations & 3784 & 3782 & 3528 \\
\hlineB{2}
\end{tabular}
}
\end{center}
\end{frame}
\end{document}