在投影仪中,行列式显示表格中放错 \noalign

在投影仪中,行列式显示表格中放错 \noalign

我正在尝试制作投影仪幻灯片,其中的表格按行显示,并且在表格下方显示与当前显示的行相对应的提醒。

以下是示例:

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{booktabs}

\begin{document}

\frame{
\frametitle{Test}   

some text here

\bigbreak 
\pause 

now a table here:

\begin{center}
    \small
    \begin{tabular}{lcc}
        \toprule
        \onslide<2->{
        Column 1 & \multicolumn{2}{c}{Headline column 2 \& 3} \tabularnewline
         & Column 2 & Column 3 \tabularnewline
        \midrule 
        }
        \onslide<2->{
        entry 1: from slide 2 & AA & BB \tabularnewline[1.0em]
        }
        \onslide<3->{
        entry 2: from slide 3 & CC & DD \tabularnewline[0.25em] 
        }
        \onslide<4->{   
        entry 3: from slide 4 & EE & FF \tabularnewline[0.25em] 
        }
        \onslide<5->{
        entry 4: from slide 5 & GG & HH
        }
        \bottomrule
    \end{tabular}
\end{center}
\only<2>{\alert{Reminder}: reminder for entry 1}
\only<3>{\alert{Reminder}: reminder for entry 2}
\only<4>{\alert{Reminder}: reminder for entry 3}
\only<5>{\alert{Reminder}: reminder for entry 4}
}   


\end{document}

生成了一个看起来像我想要的 pdf,但是,我收到一堆如下错误消息:

! Misplaced \noalign.
\bottomrule ->\noalign 
                       {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global...
l.47 }

从其他问题来看,我认为可以通过 解决这些问题\tabularnewline,但是,这似乎不起作用。我做错了什么?

答案1

添加并放入\tabularnewline\onslide<5->\bottomrule

\documentclass{beamer}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{booktabs}

\begin{document}

\frame{
\frametitle{Test}   

some text here

\bigbreak 
\pause 

now a table here:

\begin{center}
    \small
    \begin{tabular}{lcc}
        \toprule
        \onslide<2->{
        Column 1 & \multicolumn{2}{c}{Headline column 2  3} \tabularnewline
         & Column 2 & Column 3 \tabularnewline
        \midrule 
        }
        \onslide<2->{
        entry 1: from slide 2 & AA & BB \tabularnewline[1.0em]
        }
        \onslide<3->{
        entry 2: from slide 3 & CC & DD \tabularnewline[0.25em] 
        }
        \onslide<4->{   
        entry 3: from slide 4 & EE & FF \tabularnewline[0.25em] 
        }
        \onslide<5->{
        entry 4: from slide 5 & GG & HH\tabularnewline[0.25em] 
        \bottomrule}

    \end{tabular}
\end{center}
\only<2>{\alert{Reminder}: reminder for entry 1}
\only<3>{\alert{Reminder}: reminder for entry 2}
\only<4>{\alert{Reminder}: reminder for entry 3}
\only<5>{\alert{Reminder}: reminder for entry 4}
}   


\end{document}

相关内容