如何將兩個(或多個)QED 符號放在一行上

如何將兩個(或多個)QED 符號放在一行上

假設一個定理的證明包含一個主張及其證明,而該主張的證明完成了該定理的證明。也就是說,在權利要求的證明結束之後,在定理的證明中不需要進一步的文本。例如:

\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\newtheorem{claim}{Claim}
\begin{document}

\begin{theorem}
Today is Thursday.

\begin{proof}
We know that the day after Wednesday is always Thursday.
Thus the theorem follows from the following claim:

\begin{claim}
Yesterday was Wednesday.

\begin{proof}
My computer said so.
\end{proof}
\end{claim}
\end{proof}
\end{theorem}
\end{document}

預設情況下,第二個 QED 符號放置在第一個 QED 符號下方一行,即使該行上沒有文字。將兩個 QED 符號放在同一行並相鄰放置似乎更自然,以表明兩個(嵌套)證明都在該點得出結論。我們怎樣才能做到這一點?我嘗試過插入\qedhere命令,但似乎沒有幫助。

答案1

雙倍\qedsymbol

在序言中,

\let\oldqedbox\qedsymbol
\newcommand{\twoqedbox}{\oldqedbox\oldqedbox}

然後,在第一個之前\end{proof},插入

\renewcommand{\qedsymbol}{\twoqedbox}

在第二個之前\end{proof}插入

\renewcommand{\qedsymbol}{}

「更新」\qedsymbol不會持續下去。

amsthm不是為處理嵌套證明而設計的;它們非常罕見。

答案2

您可以偽造證明環境。

\begin{theorem}
Today is Thursday.
\end{theorem}  % moved to here

\begin{proof}
We know that the day after Wednesday is always Thursday.
Thus the theorem follows from the following claim:
\begin{claim}
Yesterday was Wednesday.
\end{claim}
\noindent\textit{\proofname.} My computer said so.\qedhere\qedsymbol
\end{proof}

在此輸入影像描述

相關內容