使用 onslide 或任何方法逐一显示 beamer 中每个项目的定义

使用 onslide 或任何方法逐一显示 beamer 中每个项目的定义

我在幻灯片中有三个项目,其中有一个块我想显示每个项目的定义。每次单击或按下按钮时,我都想更改项目名称和相应的定义。我可以对图形执行此操作,但我无法对文本实现此效果。

示例tex文档如下:

\documentclass[mathserif]{beamer} 

% Setup appearance:

\usetheme{CambridgeUS}
\setbeamertemplate{items}[ball]
\usefonttheme[onlylarge]{structurebold}
\usecolortheme[RGB={205,173,0}]{structure} 
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\useoutertheme{infolines} 

%Pacakges
\usepackage{xcolor}
\usepackage{graphics}

\usepackage{amsmath}
\usepackage{xcolor}

\mode<presentation>{}

\begin{document}
    \begin{frame}{Motivation}
    \begin{itemize}
        \item<1-> Travel time 
        \item<2-> Residence time
        \item<3-> Biology
    \end{itemize}

    \begin{block}{Definition}
        <1> {Travel time is the time required by the particle to move from one point to another point.}
        <2> {Residence time is the time required for the particle to get out of the system.}
        <3> {Biology is the study of living things.}
    \end{block} 

\end{frame}
\end{document}

答案1

您可以使用\only<overlay specification>

\documentclass{beamer}
\usetheme{CambridgeUS}
\setbeamertemplate{items}[ball]
\usefonttheme[onlylarge]{structurebold}
\usecolortheme[RGB={205,173,0}]{structure}
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\useoutertheme{infolines}

%Packages
\usepackage{xcolor}
\usepackage{graphics}

\mode<presentation>{}

\begin{document}
    \begin{frame}{Motivation}
    \begin{itemize}[<+->]
        \item Travel time
        \item Residence time
        \item Biology
    \end{itemize}

    \begin{block}{Definition}
        \only<1>{Travel time is the time required by the particle to move from one point to another point.}
        \only<2>{Residence time is the time required for the particle to get out of the system.}
        \only<3>{Biology is the study of living things.}
    \end{block}

\end{frame}
\end{document}

动画展示了定义框中每一项内容的改变

如果希望描述累积出现,请更改为\only<1->、 、...。\only<2->

答案2

您可以像对常规条目框架所做的那样,将条目包装在Definition块内。这会“列出”定义列表,但这可能是您想要的:itemizeitemize

在此处输入图片描述

\documentclass[mathserif]{beamer} % http://ctan.org/pkg/beamer

% Setup appearance:

\usetheme{CambridgeUS}
\setbeamertemplate{items}[ball]
\usefonttheme[onlylarge]{structurebold}
\usecolortheme[RGB={205,173,0}]{structure} 
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\useoutertheme{infolines} 

\mode<presentation>{}

\begin{document}
\begin{frame}{Motivation}
  \begin{itemize}
    \item<1-> Travel time 
    \item<2-> Residence time
    \item<3-> Biology
  \end{itemize}

  \begin{block}{Definition}
    \begin{itemize}
      \item<1-> Travel time is the time required by the particle to move from one point to another point.
      \item<2-> Residence time is the time required for the particle to get out of the system.
      \item<3-> Biology is the study of living things.
    \end{itemize}
  \end{block} 
\end{frame}
\end{document}

上述方法可以避免由于Definition块中的文本长度不同而导致跨帧的垂直跳过。

相关内容