如何将单个页面中的 8 张图片以网格形式定位,如图所示

如何将单个页面中的 8 张图片以网格形式定位,如图所示

我有 16 幅图像,我正在尝试使用 latex 将它们的去噪和去噪版本定位在网格中,如图所示。需要 latex 代码的帮助 在此处输入图片描述

答案1

我将假设figure环境应该显示 8 行图像,而不是 16 行。如果这个假设正确,那么下面的代码可能会引起您的兴趣。

在此处输入图片描述

\documentclass[demo]{article} % remove 'demo' option in real doc.
\usepackage{graphicx,array,booktabs}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}

\begin{figure}[p!]
% Global parameters for \includegraphics instructions:
\setkeys{Gin}{height=0.1\textheight,width=0.1\textheight} 

\caption{[Something Descriptive for Method 1]} % provide a suitable caption
\bigskip
\centering
\begin{tabular}{@{} r @{} *{2}{M{0.1\textheight}} @{}}
& Method 1 & Residual \\
\llap{Image 1\quad} & \includegraphics{fig1a} & \includegraphics{fig1b} \\ \addlinespace
\llap{Image 2\quad} & \includegraphics{fig2a} & \includegraphics{fig2b} \\ \addlinespace
\llap{Image 3\quad} & \includegraphics{fig3a} & \includegraphics{fig3b} \\ \addlinespace
\llap{Image 4\quad} & \includegraphics{fig4a} & \includegraphics{fig4b} \\ \addlinespace
\llap{Image 5\quad} & \includegraphics{fig5a} & \includegraphics{fig5b} \\ \addlinespace
\llap{Image 6\quad} & \includegraphics{fig6a} & \includegraphics{fig6b} \\ \addlinespace
\llap{Image 7\quad} & \includegraphics{fig7a} & \includegraphics{fig7b} \\ \addlinespace
\llap{Image 8\quad} & \includegraphics{fig8a} & \includegraphics{fig8b} 
\end{tabular}
\end{figure}

\end{document}

相关内容