简而言之,我遇到的问题与此处描述的完全相同逐项列表中带有标题的图形未正确缩进除了我在图中使用了 subfig 包和相应的 subfloat 环境之外。有没有办法获得正确的缩进?
答案1
这是一种可能性,使用minipage
宽度\linewidth
和figure
环境,其中H
位置说明符(来自float
包)已用于抑制浮动,从而允许figure
位于内部minipage
:
\documentclass{article}
\usepackage[demo]{graphicx}% demo option just for the example
\usepackage{subfig}
\usepackage{float}
\begin{document}
\begin{itemize}
\item First item.
\item Second item with some additional text to span more than just one line.
\begin{enumerate}
\item And here we start a new list so the indentation increases before we include the images.\par
\begin{minipage}{\linewidth}
\begin{figure}[H]
\subfloat[A test subfigure inside some lists]{\includegraphics[width=4cm]{image1}}\hfill
\subfloat[Another test subfigure inside some lists]{\includegraphics[width=4cm]{image2}}
\end{figure}
\end{minipage}
\item Some additional information.
\end{enumerate}
\item Third item.
\end{itemize}
\end{document}