如何在段落末尾添加 \square(或其他任何内容)并将其右对齐,就像它是证明的结尾一样(开头没有 \begin{proof})。我不想在开头看到“证明”。
同时,我只需要进行局部/临时更改。我不想更改开头的“proof”环境。我仍然希望在其他地方正常使用 \begin{proof}
答案1
您只需\qed
在段落末尾进行声明,这基本上是\end{proof}
自动执行的操作(带有一些您不需要的花哨功能)。
\documentclass{article}
\usepackage{amsthm}
\begin{document}
A paragraph with a QED symbol at the far end. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines.\qed
\end{document}
您可以本地更改 QED 符号。我建议为您想要的任务使用特殊命令(三角形而不是正方形)。
\documentclass{article}
\usepackage{amsthm}
\newcommand{\triangleqed}{%
\begingroup
\renewcommand{\qedsymbol}{\ensuremath{\triangle}}%
\qed
\endgroup
}
\begin{document}
A paragraph with a QED symbol at the far end. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines.\qed
A paragraph with a QED symbol at the far end. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines.\triangleqed
A paragraph with a QED symbol at the far end. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines. Let's go on with
nonsense words just to get a few lines.\qed
\end{document}