当我设计我的iff 证明如下,我收到此警告:
\qedhere 命令在这里可能无法正常工作
有没有办法修复这个警告,因为结果看起来不错,或者用另一种方式完成这种格式化?[编辑:我想让 qed-square 与第二个“Wohoo”处于相同的高度。]
这是一个小型的工作示例,可确保上述风格:
\documentclass[a4paper]{report}
\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}
\setdescription{font=\normalfont\itshape}
\begin{document}
\begin{proof}$ $\par
\begin{description}[topsep=0pt]
\item[\enquote{$\Rightarrow$}] This is one direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.
\item[\enquote{$\Leftarrow$}] This is the other direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.$\hfill\qedhere$
\end{description}
\end{proof}
Some follow up text. And more of it. And more of it. Let's make it two lines of follow up text for some reason.
\end{document}
谢谢!
答案1
您误用了\qedhere
。应该只是这样,而不是$\hfill\qedhere$
。
\documentclass[a4paper]{report}
\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}
\setdescription{font=\normalfont\itshape}
\begin{document}
\begin{proof}\mbox{}
\begin{itemize}[topsep=0pt]
\item[\enquote{$\Rightarrow$}] This is one direction of the proof.
It might include some formulas. Something along the lines
of $a^2+b^2=c^2$. Wohoo.
\item[\enquote{$\Leftarrow$}] This is the other direction of the proof.
It might include some formulas. Something along the lines of $a^2+b^2=c^2$.
Wohoo.\qedhere
\end{itemize}
\end{proof}
Some follow up text. And more of it. And more of it. Let's make it two
lines of follow up text for some reason.
\end{document}
顺便说一句,不要$ $\par
输入 ,而要输入\mbox{}
。我用itemize
,因为箭头周围的斜体引号太糟糕了。
我发现使用简单的段落而不是逐项证明是更好的风格。
\documentclass[a4paper]{report}
\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}
\begin{document}
\begin{proof}
\enquote{$\Rightarrow$} This is one direction of the proof.
It might include some formulas. Something along the lines
of $a^2+b^2=c^2$. Wohoo.
\enquote{$\Leftarrow$} This is the other direction of the proof.
It might include some formulas. Something along the lines of $a^2+b^2=c^2$.
Wohoo.
\end{proof}
Some follow up text. And more of it. And more of it. Let's make it two
lines of follow up text for some reason.
\end{document}
在我看来,同样清晰,甚至更好。
答案2
只需放置\qedhere
在proof
环境之后:
\documentclass[a4paper]{report}
\usepackage{mathtools}
\usepackage{csquotes}
\usepackage{amsthm}
\usepackage{enumitem}
\setdescription{font=\normalfont\itshape}
\begin{document}
\begin{proof}$ $\par
\begin{description}[topsep=0pt]
\item[\enquote{$\Rightarrow$}] This is one direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.
\item[\enquote{$\Leftarrow$}] This is the other direction of the proof. It might include some formulas. Something along the lines of $a^2+b^2=c^2$. Wohoo.
\end{description}
\end{proof}
$\hfill\qedhere$
Some follow up text. And more of it. And more of it. Let’s make it two lines of follow up text for some reason.
\end{document}
如果你不想\qed
每次使用proof
环境时都放置它,你可以在序言中重新定义它:
\let\Oldproof\proof
\renewenvironment{proof}{\begin{Oldproof}}{\end{Oldproof}$\hfill\qed$}
答案3
另外,一定要使用\[...\]
而不是$$...$$
。我发现过这样一种情况,即使amsthm
在 之后正确加载了包amsmath
,仍然会出现可能无法正常工作的警告\qedhere
(它看起来很好),而更改 display math 命令会删除它,原因我不知道。