有人知道怎样将 16 幅图像排列成 4 列 4 行的网格吗?
\begin{figure}
\begin{tabular}{cccc}
\subfloat[0,1 s]{\includegraphics[width = 1.5in]{25.gif}}&
\subfloat[25 s]{\includegraphics[width = 1.5in]{26.gif}}&
\subfloat[750 s]{\includegraphics[width = 1.5in]{27.gif}}&
\subfloat[1618,55 s]{\includegraphics[width = 1.5in]{28.gif}}\\
\subfloat[0,1 s]{\includegraphics[width = 1.5in]{29.gif}}&
\subfloat[25 s]{\includegraphics[width = 1.5in]{30.gif}}&
\subfloat[750 s]{\includegraphics[width = 1.5in]{31.gif}}&
\subfloat[1618,55 s]{\includegraphics[width = 1.5in]{32.gif}}\\
\subfloat[0,1 s]{\includegraphics[width = 1.5in]{33.gif}}&
\subfloat[25 s]{\includegraphics[width = 1.5in]{34.gif}}&
\subfloat[750 s]{\includegraphics[width = 1.5in]{35.gif}}&
\subfloat[1618,55 s]{\includegraphics[width = 1.5in]{36.gif}}\\
\subfloat[0,1 s]{\includegraphics[width = 1.5in]{37.gif}}&
\subfloat[25 s]{\includegraphics[width = 1.5in]{38.gif}}&
\subfloat[750 s]{\includegraphics[width = 1.5in]{39.gif}}&
\subfloat[1618,55]{\includegraphics[width = 1.5in]{40.gif}}\\
\subfloat[0,1 s]{\includegraphics[width = 1.5in]{41.gif}}&
\subfloat[25 s]{\includegraphics[width = 1.5in]{42.gif}}&
\subfloat[750 s]{\includegraphics[width = 1.5in]{43.gif}}&
\subfloat[1618,55 s]{\includegraphics[width = 1.5in]{44.gif}}&
\end{tabular}
\caption{4 x 5}
\end{figure}
答案1
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subfig}
\begin{document}
\begin{figure}
\begin{tabular}{cccc}
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}}\\
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}}\\
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}}\\
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}} &
\subfloat[caption]{\includegraphics[width = 1.5in]{something}}
\end{tabular}
\caption{4 x 4}
\end{figure}
\end{document}
通过使用图形环境和里面的表格,您可以获得结果。
如果您正在使用该subcaption
包,您可以执行以下操作:
\begin{figure}
\centering
\begin{tabular}{cccc}
\subcaptionbox{caption\label{1}}{\includegraphics[width = 1.5in]{something}} &
\subcaptionbox{caption\label{2}}{\includegraphics[width = 1.5in]{something}} &
\subcaptionbox{caption\label{1}}{\includegraphics[width = 1.5in]{something}} &
\subcaptionbox{caption\label{2}}{\includegraphics[width = 1.5in]{something}}\\
...
\end{tabular}
\caption{caption}
\label{3}
\end{figure}