我正在使用 overleaf 的 latex 模板制作自己的演示文稿。在 Microsoft Power point 中,制作动画非常容易。您能否告诉我如何在以下代码中添加动画。我希望文本首先出现(按下键盘上的 Enter 键时出现),然后是图形,最后是表格。所有这些都需要按顺序完成。
\documentclass[xcolor=table]{beamer}
\newcommand\hideit[1]{%
\only<0| handout:1>{\mbox{}}%
\invisible<0| handout:1>{#1}}
\mode<presentation> {
}
\usetheme{CambridgeUS}
\usepackage{comment}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{amsmath}
\newcommand*{\Perm}[2]{{}^{#1}\!P_{#2}}%
\newcommand*{\Comb}[2]{{}^{#1}C_{#2}}%
\usepackage{amssymb}
\usepackage{subfig}
\newcommand{\mathbold}[1]{\text{\textbf{#1}}}
\makeatletter
\let\@@magyar@captionfix\relax
\makeatother
\begin{document}
\begin{frame}
\frametitle{Results and Discussion(2/2)}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item The deploy cost are relatively low.
\item For the execution cost of Fig.~\ref{gas} shows as the number increases, the consumption increases. $\rightarrow$ Exponential increase.
\end{itemize}
\end{column}
\begin{column}{0.6\textwidth}
\centering
\includegraphics[width=0.8\textwidth]{figures/thnx.pdf}
\begin{table}[t]
\scalebox{0.5}{
\begin{tabular}{lll}\toprule
& GAS & Price (ETH) \\ \midrule
\texttt{Deploy} &742276 &0.0044537 \\
\texttt{Recieve} &76981 & 0.0004619 \\
\bottomrule
\end{tabular}
}
\end{table}
\end{column}
\end{columns}
\end{frame}
\end{document}
答案1
只需使用命令插入两个暂停即可\pause
。一个在文本之后,另一个在图像之后。
\documentclass[xcolor=table]{beamer}
% \setbeamercovered{dynamic}
\newcommand\hideit[1]{%
\only<0| handout:1>{\mbox{}}%
\invisible<0| handout:1>{#1}}
\mode<presentation> {
}
\usetheme{CambridgeUS}
\usepackage{comment}
\usepackage{graphicx} % Allows including images
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{amsmath}
\newcommand*{\Perm}[2]{{}^{#1}\!P_{#2}}%
\newcommand*{\Comb}[2]{{}^{#1}C_{#2}}%
\usepackage{amssymb}
% \usepackage[ruled,linesnumbered]{algorithm2e}
\usepackage{subfig}
\newcommand{\mathbold}[1]{\text{\textbf{#1}}}
\makeatletter
\let\@@magyar@captionfix\relax
\makeatother
\begin{document}
% \includegraphics[width=0.8\textwidth]{example-image-a}
\begin{frame}
\frametitle{Results and Discussion(2/2)}
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize}
\item The deploy cost isrelatively low.
\item For the execution cost of Fig.~\ref {gas} shows as the number increases, the GAS increases. $\rightarrow$ Exponential increase.
\end{itemize}
\end{column}
\pause%first break<--- allows you to take a break, to go on to the next step if you just click
\begin{column}{0.6\textwidth}
\centering
\includegraphics[width=0.8\textwidth]{example-image}
\pause% second break <--- allows you to take a break, to go on to the next step if you just click
\begin{table}[t]
\scalebox{0.5}{
\begin{tabular}{lll}\toprule
& GAS & Price (ETH) \\ \midrule
Deploy &742276 &0.0044537 \\
Receive &76981 & 0.0004619 \\
\bottomrule
\end{tabular}
}
\end{table}
\end{column}
\end{columns}
\end{frame}
\end{document}