4

I'm using the package outlines. Within a bullet point I want to include a figure. However, the caption goes outside the margin of the bullet point. This looks not so nice (see attached image).

I'm not really sure what is the appropriate fix. Maybe for the caption to have the same width as the current bullet point I am on, or maybe that's too messy. Grateful for some advice.

An example.

\documentclass{article}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{graphicx}
\usepackage{outlines}
\usepackage{float}

\begin{document}
\begin{outline}
\1 Here's some text.
\2 Here's some more text.
\begin{figure}[H]
        \centering
        \includegraphics[width=0.5\linewidth]{KflFG.png}
        \caption{Curves in blue and in green are sequences $(\beta_n)$ and $(\alpha_n)$, they converge to $\beta$ and $\alpha$ respectively. Curve in red is equation $(25)$.}
        \label{fig:thm1}
\end{figure}
\end{outline}
\end{document}

2 Answers 2

5

I'm not really sure what is the appropriate fix. Maybe for the caption to have the same width as the current bullet point I am on,

In general, how might your readers know what the width of the "current bullet point" is supposed to be?

I think you can't go far wrong if you set the caption's width to that of the associated graphic. To achieve this outcome, you could embed the \includegraphics and \caption directives in a minipage environment with a width of 0.5\linewidth.

enter image description here

\documentclass[draft]{article} % remove 'draft' option in real document
\usepackage{amsmath,amsthm,amssymb}
\usepackage{graphicx} % for '\includegraphics' command
\usepackage{outlines}
\usepackage{float} % for 'H' positioning specifier

\begin{document}
\begin{outline}
\1 Here's some text.
\2 Here's some more text.
\begin{figure}[H]
        \centering
        \begin{minipage}{0.5\linewidth}
        \includegraphics[width=\linewidth]{KflFG.png}
        \caption{Curves in blue and in green are sequences $(\beta_n)$ and $(\alpha_n)$, they converge to $\beta$ and $\alpha$ respectively. Curve in red is equation $(25)$.}
        \label{fig:thm1}
        \end{minipage}
\end{figure}
\end{outline}
\end{document}
4

The current indentation for text in a list is given by \@totalleftmargin, although it is not passed to a figure. The bullet itself depends on several additonal values (see figure 1 in the enumitem manual).

\documentclass[draft]{article} % remove 'draft' option in real document
\usepackage{amsmath,amsthm,amssymb}
\usepackage{graphicx} % for '\includegraphics' command
\usepackage{outlines}
\usepackage{float}
\usepackage{showframe}
\newlength{\offset}

\begin{document}
\begin{outline}
\1 Here's some text.
\2 Here's some more text.
  \setlength{\offset}{\csname @totalleftmargin\endcsname}%
\begin{figure}[H]
        \hspace*{\offset}%
        \begin{minipage}{\dimexpr \textwidth-\offset}
        \includegraphics[width=\linewidth]{KflFG.png}
        \caption{Curves in blue and in green are sequences $(\beta_n)$ and $(\alpha_n)$, they converge to $\beta$ and $\alpha$ respectively. Curve in red is equation $(25)$.}
        \label{fig:thm1}
        \end{minipage}
\end{figure}
\end{outline}
\end{document}

Of course a better solution is to not use figure [H] at all (friends don't let friends use H).

\documentclass[draft]{article} % remove 'draft' option in real document
\usepackage{amsmath,amsthm,amssymb}
\usepackage{graphicx} % for '\includegraphics' command
\usepackage{outlines}
\usepackage{capt-of}
\usepackage{showframe}

\begin{document}
\begin{outline}
\1 Here's some text.
\2 Here's some more text.\par
    \begin{minipage}{\linewidth}
        \includegraphics[width=\linewidth]{KflFG.png}
        \captionof{figure}{Curves in blue and in green are sequences $(\beta_n)$ and $(\alpha_n)$, they converge to $\beta$ and $\alpha$ respectively. Curve in red is equation $(25)$.}
        \label{fig:thm1}
    \end{minipage}
\end{outline}
\end{document}
2
  • +1. In the second solution (which is definitely easier and more straightforward than the first), you may want to change Here's some more text.\par to Here's some more text.\par\medskip or even Here's some more text.\par\bigskip, in order to allow for some visual "breathing space" to the graphic.
    – Mico
    Commented Aug 9 at 10:18
  • 1
    @mico - \vskip\intextsep would be technically accureate, assuming you want a gap. Commented Aug 9 at 14:52

You must log in to answer this question.

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