在 Beamer 中构建表格

在 Beamer 中构建表格

我正在使用 LuaLaTex 制作幻灯片。幻灯片中有一个表格。但是,我无法控制其大小,并且表格的某些部分无法查看。我该如何解决这个问题?

\documentclass[11pt]{beamer}

\begin{document}

\begin{frame}{Plan for completion and thesis submission}

%%
\begin{center}


%%
\begin{tabular}{|l|c|c|c|c|c|}
\hline
\centering{Tasks} & \multicolumn{2}{|c|}{\small{2016/2017}} & \multicolumn{2}{|c|}{\small{2017/2018}} & \small{2018/2019}\\
\cline{2-6}
& \tiny{Sem. 1} & \tiny{Sem. 2} & \tiny{Sem. 1} & \tiny{Sem. 2} & \tiny{Sep - Dec 18} \\

\hline
\small{Reading and understanding}       & $\times$ &   $\times$      &       &           &\\
\small{of various advanced concepts}    &        &        &       &           &\\
\small{on groups and graphs}               &        &        &        &           &\\

\hline
\small{Write a literature review}           & $\times$  &       &         &           &\\

\hline
\small{Obtain examples (by hand}       &         & $\times$ &         &           &\\
\small{or using a computational}         &          &       &         &            &\\
\small{algebra system)}                     &          &       &         &             &\\

\hline
\small{Form conjectures and}             &          & $\times$ &        &             &\\
\small{prove or disprove the}             &          &        &         &            &\\
\small{conjectures}                           &          &        &         &             &\\

\hline
\small{Work on}             &           &  $\times$    &$\times$     & $\times$      & $\times$\\
\small{research problems}                &           &      &           &             &\\

\hline
\small{Submit a paper to an}            &           &       & $\times$    &             &\\ 
\small{ISI-indexed journal for}         &           &        &          &             &\\
\small{publication}                          &           &        &          &             &\\

\hline
\small{Write up thesis for}               &           &        &          &$\times$ &\\
\small{submission}                          &           &        &          &              &\\

\hline
\small{Complete writing up}            &           &         &          &             & $\times$ \\
\small{of thesis and submit}            &           &         &          & &\\ 
\small{thesis by December 2018}    &           &         &           &  &\\
\hline

\end{tabular}

\end{center}

\end{frame}

\end{document}

答案1

为了节省一些空间(水平和垂直),请使用较小的字体大小,在列之间使用较少的空白,并使标题更简洁。为了确保表格内容适合文本块,请为第一列使用环境tabularxX列类型。如果您为第一列使用X列,您还可以使用它来执行自动换行。

另外,请尝试让表格看起来更“开放”。例如,删除所有垂直线 - 它们根本就不需要!真的! - 并使用更少但间距适当的水平线。我建议使用包中的宏booktabs

在此处输入图片描述

\documentclass[11pt]{beamer}
\usepackage{tabularx,ragged2e,booktabs}
\begin{document}

\begin{frame}{Plan for completion and thesis submission}

\footnotesize
\setlength\tabcolsep{4pt} % default: 6pt
\begin{tabularx}{\textwidth}{@{}>{\RaggedRight}X*{5}{c}@{}}
\toprule
Tasks & \multicolumn{2}{c}{2016--17} & \multicolumn{2}{c}{2017--18} & 2018--19\\
\cmidrule(l){2-6}
& {\tiny Sem.\ 1} & {\tiny Sem.\ 2} & {\tiny Sem.\ 1} & {\tiny Sem.\ 2} & {\tiny Sep--Dec 18} \\
\midrule
Reading and understanding of various advanced concepts on groups and graphs 
& $\times$ & $\times$  \\
\addlinespace
Write a literature review 
& $\times$ \\
\addlinespace
Obtain examples (by hand or using a computational algebra system)    
& & $\times$ \\
\addlinespace
Form conjectures and prove or disprove the conjectures 
& & $\times$ \\
\addlinespace
Work on research problems 
& & $\times$ &$\times$ & $\times$ & $\times$ \\
\addlinespace
Submit a paper to an ISI-indexed journal for publication
& & & $\times$ \\ 
\addlinespace
Write up thesis for submission 
& & & &$\times$ \\
\addlinespace
Complete writing up of thesis and submit thesis by December 2018 
& & & & & $\times$ \\
\bottomrule
\end{tabularx}

\end{frame}
\end{document}

相关内容