To make it short, I have exactly the same problem as described here Figure with caption within an itemize list not indenting correctly except, the fact that I am using the subfig package and the corresponding subfloat environment within the figure. Is there a way to get a correct indent?
Asked
Active
Viewed 2,154 times
1 Answers
2
Here's one possibility, using a minipage of width \linewidth and a figure environment for which the H placement specifier (from the float package) has been used to suppress flotation, allowing the figure to be inside the 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}

Gonzalo Medina
- 505,128
-
thx! exactly what i was searching for! great explanation for beginners like me :) – MrMuh Dec 11 '12 at 22:35