特殊证明环境末尾的 QED 符号?

特殊证明环境末尾的 QED 符号?

这是一个后续问题:用 ntheorem 证明标题

但由于一个月没有见到原始回答者,所以我想向更广泛的人群询问。

如何在特殊定义的证明环境末尾添加 QED 符号:

\usepackage{ntheorem}
\makeatletter
\newtheoremstyle{MyNonumberplain}%
  {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
  {\item[\theorem@headerfont\hskip\labelsep ##3\theorem@separator]}
\makeatother
\theoremstyle{MyNonumberplain}
\theorembodyfont{\upshape}
\newtheorem{proof}{Proof}

答案1

您只需声明\qedsymbol 你声明proof环境。唯一可行的条件是:前面没有空行\end{proof}

话虽如此,我不明白为什么你要声明一个个人NoNumberPlain定理风格,它是已经定义的准确副本nonumberplain

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

\usepackage[svgnames]{xcolor}

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

\theoremstyle{plain}
\theoremheaderfont{\bfseries}
\theoremseparator{.}
\theorembodyfont{\itshape}
\newtheorem{thm}{Theorem}

\makeatletter
\newtheoremstyle{MyNonumberplain}%
  {\item[\theorem@headerfont\hskip\labelsep ##1\theorem@separator]}%
  {\item[\theorem@headerfont\hskip\labelsep##1{ }##3\theorem@separator]}
\makeatother

\theoremstyle{MyNonumberplain}
\theoremheaderfont{\itshape}
\theoremseparator{. ---}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\color{Gainsboro}\blacksquare}}
\newtheorem{proof}{Proof}

\begin{document}

\begin{thm}\label{th-a}
This theorem is awesome!
\end{thm}

\begin{proof}
Because I can change the position of qed mark correctly! Blahblah Blahblah Blahblah. 
\end{proof}

\begin{proof}[of \cref{th-a}]
This is a very important proof.
\begin{align*}
    a & = b\\ c & = d.
\end{align*}
\end{proof}

\end{document} 

在此处输入图片描述

相关内容