如何创建 ( 4 x 4 ) 图像图形?如何管理原始图像和列之间的空间?
答案1
如果子图需要子标题,那么可以使用许多包;subcaption
或者subfig
或者floatrow
可以使用;请参阅软件包的文档来查看它们提供的所有功能。
下面是一个使用的小例子subcaption
:
\documentclass{article}
\usepackage{subcaption}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testa}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testb}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testc}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testd}
\end{subfigure}\par\medskip
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:teste}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testf}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testg}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testh}
\end{subfigure}\par\medskip
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testi}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testj}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testk}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testl}
\end{subfigure}\par\medskip
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testm}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testn}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testo}
\end{subfigure}%
\begin{subfigure}{.25\linewidth}
\centering
\includegraphics[width=.8\linewidth]{example-image-a}
\caption{A subfigure}
\label{sfig:testp}
\end{subfigure}
\caption{Sixteen subfigures}
\label{fig:test}
\end{figure}
\end{document}
如果不需要子字幕,请应用相同的想法,subfigure
用我的代码中的所有位置替换minipage
并删除内部\caption
和\label
命令。