答案1
两个选项:
tabular
对每一层和包使用一些ssubcaption
:代码:
\documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \begin{document} \begin{figure} \begin{minipage}{\linewidth} \centering \begin{tabular}{ccc} \includegraphics[width=.28\linewidth,height=1cm]{example-image-a} & \includegraphics[width=.28\linewidth,height=1cm]{example-image-b} & \includegraphics[width=.28\linewidth,height=1cm]{example-image-c} \\ First image & Second image & Third image \\ \includegraphics[width=.28\linewidth,height=1cm]{example-image-a} & \includegraphics[width=.28\linewidth,height=1cm]{example-image-b} \\ Fourth image & Fifth image & \end{tabular} \subcaption{First layer} \end{minipage}\par\bigskip \begin{minipage}{\linewidth} \centering \begin{tabular}{ccc} \includegraphics[width=.28\linewidth,height=1cm]{example-image-a} & \includegraphics[width=.28\linewidth,height=1cm]{example-image-b} & \includegraphics[width=.28\linewidth,height=1cm]{example-image-c} \\ First image & Second image & Third image \\ \end{tabular} \subcaption{Second layer} \end{minipage} \caption{a figure with some layers of subfigures each with its own name and each layer with a subcaption} \end{figure} \end{document}
tabular
上面我使用了具有三种类型列的标准c
;如果图像下方的文本跨越多行,则可以使用tabularx
包tabularx
和居中X
列,如下面的选项所示。由于 OP 正在使用
subfig
,subcaption
因此无法使用该包;这里有一个使用与以前相同想法的方法,但使用tabularx
和subfig
包:\documentclass{article} \usepackage[caption=false]{subfig} \usepackage{graphicx} \usepackage{tabularx} \newcolumntype{Y}{>{\centering\arraybackslash}X} \begin{document} \begin{figure} \subfloat[First layer]{% \begin{minipage}{\linewidth} \centering \begin{tabularx}{\linewidth}{YYY} \includegraphics[width=\linewidth,height=1cm]{example-image-a} & \includegraphics[width=\linewidth,height=1cm]{example-image-b} & \includegraphics[width=\linewidth,height=1cm]{example-image-c} \\ First image & Second image & Third image \\ \includegraphics[width=\linewidth,height=1cm]{example-image-a} & \includegraphics[width=\linewidth,height=1cm]{example-image-b} \\ Fourth image & Fifth image & \end{tabularx} \end{minipage}}\par\medskip \subfloat[Second layer]{% \begin{minipage}{\linewidth} \centering \begin{tabularx}{\linewidth}{YYY} \includegraphics[width=\linewidth,height=1cm]{example-image-a} & \includegraphics[width=\linewidth,height=1cm]{example-image-b} & \includegraphics[width=\linewidth,height=1cm]{example-image-c} \\ First image & Second image & Third image \\ \end{tabularx} \end{minipage}} \caption{a figure with some layers of subfigures each with its own name and each layer with a subcaption} \end{figure} \end{document}
答案2
您可以有多行,例如查看此示例经典论文:
begin{figure}[bth]
\myfloatalign
\subfloat[Asia personas duo.]
{\includegraphics[width=.45\linewidth]{gfx/example_1}} \quad
\subfloat[Pan ma signo.]
{\label{fig:example-b}%
\includegraphics[width=.45\linewidth]{gfx/example_2}} \\
\subfloat[Methodicamente o uno.]
{\includegraphics[width=.45\linewidth]{gfx/example_3}} \quad
\subfloat[Titulo debitas.]
{\includegraphics[width=.45\linewidth]{gfx/example_4}}
\caption[Tu duo titulo debitas latente]{Tu duo titulo debitas
latente.}\label{fig:example}
\end{figure}