Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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}

enter image description here

share|improve this answer
    
thx! exactly what i was searching for! great explanation for beginners like me :) –  MrMuh Dec 11 '12 at 22:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.