几乎与如何在投影仪的一张幻灯片中放置 3 个图形? 我想将三张表格和一个图形放在一个框架中。更准确地说,放在一个四象限网格中。你能告诉我如何通过调整这四个元素的大小来使每个元素都能适合网格的一个象限吗?有没有可以自动执行此操作的软件包?
注意:Adjustbox 对我来说效果不太好。
\begin{frame}
\noindent
\fbox{%
\begin{minipage}[l][\dimexpr 0.300\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}
\begin{figure}
\includegraphics[]{SomeFigure}
\end{figure}
\end{minipage}%
}%
\hfill
\fbox{%
\begin{minipage}[r][\dimexpr 0.300\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}%
\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{table}
\end{minipage}%
}%
\vfill
\noindent
\fbox{%
\begin{minipage}[l][\dimexpr 0.300\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}%
\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{table}
\end{minipage}%
}%
\hfill
\fbox{%
\begin{minipage}[r][\dimexpr 0.300\textheight-2\fboxsep-2\fboxrule\relax][t]{\dimexpr .495\textwidth-2\fboxsep-2\fboxrule\relax}%
\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{table}
\end{minipage}%
}%
\end{frame}
答案1
可以使用以下代码实现上面显示的输出:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{minipage}[t]{0.49\textwidth}
\vspace{0pt}
\includegraphics[width=\linewidth]{example-image}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}%
\vspace{0pt}
\centering \footnotesize
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\
\hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{minipage}
\vfill
\begin{minipage}[t]{0.49\textwidth}
\vspace{0pt}
\centering \footnotesize
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\
\hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}[t]{0.49\textwidth}%
\vspace{0pt}
\centering \footnotesize
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\
\hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{minipage}
\end{frame}
\end{document}
答案2
我会简单地使用 beamer 列机制将图像和表格并排放置。为了将表格挤入可用空间,较小的字体大小有助于:
\documentclass{beamer}
\begin{document}
\begin{frame}
\scriptsize
\begin{columns}[onlytextwidth]
\begin{column}{.48\textwidth}
\includegraphics[width=\textwidth]{example-image-duck}
\end{column}
\begin{column}{.48\textwidth}
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{column}
\end{columns}
\bigskip
\begin{columns}[onlytextwidth]
\begin{column}{.48\textwidth}
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{column}
\begin{column}{.48\textwidth}
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} & \textbf{Blabla} \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
555 & 555 & 555 & 555 \\ \hline
\end{tabular}
\end{column}
\end{columns}
\end{frame}
\end{document}