在桌子旁边添加一个大支架:Beamer

在桌子旁边添加一个大支架:Beamer

我在 Beamer 中有下表:

桌子

我想在表格左侧(外侧)添加一个大括号“{”,横跨前三行,并在括号旁边添加一些有关这些行的信息。我该如何实现?

以下是 MWE:

\documentclass{beamer}
\usetheme{metropolis}
\setbeamertemplate{footline}{}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother
\usepackage{lmodern}
\usepackage{tcolorbox}
\usepackage[USenglish]{babel}
\usepackage[latin1]{inputenc}
\setbeamersize{text margin left=10mm,text margin right=10mm} 
\setbeamerfont{frametitle}{size=\small}
\begin{document}
\maketitle
\begin{frame}{Text}
\resizebox{\textwidth}{!}{%
\begin{tabular}{|c|c|}
\hline
Column A & Column B\\
\hline \hline
Some text & Some text\\
Some text  & Some text\\
Some text &Some text \\
Some text & Some text\\
Some text & Some text\\
Some text & Some text\\
\hline
\end{tabular}
}
\end{frame}
\end{document}

答案1

您可以使用bigdelim随附的软件包非常简单地完成此操作multirow:只需在左侧添加一列并\ldelimiter在相关行的最左侧单元格中使用命令即可:

\documentclass{beamer}
\usetheme{metropolis}
\setbeamertemplate{footline}{}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother
\usepackage{lmodern}
\usepackage{tcolorbox}
\usepackage[USenglish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{bigdelim}
\setbeamersize{text margin left=10mm,text margin right=10mm}
\setbeamerfont{frametitle}{size=\small}

\begin{document}

\maketitle
\begin{frame}{Text}
\resizebox{\textwidth}{!}{%
\begin{tabular}{r@{\,}|c|c|}
\cline{2-3}
 & Column A & Column B\\
\cline{2-3} \cline{2-3}
\color{red}\ldelim\{{3}{*}[\color{blue} Some info]& Some text & Some text\\
 & Some text & Some text\\
 & Some text &Some text \\
 & Some text & Some text\\
 & Some text & Some text\\
 & Some text & Some text\\
\cline{2-3}
\end{tabular}
}
\end{frame}

\end{document} 

在此处输入图片描述

答案2

在右侧添加括号和解释的概念证明 - 您必须删除或修改表示表格文本宽度的行,否则表格将占据整个框架

\resizebox{\textwidth}{!}{}%<----------remember to delete both braces at the end if 
                                       %using this solution

在此处输入图片描述

平均能量损失

\documentclass{beamer}
\usetheme{metropolis}
\setbeamertemplate{footline}{}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother
\usepackage{lmodern}
\usepackage{tcolorbox}
\usepackage[USenglish]{babel}
\usepackage[latin1]{inputenc}
\setbeamersize{text margin left=10mm,text margin right=10mm} 
\setbeamerfont{frametitle}{size=\small}

\newcommand\MyLBrace[2]{%
  \left.\rule{0pt}{#1}\right\}\text{#2}}

\begin{document}
\maketitle
\begin{frame}{Text}

\noindent\begin{tabular}{c@{}l}
\begin{tabular}{c}
\hline
Column A \\
\hline \hline
Some text\\
Some text\\
Some text\\
Some text\\
Some textt\\
Some text\\
\hline
\end{tabular}
&
  $\begin{array}{l}
    \MyLBrace{3ex}{things beginning with vowels} \\ 
    \MyLBrace{3ex}{things beginning with consonants} \\
    \MyLBrace{4.4ex}{things beginning and ending with t} 
  \end{array}$
  \end{tabular}
\end{frame}
\end{document}

@GonzaloMedina 给出的解决方案---https://tex.stackexchange.com/a/15276/197451

相关内容