如何将图像放在证明的右侧?

如何将图像放在证明的右侧?

我试过了,但我不知道如何把图片放在这样的证明旁边 在此处输入图片描述

编辑:请不要担心数学和图形的形状。我的问题是:如何将“证明”(\begin{proof}) 和图形并排放置。您可以使用这个

在此处输入图片描述

答案1

我找到了这个解决方案(但不声称是完整的):

\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}

在此处输入图片描述


这只是一个出发点,因为我确信您的问题有更优雅的解决方案。

相关内容