我正在制作用于演示的幻灯片。目前,左下角的表格与右下角的表格没有对齐。我希望每个表格的第一行能够与上面每个表格的第一行对齐。有什么办法吗?
\documentclass[xcolor=pdftex,dvipsnames,table]{beamer}
\usepackage{array}
\usepackage{amsthm,amsmath,amssymb}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{url}
% Set theme to UNA2
\usetheme{UNA2}
\newcommand{\divides}{\bigm|}
\newcommand{\ndivides}{%
\mathrel{\mkern.5mu % small adjustment
% superimpose \nmid to \big|
\ooalign{\hidewidth$\big|$\hidewidth\cr$\nmid$\cr}%
}%
}
\begin{document}
\begin{frame}{Quasigroups and the Sudoku Property}
\begin{multicols}{2}
\begin{table}
\begin{tabular}{|c|c||c|c|}
\hline
1 & 3 & 2 & 4\\
\hline
2 & 4 & 3 & 1\\
\hline\hline
3 & 1 & 4 & 2\\
\hline
4 & 2 & 1 & 3\\
\hline
\end{tabular}\vspace{1 mm}
\\ A $4\times4$ table with
\\ $2\times2$ Sudoku blocks
\end{table}
\begin{table}
\begin{tabular}{c|c|c|c|c|}
& 1 & 2 & 3 & 4\\
\hline\hline
1 & 1 & 2 & 3 & 4\\
\hline
2 & 2 & 1 & 4 & 3\\
\hline
3 & 3 & 4 & 1 & 2\\
\hline
4 & 4 & 3 & 2 & 1\\
\hline
\end{tabular}\vspace{1 mm}
\\ A Cayley Table representing
\\ a Quasigroup
\end{table}
\columnbreak
\begin{table}
\begin{tabular}{c||c|c||c|c|}
& 1 & 2 & 3 & 4\\
\hline\hline
1 & 1 & 3 & 2 & 4\\
\hline
2 & 2 & 4 & 3 & 1\\
\hline\hline
3 & 3 & 1 & 4 & 2\\
\hline
4 & 4 & 2 & 1 & 3\\
\hline
\end{tabular}\vspace{1 mm}
\\A labeled $4\times4$ table
\\ with $2\times2$ Sudoku blocks
\end{table}
\begin{table}
\begin{tabular}{c||c|c||c|c|}
& 1 & 2 & 3 & 4\\
\hline\hline
1 & 1 & 3 & 2 & 4\\
\hline
2 & 2 & 4 & 1 & 3\\
\hline\hline
3 & 3 & 1 & 4 & 2\\
\hline
4 & 4 & 2 & 3 & 1\\
\hline
\end{tabular}\vspace{1 mm}
\\ The same Quasigroup with the
\\ Sudoku property
\end{table}
\end{multicols}
\end{frame}
\end{document}
答案1
仅考虑显示信息方面的建议。您似乎正在使用行/列索引,我已使用 进行设置\small
。
我用过hhline
突出显示块(需要fragile
框架):
\documentclass{beamer}
\usepackage{array,tabularx,hhline}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcommand{\mc}[1]{\multicolumn{1}{c}{\small #1}}
\begin{document}
\begin{frame}[fragile]{Quasigroups and the Sudoku Property}
\begin{tabularx}{\textwidth}{CC}
\begin{tabular}{|c|c||c|c|}
\mc{\phantom{1}} \\% Empty line
\hline
1 & 3 & 2 & 4 \\
\hline
2 & 4 & 3 & 1 \\
\hhline{|=|=#=|=|}
3 & 1 & 4 & 2 \\
\hline
4 & 2 & 1 & 3 \\
\hline
\end{tabular} &
\begin{tabular}{c|c|c||c|c|}
\mc{} & \mc{1} & \mc{2} & \mc{3} & \mc{4} \\
\cline{2-5}
\small 1 & 1 & 3 & 2 & 4 \\
\cline{2-5}
\small 2 & 2 & 4 & 3 & 1 \\
\hhline{~|=|=#=|=|}
\small 3 & 3 & 1 & 4 & 2 \\
\cline{2-5}
\small 4 & 4 & 2 & 1 & 3 \\
\cline{2-5}
\end{tabular} \\
\begin{tabular}{c} A $4\times4$ table with \\ $2\times2$ Sudoku blocks \end{tabular} &
\begin{tabular}{c} A labeled $4\times4$ table \\ with $2\times2$ Sudoku blocks \end{tabular} \\[2\normalbaselineskip]
%
\begin{tabular}{c|c|c||c|c|}
\mc{} & \mc{1} & \mc{2} & \mc{3} & \mc{4} \\
\cline{2-5}
\small 1 & 1 & 2 & 3 & 4 \\
\cline{2-5}
\small 2 & 2 & 1 & 4 & 3 \\
\cline{2-5}
\small 3 & 3 & 4 & 1 & 2 \\
\cline{2-5}
\small 4 & 4 & 3 & 2 & 1 \\
\cline{2-5}
\end{tabular} &
\begin{tabular}{c|c|c||c|c|}
\mc{} & \mc{1} & \mc{2} & \mc{3} & \mc{4} \\
\cline{2-5}
\small 1 & 1 & 3 & 2 & 4 \\
\cline{2-5}
\small 2 & 2 & 4 & 1 & 3 \\
\hhline{~|=|=#=|=|}
\small 3 & 3 & 1 & 4 & 2 \\
\cline{2-5}
\small 4 & 4 & 2 & 3 & 1 \\
\cline{2-5}
\end{tabular} \\
\begin{tabular}{c} A Cayley Table representing \\ a Quasigroup \end{tabular} &
\begin{tabular}{c} The same Quasigroup with the \\ Sudoku property \end{tabular}
\end{tabularx}
\end{frame}
\end{document}