1

I tried but I don't know how to put an image beside a proof like this enter image description here

Edit: Please don't worry about the mathematics and the shape of the figure. My question is; How can I put a "proof"(\begin{proof}) and a figure side by side. You may use this one

enter image description here

  • 3
    Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – darthbith Nov 10 '15 at 18:00
  • \marginpar{...\captionof{figure}{...}} in conjunction with the package caption. – Henri Menke Nov 10 '15 at 19:17
  • Did you try to use wrapfigure? – Anton Petrunin Nov 10 '15 at 20:37
  • 1
    Or minipages with \captionof if it shouldn't go in the margin but take space from the body text. – cfr Nov 11 '15 at 2:44
  • @AntonPetrunin proof is probably defined as a list which means you cannot use wrapfigure anywhere near it, let alone alongside it. – cfr Nov 11 '15 at 2:47
3

I have found this solution (without claiming to be complete):

\documentclass{article}

\usepackage[demo]{graphicx}
\usepackage{wrapfig}

\usepackage{amsthm}
    \newtheorem{theorem}{Theorem}

\makeatletter
    \renewenvironment{proof}[3][\proofname]{\par
        \pushQED{\qed}%
        \normalfont \topsep6\p@\@plus6\p@\relax
        {\noindent\textit{#1}\@addpunct{.}\hspace{\the\labelsep}}%
        \begin{wrapfigure}{r}{.5\textwidth}
            \centering
            #2
            \caption{#3}
        \end{wrapfigure}%
        \ignorespaces
    }{%
        \popQED\@endpefalse
        \par
        \vspace*{\the\parsep}
    }
\makeatother

\begin{document}

\begin{theorem}
This is a theorem. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit.
\end{theorem}

\begin{proof}{\includegraphics{}}{This is caption.\label{fig:1}}
This is a proof. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit.
Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit. Lorem ipsum dolor sit amet, consecteruer adipiscing elit.
\end{proof}


This is figure~\ref{fig:1}.

\end{document}

enter image description here


This is only a point of departure because I am sure that there are more elegant solutions to your question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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