双列投影仪演示中的表格

双列投影仪演示中的表格

是否有可能将图片中描述的表格放到 Beamer 演示文稿的左侧一列中(也许可以通过更改相关框架的文本大小来实现)。图片: 在此处输入图片描述

我的结果: 在此处输入图片描述

代码:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Beamer Presentation
% LaTeX Template
% Version 1.0 (10/11/12)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%   PACKAGES AND THEMES
%----------------------------------------------------------------------------------------

\documentclass[10pt]{beamer}

\mode<presentation> {

\usetheme{Warsaw}

}
\useoutertheme{tree}

\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{fadings}
\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{bm}
\usepackage{siunitx}
\usepackage{mathtools}
\usepackage{mathptmx}
\usepackage{multirow, makecell}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{enumerate}
%---------------------------------------------------------------
% please place your own definitions here and don't use \def but
% \newcommand{}{}

  \DeclareRobustCommand*{\drv}{\mathop{}\!\mathrm{d}}
%----------------------------------------------------------------------------------------
%   TITLE PAGE
%----------------------------------------------------------------------------------------

\title[Short title]{Full Title of the Talk}
\author{John Smith} 
\institute[UCLA] 
{
University of California \\ 
\medskip
\textit{[email protected]} 
}
\date{\today} 
\begin{document}

\begin{frame}
\titlepage 
\end{frame}

%----------------------------------------------------------------------------------------
%   PRESENTATION SLIDES
%----------------------------------------------------------------------------------------

\section{First Section} 

\subsection{Subsection Example} 
\begin{frame}
\frametitle{Multiple Columns}
\begin{columns}[c] % The "c" option specifies centered vertical alignment while the "t" option is used for top vertical alignment

\column{.45\textwidth} % Left column and width
\textbf{Heading}
\begin{table}[H]
\caption{Illustrative calculation for numerical example 2 (Algorithm \ref{ALG_3}).}
\label{tab:Example 2.2}
\centering
\footnotesize%scriptsize
\setlength\tabcolsep{1pt}
\setlength\arraycolsep{2pt}
\begin{tabular}{ll}
\toprule
\normalfont Steps & Numerical computation\\
\midrule
\textbf{Input}  &   Given\\
  & $ U|_{\theta=0.5} = \begin{bmatrix} -1 & 1 & 0.2298 & 0.5000 & 0.7702 & 0.1250 \end{bmatrix}^T$\\
  & $U'_{\theta}|_{\theta =0.5} = \begin{bmatrix} -2 & 2 & 0.8415 & 1 & -0.8415 & 0.7500  \end{bmatrix}^T$\\
  & $ v = \begin{bmatrix} -2.7063 & 1.0000 & 0.2298 & 0.5000 & 0.7702 & 0.1250 \end{bmatrix}^T$\\
  & $ u = \begin{bmatrix} -0.8905 & 0.3290 & 0.0756 & 0.1645 & 0.2534 & 0.0411 \end{bmatrix}^T$\\
    \midrule
Step 1: & Compute $\|U\|'_{\theta} = 2.4257$\\ 
Step 5: & Calculate $v'_{\theta} =$ \\
   & $\begin {bmatrix} 
    -4.4257 & 2.0000 & 0.8415 & 1.0000 & -0.8415 & 0.7500 
     \end{bmatrix}^T$\\ 
Step 7: & Compute $\|v'_{\theta}\| = 4.6451$\\  
Step 8: & Calculate $u'_{\theta} = $ \\
   & $\begin {bmatrix} 
    -0.0952 & 0.1552 & 0.1613 & 0.0776 & -0.6642 & 0.1839 
     \end{bmatrix}^T$\\
Step 9: & Find $ Q'_{\theta} = $\\
   &   $\begin{bmatrix*}[r] 
    -0.3390 &  0.3390 &  0.3017 &  0.1695 & -1.1348 &  0.3354\\ 
     0.3390 &  0.2042 & -0.1296 & -0.1021 &  0.3585 & -0.1338\\ 
     0.3017 & -0.1296 & -0.0488 & -0.0648 &  0.0178 & -0.0411\\
     0.1695 & -0.1021 & -0.0648 & -0.0511 &  0.1792 & -0.0669\\ 
    -1.1348 &  0.3585 &  0.0187 &  0.1792 &  0.6733 & -0.0386\\ 
     0.3354 & -0.1338 & -0.0411 & -0.0669 & -0.0386 & -0.0303
        \end{bmatrix*}$\\
Step 10: & Extract $Q'_{\theta} = Q'_{\theta}(1,1:6)= $\\ 
  &$\begin{bmatrix} -0.3390 & 0.3390 & 0.3017 & 0.1695 & -1.1348 & 0.3354 \end{bmatrix}^T$\\
Step 11: & $R'_{\theta} = \begin{bmatrix} 2.4257 \end{bmatrix}$ \\
\midrule
\textbf{Output} & $R'|_{\theta = 0.5} = \begin{bmatrix} 2.4257 \end{bmatrix}$\\
\midrule
\textbf{Test} & Accuracy of the computations:\\
& $\|(U^TU)'_{\theta}|_{\theta=0.5} - (R^TR)'_{\theta}|_{\theta=0.5}\|=1.7764\cdot10^{-15}$\\
\bottomrule
\end{tabular}
\end{table}

\end{columns}
\end{frame}
%Frame----------------------------------------------------------------------

\begin{frame}
\Huge{\centerline{The End}}
\end{frame}

%----------------------------------------------------------------------------------------

\end{document}

答案1

可能你的观众中没有人能够读懂它,但如果你使用\tiny字体大小并将标题移到另一列,表格就可以挤进你的框架中:

\documentclass[10pt]{beamer}

\mode<presentation> {

\usetheme{Warsaw}

}
\useoutertheme{tree}

\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\usetikzlibrary{fadings}
%\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{bm}
\usepackage{siunitx}
\usepackage{mathtools}
\usepackage{mathptmx}
\usepackage{multirow, makecell}
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{caption}
%\usepackage{enumerate}

\DeclareRobustCommand*{\drv}{\mathop{}\!\mathrm{d}}

\begin{document}

\begin{frame}
\frametitle{Multiple Columns}
\begin{columns} 
\begin{column}{.6\textwidth} % Left column and width
\tiny%scriptsize
\setlength\tabcolsep{1pt}
\setlength\arraycolsep{2pt}
\begin{tabular}{ll}
\toprule
\normalfont Steps & Numerical computation\\
\midrule
\textbf{Input}  &   Given\\
  & $ U|_{\theta=0.5} = \begin{bmatrix} -1 & 1 & 0.2298 & 0.5000 & 0.7702 & 0.1250 \end{bmatrix}^T$\\
  & $U'_{\theta}|_{\theta =0.5} = \begin{bmatrix} -2 & 2 & 0.8415 & 1 & -0.8415 & 0.7500  \end{bmatrix}^T$\\
  & $ v = \begin{bmatrix} -2.7063 & 1.0000 & 0.2298 & 0.5000 & 0.7702 & 0.1250 \end{bmatrix}^T$\\
  & $ u = \begin{bmatrix} -0.8905 & 0.3290 & 0.0756 & 0.1645 & 0.2534 & 0.0411 \end{bmatrix}^T$\\
    \midrule
Step 1: & Compute $\|U\|'_{\theta} = 2.4257$\\ 
Step 5: & Calculate $v'_{\theta} =$ \\
   & $\begin {bmatrix} 
    -4.4257 & 2.0000 & 0.8415 & 1.0000 & -0.8415 & 0.7500 
     \end{bmatrix}^T$\\ 
Step 7: & Compute $\|v'_{\theta}\| = 4.6451$\\  
Step 8: & Calculate $u'_{\theta} = $ \\
   & $\begin {bmatrix} 
    -0.0952 & 0.1552 & 0.1613 & 0.0776 & -0.6642 & 0.1839 
     \end{bmatrix}^T$\\
Step 9: & Find $ Q'_{\theta} = $\\
   &   $\begin{bmatrix*}[r] 
    -0.3390 &  0.3390 &  0.3017 &  0.1695 & -1.1348 &  0.3354\\ 
     0.3390 &  0.2042 & -0.1296 & -0.1021 &  0.3585 & -0.1338\\ 
     0.3017 & -0.1296 & -0.0488 & -0.0648 &  0.0178 & -0.0411\\
     0.1695 & -0.1021 & -0.0648 & -0.0511 &  0.1792 & -0.0669\\ 
    -1.1348 &  0.3585 &  0.0187 &  0.1792 &  0.6733 & -0.0386\\ 
     0.3354 & -0.1338 & -0.0411 & -0.0669 & -0.0386 & -0.0303
        \end{bmatrix*}$\\
Step 10: & Extract $Q'_{\theta} = Q'_{\theta}(1,1:6)= $\\ 
  &$\begin{bmatrix} -0.3390 & 0.3390 & 0.3017 & 0.1695 & -1.1348 & 0.3354 \end{bmatrix}^T$\\
Step 11: & $R'_{\theta} = \begin{bmatrix} 2.4257 \end{bmatrix}$ \\
\midrule
\textbf{Output} & $R'|_{\theta = 0.5} = \begin{bmatrix} 2.4257 \end{bmatrix}$\\
\midrule
\textbf{Test} & Accuracy of the computations:\\
& $\|(U^TU)'_{\theta}|_{\theta=0.5} - (R^TR)'_{\theta}|_{\theta=0.5}\|=1.7764\cdot10^{-15}$\\
\bottomrule
\end{tabular}
\end{column}
\begin{column}{.35\textwidth}
\captionof{table}{Illustrative calculation for numerical example 2 (Algorithm \ref{ALG_3}).}
\label{tab:Example 2.2}
\end{column}
\end{columns}
\end{frame}

\end{document}

在此处输入图片描述


其他一些评论:

  • 你不需要\usepackage{graphicx}\usepackage{enumerate}使用投影仪
  • 框架默认居中,因此[c]没有必要
  • 浮点说明符(例如)[H]在没有浮点数的文档类中没有意义。

答案2

您的代码中有三个问题:

  1. 您根本没有建造任何第二列。
    • 在这种情况下,Beamer 只需调整您正在构建的唯一列的位置。
  2. 表格的宽度太大,无法整齐地放入仅占文档宽度 45% 的一列中。
  3. 我宁愿columns用这个命令来构建结构:

    \begin{columns}[t,onlytextwidth]
    

    onlytextwidth与 Beamer 一起使用时特别有用。

相关内容