我有一组 10*2 的图形,它们是主图形的子图形。我已经能够将它们放在我的 Latex 文档中。结果如下:
a b
c d
.
.
.
Figure: 1 (Caption of Figure: 1).
但我也想给每一行添加标题,并希望我的图形看起来像这样:
a b
{Caption of first row}
.
.
.
Figure: 1 {....}
我怎样才能实现所要求的布局?
答案1
您可以将整个子图构造设置在里面tabular
,然后将成对的标题设置为常规\multicolumn{2}{c}
:
\documentclass{article}
\usepackage{graphicx,subcaption}
\begin{document}
\begin{figure}[ht]
\begin{tabular}{c@{\quad}c}
\subcaptionbox{first}{\includegraphics[width=.3\linewidth]{example-image-a}} &
\subcaptionbox{second}{\includegraphics[width=.4\linewidth]{example-image-b}} \\[1.5\normalbaselineskip]
\multicolumn{2}{c}{This is a mid-figure caption} \\[.5\normalbaselineskip]
\subcaptionbox{third}{\includegraphics[width=.5\linewidth]{example-image-a}} &
\subcaptionbox{fourth}{\includegraphics[width=.3\linewidth]{example-image-b}} \\[1.5\normalbaselineskip]
\multicolumn{2}{c}{This is another mid-figure caption} \\[.5\normalbaselineskip]
\subcaptionbox{fifth}{\includegraphics[width=.2\linewidth]{example-image-a}} &
\subcaptionbox{sixth}{\includegraphics[width=.2\linewidth]{example-image-b}} \\[1.5\normalbaselineskip]
\multicolumn{2}{c}{This is a final mid-figure caption} \\[.5\normalbaselineskip]
\end{tabular}
\caption{A figure caption}
\end{figure}
\end{document}
可以调整成对字幕和其各自子图之间的间距。