![如何创建子浮点图形(第一行两个,下面一个)](https://linux22.com/image/433266/%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E5%AD%90%E6%B5%AE%E7%82%B9%E5%9B%BE%E5%BD%A2%EF%BC%88%E7%AC%AC%E4%B8%80%E8%A1%8C%E4%B8%A4%E4%B8%AA%EF%BC%8C%E4%B8%8B%E9%9D%A2%E4%B8%80%E4%B8%AA%EF%BC%89.png)
我正在导入章节和 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}