这是 Beamer 表格动画错误吗?

这是 Beamer 表格动画错误吗?

在动画的第二张幻灯片中,以下代码导致第一个表格在页面上向下偏移。这是一个错误吗?

请注意,这与避免投影机跳帧因为接受的解决方案与那里提出的解决方案不同。

(抱歉,这个例子不够简洁,但它确实显示了这个问题。)

\documentclass[c]{beamer}

\usepackage{listings}
\usepackage{graphicx}
\usepackage{pgfpages}
\usepackage{multirow}
\usepackage{colortbl}
\usepackage{ulem}
\usepackage{import}
\usepackage{multicol}
%used to place text free on the slide
\usepackage[percent]{overpic}
\usepackage{algorithmic}
\usepackage{algorithm}
\usepackage{float}
\usepackage{pgfpages}
\usepackage{multirow}
\usepackage{colortbl}
\usepackage{ulem}
\usepackage{color}
\usepackage{amsmath}
\usepackage{svg}
\usepackage{textcomp}
\usepackage{color, colortbl}
\usepackage{pifont}

\definecolor{dblue}{rgb}{0,0,0.5}
\definecolor{dgreen}{rgb}{0,0.5,0}
\definecolor{darkblue}{rgb}{0,0,0.8}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{red}{rgb}{1,0,0}

\usepackage{import}
\usepackage{hyperref}

\begin{document}
\maketitle

\begin{frame}{Example\footnote{\tiny Taken from \url{http://davidmlane.com/hyperstat/viswanathan/Median_Test.html}}}

\begin{columns}
\begin{column}{.3\textwidth}
\onslide<1->{\begin{table}
\tiny
  \begin{tabular}{c|c}
    A &  B \\ \hline \hline
    79   &   85\\ \hline 
    86   &   80\\ \hline 
    40   &   50\\ \hline 
    50   &   55\\ \hline
    75   &   65\\ \hline 
    38   &   50\\ \hline 
    70   &   63\\ \hline 
    73   &   75\\ \hline 
    50   &   55\\ \hline 
    40   &   45\\ \hline 
    20   &   30\\ \hline 
    80   &   85\\ \hline 
    55   &   65\\ \hline 
    61   &   80\\ \hline 
    50   &   55\\ \hline 
    80   &   75\\ \hline 
    60   &   65\\ \hline 
    30   &   50\\ \hline 
    70   &   75\\ \hline 
    50   &   62 \\ \hline 
  \end{tabular}
\end{table}}
\end{column}
\begin{column}{.7\textwidth}  
\only<2>{\begin{table}
 \tiny
  \begin{tabular}{r|r|r|r}

\multicolumn{1}{l|}{\textbf{Descending Order}} & \multicolumn{1}{l|}{\textbf{Rank}} & \multicolumn{1}{l|}{\textbf{Descending Order}} & \multicolumn{1}{l}{\textbf{Rank}} \\ \hline
86 & 1 & 61 & 21 \\ \hline
85 & 2.5 & 60 & 22 \\ \hline
85 & 2.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 50 & 30 \\ \hline
79 & 8 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
73 & 13 & 50 & 30 \\ \hline
70 & 14.5 & 45 & 34 \\ \hline
70 & 14.5 & 40 & 35.5 \\ \hline
65 & 17 & 40 & 35.5 \\ \hline
65 & 17 & 38 & 37 \\ \hline
65 & 17 & 30 & 38.5 \\ \hline
63 & 19 & 30 & 38.5 \\ \hline
62 & 20 & 20 & 40 \\ \hline
  \end{tabular}
\end{table}}

  \onslide<3->{\begin{table}
 \tiny
  \begin{tabular}{r|r|r|r}

\multicolumn{1}{l|}{\textbf{Descending Order}} & \multicolumn{1}{l|}{\textbf{Rank}} & \multicolumn{1}{l|}{\textbf{Descending Order}} & \multicolumn{1}{l}{\textbf{Rank}} \\ \hline
86 & 1 & \color{red}{61} & \color{red}{ 21} \\ \hline
85 & 2.5 & 60 & 22 \\ \hline
85 & 2.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 55 & 24.5 \\ \hline
80 & 5.5 & 50 & 30 \\ \hline
79 & 8 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
75 & 10.5 & 50 & 30 \\ \hline
73 & 13 & 50 & 30 \\ \hline
70 & 14.5 & 45 & 34 \\ \hline
70 & 14.5 & 40 & 35.5 \\ \hline
65 & 17 & 40 & 35.5 \\ \hline
65 & 17 & 38 & 37 \\ \hline
65 & 17 & 30 & 38.5 \\ \hline
63 & 19 & 30 & 38.5 \\ \hline
\color{red}{62} & \color{red}{20} & 20 & 40 \\ \hline
    \end{tabular}
  \end{table}}  
\end{column}
\end{columns}

\centering
\onslide<4-> Grand Median $= \frac{62 + 61}{2} = 61.5$
\end{frame}
\end{document}

答案1

\begin{columns}[T] 

修复了!谢谢!

相关内容