在乳胶中插入图像集

在乳胶中插入图像集

我有一个过程,我想用一组图像来表示它,如下图所示。如何使用 subfigure 包来实现这一点?

在此处输入图片描述

答案1

这种安排不需要任何特殊的东西。下面是figure不使用任何子图包的 内部安排。但元素不可引用(如果需要,可以更改):

在此处输入图片描述

\documentclass{article}
\usepackage{graphicx,array}
\newcommand{\subfigANDtitle}[2][.2\linewidth]{%
  \begin{tabular}{@{}>{\centering\arraybackslash}p{#1}@{}} #2 \end{tabular}}
\begin{document}

\begin{figure}
  \centering
  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}

  This is a long title A.

  \medskip

  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}

  This is a long title B.

  \medskip

  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}\hfill
  \includegraphics[width=.2\textwidth]{example-image}

  This is a long title C.

  \medskip

  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title A} \hfill
  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title B} \hfill
  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title C} \hfill
  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title D}

  \medskip

  \hfill
  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title A} \hfill
  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title B}
  \hfill\mbox{}

  \medskip

  \hfill
  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title C} \hfill
  \subfigANDtitle{\includegraphics[width=.2\textwidth]{example-image} \\ title D}
  \hfill\mbox{}
\end{figure}

\end{document}

相关内容