证明环境的变化

证明环境的变化

有人能告诉我如何在最后一行是居中的数学公式的情况下在证明末尾放置一个方框吗?谢谢。示例如下。

\begin{proposition} 
 blah blah
\end{proposition}
\begin{proof} Since something is true, we have 
\begin{center}
$A = B$.
\end{center}
\end{proof}

我已经在上述情况下找到了答案。但是当我想在数组情况下使用它时,还有另一个问题。在这种情况下,qedsymbol 不会向右对齐。

\begin{proposition} 
 blah blah
\end{proposition}
\begin{proof} Since something is true, we have 
\[\begin{array}{cc}
 a&b\\c&d\qedhere
\end{array}\]
\end{proof}

答案1

我假设您正在加载该amsthm包,因为您使用了一个名为的环境proof。加载此包后,以下代码将在 display-math 环境的末尾为您提供 QED 符号(例如,一个空心方块);请注意,宏\qedhere必须是 display-math 环境的最后一项。

在此处输入图片描述

\documentclass{article}
\usepackage{amsthm}
\begin{document}
\begin{proof} Since something is true, we have 
\[
\begin{array}{cc}
  a&b\\
  c&d
\end{array} \qedhere
\] 
\end{proof}
\end{document}

答案2

automatic我认为,定理中结束标记放置的最佳解决方案是ntheorem使用包。以下是示例:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{heuristica}

 \usepackage{amsmath}
\usepackage[thmmarks, amsmath, thref]{ntheorem}
\usepackage{cleveref}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
 \makeatletter
\newtheoremstyle{proof}%
  {\item[\hskip\labelsep\theorem@headerfont\MakeUppercase ##1\theorem@separator]}%
  {\item[\hskip \labelsep\theorem@headerfont\MakeUppercase ##1\ ##3\theorem@separator]}
\makeatother
\theoremstyle{proof}
\theorembodyfont{\normalfont}
\theoremseparator{:}
\theoremsymbol{\ensuremath{\square}}
\newtheorem{proof}{Proof}

\begin{document}
\setcounter{section}{2}
\begin{theorem}[Some theorem]\label{thm:some-theorem}
This is an important theorem.
\end{theorem}

\begin{proof}
This is a very important proof.
\end{proof}

\begin{proof}[of theorem Some theorem]
This is a very important proof.
\end{proof}

\begin{proof}[of \Cref{thm:some-theorem}]
This is a very important proof.
\begin{align*}
    a & = b\\ c & = d.
\end{align*}
\end{proof}

\end{document} 

在此处输入图片描述

相关内容