我正在导入章节和 caption2.sty 如何创建子浮点图形或子图形(第一行两个,下面一个)
答案1
我建议使用该subcaption
包,顺便subcaption2
用较新的caption
包(与 具有相同的作者subcaption
)替换。
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\newcommand{\cs}[1]{\texttt{\char`\\#1}}
\begin{document}
\begin{figure}[htbp]
\centering
\subcaptionbox{a subfigure in a \cs{subcaptionbox}}
{\includegraphics[scale=0.3]{example-image-a}}
\quad
\subcaptionbox{another subfigure, also in a \cs{subcaptionbox}}
{\includegraphics[scale=0.4]{example-image-b}}
\end{figure}
\begin{figure}[!htbp]\ContinuedFloat
\begin{subfigure}{\textwidth}
\centering
\includegraphics[scale=0.5]{example-image-c}
\subcaption{subfigure}
\end{subfigure}
\caption{A figure with subfigures}
\label{fig:subfigures}
\end{figure}
\end{document}