我正在尝试使用表格环境来安排报告。这是我的 MWE。
\documentclass[11pt,letterpaper,twoside,english,final]{article}
\usepackage{rotating}
\usepackage{multirow}
\usepackage{graphicx}
\begin{document}
\section{Experimental Results}
%\begin{sidewaystable}[p]
\begin{table}[htpb]
\begin{tabular}{@{}c@{}@{}c@{}@{}c@{}@{}c@{}}
\includegraphics[width=0.125\textwidth]{example-grid-100x100pt} & \includegraphics[width=0.125\textwidth]{example-grid-100x100pt} & \multirow{4}{*}{\includegraphics[height=2.25in]{example-grid-100x100pt}} & \multirow{4}{*}{\includegraphics[height=2.25in]{example-grid-100x100pt}} \\
i & ii & & \\
\includegraphics[width=0.125\textwidth]{example-grid-100x100pt} & \includegraphics[width=0.125\textwidth]{example-grid-100x100pt} & & \\
iii & iv & & \\
\multicolumn{2}{c}{\vspace{6pt}Pictures } & \vspace{6pt}Speedup & \vspace{6pt}Histograms \\
\multicolumn{2}{c}{} & & \\
\multicolumn{2}{c}{
\resizebox{0.3\textwidth}{!}{%
\begin{tabular}{ccccccc}
\multicolumn{1}{l}{} & & \multicolumn{5}{c}{Cat 1} \\ \cline{3-7}
\multicolumn{1}{l}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{\textbf{256}} & \multicolumn{1}{l|}{\textbf{512}} & \multicolumn{1}{l|}{\textbf{1024}} & \multicolumn{1}{l|}{\textbf{2048}} & \multicolumn{1}{l|}{\textbf{4096}} \\ \cline{2-7}
\multicolumn{1}{c|}{\multirow{6}{*}{\begin{sideways}Cat 2\end{sideways}}} & \multicolumn{1}{l|}{\textbf{64}} & \multicolumn{1}{l|}{5.04} & \multicolumn{1}{l|}{25.90} & \multicolumn{1}{l|}{125.00} & \multicolumn{1}{l|}{509.20} & \multicolumn{1}{l|}{2,127.00} \\ \cline{2-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{128}} & \multicolumn{1}{l|}{2.36} & \multicolumn{1}{l|}{20.25} & \multicolumn{1}{l|}{115.10} & \multicolumn{1}{l|}{502.60} & \multicolumn{1}{l|}{2,183.00} \\ \cline{2-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{256}} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{10.31} & \multicolumn{1}{l|}{95.69} & \multicolumn{1}{l|}{512.60} & \multicolumn{1}{l|}{2,382.88} \\ \cline{2-2} \cline{4-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{512}} & & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{59.85} & \multicolumn{1}{l|}{538.60} & \multicolumn{1}{l|}{2,895.90} \\ \cline{2-2} \cline{5-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{1024}} & & & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{568.10} & \multicolumn{1}{l|}{5,225.46} \\ \cline{2-2} \cline{6-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{2048}} & & & & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{9,104.83} \\ \cline{2-2} \cline{7-7}
\end{tabular}
}
} &
\resizebox{0.3\textwidth}{!}{%
\begin{tabular}{ccccccc}
\multicolumn{1}{l}{} & & \multicolumn{5}{c}{Cat 1} \\ \cline{3-7}
\multicolumn{1}{l}{} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{\textbf{256}} & \multicolumn{1}{l|}{\textbf{512}} & \multicolumn{1}{l|}{\textbf{1024}} & \multicolumn{1}{l|}{\textbf{2048}} & \multicolumn{1}{l|}{\textbf{4096}} \\ \cline{2-7}
\multicolumn{1}{c|}{\multirow{6}{*}{\begin{sideways}Cat 2\end{sideways}}} & \multicolumn{1}{l|}{\textbf{64}} & \multicolumn{1}{l|}{5.04} & \multicolumn{1}{l|}{25.90} & \multicolumn{1}{l|}{125.00} & \multicolumn{1}{l|}{509.20} & \multicolumn{1}{l|}{2,127.00} \\ \cline{2-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{128}} & \multicolumn{1}{l|}{2.36} & \multicolumn{1}{l|}{20.25} & \multicolumn{1}{l|}{115.10} & \multicolumn{1}{l|}{502.60} & \multicolumn{1}{l|}{2,183.00} \\ \cline{2-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{256}} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{10.31} & \multicolumn{1}{l|}{95.69} & \multicolumn{1}{l|}{512.60} & \multicolumn{1}{l|}{2,382.88} \\ \cline{2-2} \cline{4-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{512}} & & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{59.85} & \multicolumn{1}{l|}{538.60} & \multicolumn{1}{l|}{2,895.90} \\ \cline{2-2} \cline{5-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{1024}} & & & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{568.10} & \multicolumn{1}{l|}{5,225.46} \\ \cline{2-2} \cline{6-7}
\multicolumn{1}{c|}{} & \multicolumn{1}{l|}{\textbf{2048}} & & & & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{9,104.83} \\ \cline{2-2} \cline{7-7}
\end{tabular}
}
&
\includegraphics[height=1in]{example-image}
\\
\multicolumn{2}{c}{Runtime 1} & Runtime 2 &
\end{tabular}
%\end{sidewaystable}
\end{table}
\end{document}
以下是产生的输出:
现在我正在尝试弄清楚几件事。
我如何对齐第一行,使得加速和直方图与四张小图片的顶部对齐。
第二行的Image文件应该与两个Runtime表对齐。
谢谢
答案1
我对运行时表格做了一些本质上不必要的更改,只是为了使代码更具可读性(对我来说)。
\documentclass[11pt,letterpaper,twoside,english,final]{article}
%\usepackage{rotating}
\usepackage{multirow}
\usepackage{graphicx}
\begin{document}
\section{Experimental Results}
%\begin{sidewaystable}[p]
\begin{table}[htpb]
\begin{tabular}{@{}c@{}@{}c@{}@{}c@{}@{}}
% start of 2x2 picture group
\raisebox{-\height}{\begin{tabular}{@{}c@{}@{}c@{}@{}}%
\includegraphics[width=0.125\textwidth]{example-grid-100x100pt} & \includegraphics[width=0.125\textwidth]{example-grid-100x100pt} \\
i & ii \\
\includegraphics[width=0.125\textwidth]{example-grid-100x100pt} & \includegraphics[width=0.125\textwidth]{example-grid-100x100pt} \\
iii & iv
\end{tabular}}% end of 2x2 picture group
& \raisebox{-\height}{\includegraphics[height=2.25in]{example-grid-100x100pt}}
& \raisebox{-\height}{\includegraphics[height=2.25in]{example-grid-100x100pt}} \\[6pt]
Pictures & Speedup & Histograms \\
% start of runtime 1
\raisebox{-\height}{\resizebox{0.3\textwidth}{!}{%
\begin{tabular}{@{}c|l|l|l|l|l|l|l|}
\multicolumn{2}{c}{} & \multicolumn{5}{c}{Cat 1} \\
\cline{3-7}
\multicolumn{2}{c|}{} & \textbf{256} & \textbf{512} & \textbf{1024} & \textbf{2048} & \textbf{4096} \\
\cline{2-7}
\multirow{6}{*}{\rotatebox[origin=c]{90}{Cat 2}}
& \textbf{64} & 5.04 & 25.90 & 125.00 & 509.20 & 2,127.00 \\
\cline{2-7}
& \textbf{128} & 2.36 & 20.25 & 115.10 & 502.60 & 2,183.00 \\
\cline{2-7}
& \textbf{256} & & 10.31 & 95.69 & 512.60 & 2,382.88 \\
\cline{2-2} \cline{4-7}
& \textbf{512} & \multicolumn{2}{|c|}{} & 59.85 & 538.60 & 2,895.90 \\
\cline{2-2} \cline{5-7}
& \textbf{1024} & \multicolumn{3}{|c|}{} & 568.10 & 5,225.46 \\
\cline{2-2} \cline{6-7}
& \textbf{2048} & \multicolumn{4}{|c|}{} & 9,104.83 \\
\cline{2-2} \cline{7-7}
\end{tabular}}} &
%start of runtime 2
\raisebox{-\height}{\resizebox{0.3\textwidth}{!}{%
\begin{tabular}{@{}c|l|l|l|l|l|l|l|}
\multicolumn{2}{c}{} & \multicolumn{5}{c}{Cat 1} \\
\cline{3-7}
\multicolumn{2}{c|}{} & \textbf{256} & \textbf{512} & \textbf{1024} & \textbf{2048} & \textbf{4096} \\
\cline{2-7}
\multirow{6}{*}{\rotatebox[origin=c]{90}{Cat 2}}
& \textbf{64} & 5.04 & 25.90 & 125.00 & 509.20 & 2,127.00 \\
\cline{2-7}
& \textbf{128} & 2.36 & 20.25 & 115.10 & 502.60 & 2,183.00 \\
\cline{2-7}
& \textbf{256} & & 10.31 & 95.69 & 512.60 & 2,382.88 \\
\cline{2-2} \cline{4-7}
& \textbf{512} & \multicolumn{2}{|c|}{} & 59.85 & 538.60 & 2,895.90 \\
\cline{2-2} \cline{5-7}
& \textbf{1024} & \multicolumn{3}{|c|}{} & 568.10 & 5,225.46 \\
\cline{2-2} \cline{6-7}
& \textbf{2048} & \multicolumn{4}{|c|}{} & 9,104.83 \\
\cline{2-2} \cline{7-7}
\end{tabular}}} &
\raisebox{-\height}{\includegraphics[height=1in]{example-image}} \\
Runtime 1 & Runtime 2
\end{tabular}
\end{table}
%\end{sidewaystable}
\end{document}