我用来在一个图中收集许多子图的方式是这样的:
梅威瑟:
\begin{figure}[b!]
\begin{center}
$%
\begin{array}[t]{cc}
\text{\includegraphics{PHDImages/Chapitre2/gamma-variate.eps}} & \text{%
\includegraphics{PHDImages/Chapitre2/gamma-variate.eps}} \\
\text{(a)} & \text{(b)} \\
\text{\includegraphics{PHDImages/Chapitre2/gamma-variate.eps}} & \text{%
\includegraphics{PHDImages/Chapitre2/gamma-variate.eps}} \\
\text{(c)} & \text{(d)}%
\end{array}%
$%
\end{center}
\caption{title}
\label{fig:FIGURE2.8}
\end{figure}
结果:
但我实际上想要的是将子图标题放在顶部(左侧加粗),如下图所示:
我怎样才能做到这一点?
答案1
我不会使用array
环境来定位图表。相反,我会加载subcaption
包并使用其机制来排列图表和相关标题。
\documentclass[demo]{article} % omit 'demo' option in real doc.
\usepackage[T1]{fontenc}
\usepackage{subcaption,graphicx}
\captionsetup[subfigure]{skip=0.25\baselineskip,justification=raggedright,
font={footnotesize,bf},labelsep=space,labelformat=simple}
\renewcommand\thesubfigure{\Alph{subfigure}}
\begin{document}
\begin{figure}
\begin{subfigure}[b]{0.475\textwidth}
\caption{flow\,=\,damped oscilator, CMRO2 coupled}
\includegraphics[width=\textwidth]{PHDImages/Chapitre2/gamma-variate1.eps}
\end{subfigure}\hfill
\begin{subfigure}[b]{0.475\textwidth}
\caption{flow\,=\,gamma variate convolutions, CMRO2 coupled}
\includegraphics[width=\textwidth]{PHDImages/Chapitre2/gamma-variate2.eps}
\end{subfigure}
\begin{subfigure}[t]{0.475\textwidth}
\caption{\dots}
\includegraphics[width=\textwidth]{PHDImages/Chapitre2/gamma-variate3.eps}
\end{subfigure}\hfill
\begin{subfigure}[t]{0.475\textwidth}
\caption{\dots}
\includegraphics[width=\textwidth]{PHDImages/Chapitre2/gamma-variate4.eps}
\end{subfigure}
\caption{title}
\label{fig:FIGURE2.8}
\end{figure}
\end{document}