我遇到了子浮点数标题的对齐问题。示例如下:
\documentclass{article}
\usepackage{subfig}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htb]
\captionsetup[subfloat]{farskip=2pt,captionskip=1pt}
\centering
\subfloat[caption 2]{
\begin{minipage}{0.30\columnwidth}
\includegraphics[width=0.45\textwidth]{example-image-a}\\
\includegraphics[width=0.45\textwidth]{example-image-b}
\includegraphics[width=0.45\textwidth]{example-image-c}\\
\end{minipage}
}
\subfloat[caption 2]{\includegraphics[width=0.48\textwidth]{example-image}}
\caption{There are example figures}
\end{figure}
\end{document}
我们如何才能对齐(a)和(b)的标题?
答案1
其中一个minipage
会使图像定位混乱(由于它的基线)。解决方案是使用两个或代替它们使用,tabular
如下例所示:
\documentclass{article}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{array,calc}
\begin{document}
\begin{figure}[htb]
\captionsetup[subfloat]{farskip=2pt,captionskip=1pt}
\begin{tabular}{*{2}{b{0.5\textwidth-2\tabcolsep}}}
\includegraphics[width=0.48\hsize]{example-image-a}}
\subfloat[caption 1]{\includegraphics[width=0.48\hsize]{example-image-b}
\hfill
\includegraphics[width=0.48\hsize]{example-image-c}
}
&
\subfloat[caption 2]{
\includegraphics[width=0.96\hsize]{example-image}}
\end{tabular}
\caption{There are example figures}
\end{figure}
\end{document}