如何在 Beamer 中安装一张简单的桌子

如何在 Beamer 中安装一张简单的桌子

我尝试在 Beamer 中制作一张简单的桌子。但是桌子脱离了滑轨,无法调整。你能告诉我该怎么做吗?

\documentclass[
%aspectratio=169,
]{beamer}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage{expl3,biblatex}

\addbibresource{bibliography.bib}

\usepackage{booktabs}
\usetheme{Madrid}
\usecolortheme{crane}
\usepackage{svg}
\usepackage{graphicx,caption}

% set font
\usefonttheme{serif}

 % to prevent the boxes from overlapping the logo at the lower 
 right corner
 \addtobeamertemplate{block begin}{%
 \setlength{\textwidth}{0.9\textwidth}%
  }{}

 \addtobeamertemplate{block alerted begin}{%
  \setlength{\textwidth}{0.9\textwidth}%
   }{}

    \addtobeamertemplate{block example begin}{%
   \setlength{\textwidth}{0.9\textwidth}%
   }{}


   % usage: \hl{text to emphasis as yellow background}
   \usepackage{soul}
    \makeatletter
    \let\HL\hl
     \renewcommand\hl{%
     \let\set@color\beamerorig@set@color
     \let\reset@color\beamerorig@reset@color
      \HL}
       \makeatother




        \begin{document}

        \begin{frame}\footnotesize
       \frametitle{Introduction}
     \begin{tabular}{l l}
     \textbf{Probability }& \textbf{Statistics} \\ \pause
      $\circ$ Probability deals with predicting the likelihood of 
      future events.  &  $\circ$ Statistics involves analyzing 
    the frequency of past events(it is the art of learning from 
  data).\\ \pause
   $\circ$ Probability is primarily a \textit{theoretical} branch 
     of mathematics that studies the consequences of mathematical 
   definitions.  &  $\circ$ Statistics is primarily an 
   \textit{applied} 
     branch of mathematics that tries to make sense of 
    observations made in the real world.  
    \end{tabular}
    \end{frame}



    \end{document}

在此处输入图片描述

答案1

理论上,您可以使用固定宽度的列来使您的表格正常工作:

\documentclass{beamer}

\begin{document}
    
\begin{frame}
\footnotesize
\frametitle{Introduction}
\begin{tabular}{p{.48\linewidth} p{.48\linewidth}}
 \textbf{Probability }& \textbf{Statistics} \\ \pause
  $\circ$ Probability deals with predicting the likelihood of future events.  &  $\circ$ Statistics involves analyzing the frequency of past events(it is the art of learning from data).\\ \pause
   $\circ$ Probability is primarily a \textit{theoretical} branch of mathematics that studies the consequences of mathematical definitions.  &  $\circ$ Statistics is primarily an \textit{applied} branch of mathematics that tries to make sense of observations made in the real world.  
\end{tabular}
\end{frame}

    
\end{document}

在此处输入图片描述

不过我认为columns环境(结合列表,就像@DavidCarlisle建议的那样)会更有意义:

\documentclass{beamer}


\begin{document}
    
\begin{frame}
\footnotesize
\frametitle{Introduction}
\begin{columns}[onlytextwidth]
\begin{column}{.48\textwidth}
\textbf{Probability}
\begin{itemize}
\item<2-> Probability deals with predicting the likelihood of future events. 
\item<3-> Probability is primarily a \textit{theoretical} branch of mathematics that studies the consequences of mathematical definitions.
\end{itemize}
\end{column}
\begin{column}{.48\textwidth}
\textbf{Statistics}
\begin{itemize}
\item<2->  Statistics involves analyzing the frequency of past events(it is the art of learning from data).
\item<3-> Statistics is primarily an \textit{applied} branch of mathematics that tries to make sense of observations made in the real world.  
\end{itemize}
\end{column}
\end{columns}

\end{frame}

\end{document}

在此处输入图片描述

相关内容