以下是 MWE:
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\setbeamertemplate{navigation symbols}{}
\begin{frame}[shrink]
\begin{alignat*}{5}
\uncover<+->{t_n &= a + (n-1)d \\}
\uncover<+->{t_3 &= a + (3-1)d \tag{1} \\}
\cline{1-1}
\uncover<+->{t_3 &= a + (3-1)d \\}
\uncover<+->{t_3 &= a + (3-1)d \\}
\uncover<+->{-20 &= -20 \tag{2}\\}
\notag
\end{alignat*}
\vskip-1.5em
\end{frame}
\end{document}
使用 \cline 时,会产生一个神秘的错误:
! Misplaced \omit.
\@cline #1-#2\@nil ->\omit
\@multicnt #1\advance \@multispan \m@ne \ifnum \@...
l.16 \end{frame}
如何在指定位置获得一条简单的水平线?如果它可以覆盖就太好了。
答案1
你想要这个吗?
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\setbeamertemplate{navigation symbols}{}
\begin{frame}[shrink]
\begin{alignat*}{5}
\uncover<+->{t_n &= a + (n-1)d \\}
\uncover<+->{t_3 &= a + (3-1)d \tag{1} \\\cline{1-1}}
\uncover<+->{t_3 &= a + (3-1)d \\}
\uncover<+->{t_3 &= a + (3-1)d \\}
\uncover<+->{-20 &= -20 \tag{2}\\}
\notag
\end{alignat*}
\vskip-1.5em
\end{frame}
\end{document}
编辑:或者这个?
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\setbeamertemplate{navigation symbols}{}
\begin{frame}[shrink]
\begin{alignat*}{5}
\uncover<+->{t_n &= a + (n-1)d \\}
\uncover<+->{t_3 &= a + (3-1)d \tag{1}}
\uncover<1->{ \\\cline{1-1}}
\uncover<+->{t_3 &= a + (3-1)d \\}
\uncover<+->{t_3 &= a + (3-1)d \\}
\uncover<+->{-20 &= -20 \tag{2}\\}
\notag
\end{alignat*}
\vskip-1.5em
\end{frame}
\end{document}