1

I want to use the itemize environment inside a hanging caption but the indentation is just as in the main body. I'd like to have the listing indented from the hanging caption.

\documentclass{scrbook}
\usepackage{caption}

\begin{document}
foo foo foo foo foo foo foo foo foo foo foo foo 
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
\begin{itemize}
    \item bar
\end{itemize}

\begin{figure}
\captionsetup{singlelinecheck=off}
\caption[foo bar]{foo foo foo foo foo foo foo foo foo foo foo foo 
    foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
  \begin{itemize}
       \item this listing belongs to the caption
       \item but looks as if it was part of the body
  \end{itemize}}
\end{figure}

\end{document}

enter image description here

1 Answer 1

1

It seems likely that such a setup might be an exclusion rather than the norm. So, set the items manually using \textbullet and appropriate itemize-like spacing.

enter image description here

\documentclass{scrbook}

\usepackage{caption}

\begin{document}

foo foo foo foo foo foo foo foo foo foo foo foo 
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
foo foo foo foo foo foo foo foo foo foo foo foo foo foo 

\begin{itemize}
  \item bar
\end{itemize}

\begin{figure}
  \captionsetup{singlelinecheck=off}
  \caption[foo bar]{foo foo foo foo foo foo foo foo foo foo foo foo 
    foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo

    \textbullet \hspace{\labelsep}this listing belongs to the caption

    \textbullet \hspace{\labelsep}but looks as if it was part of the body
  }
\end{figure}

\end{document}

You can also set the content in a tabularx environment:

enter image description here

\documentclass{scrbook}

\usepackage{caption,tabularx}

\begin{document}

foo foo foo foo foo foo foo foo foo foo foo foo 
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo 
foo foo foo foo foo foo foo foo foo foo foo foo foo foo 

\begin{itemize}
  \item bar
\end{itemize}

\begin{figure}
  \captionsetup{singlelinecheck=off}
  \caption[foo bar]{foo foo foo foo foo foo foo foo foo foo foo foo 
    foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo

    \medskip

    \noindent
    \begin{tabularx}{\linewidth}{@{\phantom{\figurename~\thefigure:~}} l @{\hspace{\labelsep}} X @{}}
      \textbullet & this listing belongs to the caption \\
      \textbullet & but looks as if it was part of the body
    \end{tabularx}}
\end{figure}

\end{document}
2
  • Thanks for your great answer! I just realized that I wasn't paying attention to the details when asking my question: I am actually using the enumerate environment. (The figure contains numbered process steps I am describing).
    – Mace
    Jul 10, 2017 at 22:49
  • Of course, your second solution does the trick neatly for numbers instead of \textbullet. Perfect, many thanks!
    – Mace
    Jul 10, 2017 at 23:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .