0

I have a figure at the end of a proof environment (see MWE below). I would like to have the QED symbol that ends the proof on the same line of the figure caption. Placing \qedhere after or inside \caption did not do it. Any suggestion is appreciated.

Thanks.

\documentclass{article}
\usepackage{amsthm,amssymb}
\usepackage{lipsum}

\renewcommand{\qedsymbol}{$\blacksquare$}

\begin{document}
    \begin{proof}
        \lipsum[1]
        \begin{figure}[h]
            \centering
            %\includegraphics{...}
            \caption{Figure caption.} \qedhere
        \end{figure}
    \end{proof} 
\end{document}

enter image description here

1
  • 3
    A figure is a float, and it may not go where you input it. Using \inputgraphic and \captionof is much more reliable in this department. Even so, \qedhere isn't going to work by itself, but a negative \vspace` before the \end{proof} should work. I'm sure this has been asked before, but I can't find it at the moment. Aug 30 at 0:02

1 Answer 1

1

To illustrate Beeton's comment:

Note that the caption package adds an additonal \dp\strutbox to the bottom baseline.

\documentclass{article}
\usepackage{amsthm,amssymb}
%\usepackage{caption}
\usepackage{capt-of}
\usepackage{lipsum}

\renewcommand{\qedsymbol}{$\blacksquare$}

\begin{document}
    \begin{proof}
        \lipsum[1]
        \begin{minipage}[b]{0.9\textwidth}
            \centering
            %\includegraphics{...}
            \captionof{figure}{Figure caption.}%\vspace{-\dp\strutbox}
        \end{minipage}%\llap{\rule{0.9\textwidth}{0.5pt}}% show baseline
    \end{proof} 
\end{document}
2
  • Thanks, @JohnKormylo, for the answer. The only thing is that the figure is not centered as within the figure environment. I am wondering if there is any solution to fix that.
    – AEW
    Aug 30 at 17:46
  • @AEW - One should also center the minipage, since I had to leave extra room for the QED. Aug 30 at 19:24

You must log in to answer this question.

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