当最后一句话是等式时,我需要将 QED 符号正确放置在证明环境中,因为在这种情况下空白看起来太大。
这个帖子建议使用 \belowdisplayskip 和 \abovedisplayskip 这两个不错的选项,我现在正在使用它们,但后来我发现了一些异常(见下文)。有什么建议可以解决它吗?
\documentclass{article}
\usepackage{amsthm}
\begin{document}
\begin{proof}
Case 1: default:
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\end{proof}
\begin{proof}
Case 2: \verb|\abovedisplayskip=0pt\belowdisplayskip=0pt|:
\begingroup \abovedisplayskip=0pt\belowdisplayskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
\begin{proof}
Case 3: \verb|\belowdisplayskip=-\baselineskip|:
\begingroup \belowdisplayskip=-\baselineskip
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
\begin{proof}
Case 4:
\begingroup \belowdisplayskip=-\baselineskip
\[a_1 = a_2\]
\endgroup
\end{proof}
\textbf{Remark}. Cases 3 and 4 have \textit{the same option} (\verb|\belowdisplayskip=-\baselineskip|), but QED position is lower in Case 4. It looks like \verb|\belowdisplayskip| and \verb|\abovedisplayskip| are completely ignored when the length of the text "Case 4" is too short.
\begin{proof}
Case 5: a longer text here and this becomes the same case as Case 3.
\begingroup \belowdisplayskip=-\baselineskip
\[a_1 = a_2\]
\endgroup
\end{proof}
But the story doesn't end here; we have another anomaly when we use more than one equation inside proof environment.
\begin{proof}
Case 6: options \verb|\belowdisplayskip| and \verb|\abovedisplayskip| work for the first equation only (and the length of this text doesn't matter).
\begingroup \abovedisplayskip=0pt\belowdisplayskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
tx
\begingroup \abovedisplayskip=0pt\belowdisplayskip=-\baselineskip
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
In case 6 the options \verb|\belowdisplayskip| and \verb|\abovedisplayskip| for the second equation don't work unless it's a longer text than "tx" (Case 7):
\begin{proof}
Case 7: options \verb|\belowdisplayskip| and \verb|\abovedisplayskip| work for the first equation only (and the length of this text doesn't matter).
\begingroup \abovedisplayskip=0pt\belowdisplayskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
txt
\begingroup \abovedisplayskip=0pt\belowdisplayskip=-\baselineskip
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
But if the last equation is too short then it stops working:
\begin{proof}
Case 8:
\begingroup \abovedisplayskip=0pt\belowdisplayskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
Second equation is short:
\begingroup \abovedisplayskip=0pt\belowdisplayskip=-\baselineskip
\[a_1 = a_2\]
\endgroup
\end{proof}
\begin{proof}
Case 9:
\begingroup \abovedisplayskip=0pt\belowdisplayskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
But with long enough text here it starts working again:
\begingroup \abovedisplayskip=0pt\belowdisplayskip=-\baselineskip
\[a_1 = a_2\]
\endgroup
\end{proof}
\end{document}
答案1
你失踪了\belowdisplayshortskip
\documentclass{article}
\usepackage{amsthm}
\begin{document}
\begin{proof}
Case 1: default:
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\end{proof}
\begin{proof}
Case 2: \verb|\abovedisplayskip=0pt\belowdisplayskip=0pt|:
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
\begin{proof}
Case 3: \verb|\belowdisplayskip=-\baselineskip|:
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
\begin{proof}
Case 4:
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2\]
\endgroup
\end{proof}
\textbf{Remark}. Cases 3 and 4 have \textit{the same option} (\verb|\belowdisplayskip=-\baselineskip|), but QED position is lower in Case 4. It looks like \verb|\belowdisplayskip| and \verb|\abovedisplayskip| are completely ignored when the length of the text "Case 4" is too short.
\begin{proof}
Case 5: a longer text here and this becomes the same case as Case 3.
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2\]
\endgroup
\end{proof}
But the story doesn't end here; we have another anomaly when we use more than one equation inside proof environment.
\begin{proof}
Case 6: options \verb|\belowdisplayskip| and \verb|\abovedisplayskip| work for the first equation only (and the length of this text doesn't matter).
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
tx
\begingroup \abovedisplayskip=0pt\belowdisplayskip=-\baselineskip
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
In case 6 the options \verb|\belowdisplayskip| and \verb|\abovedisplayskip| for the second equation don't work unless it's a longer text than "tx" (Case 7):
\begin{proof}
Case 7: options \verb|\belowdisplayskip| and \verb|\abovedisplayskip| work for the first equation only (and the length of this text doesn't matter).
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
txt
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
\end{proof}
But if the last equation is too short then it stops working:
\begin{proof}
Case 8:
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
Second equation is short:
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2\]
\endgroup
\end{proof}
\begin{proof}
Case 9:
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2 = a_3 = a_4 = a_5 = a_6 = a_7 = a_9 = a_{10} = a_{11} = a_{12} = a_{13}\]
\endgroup
But with long enough text here it starts working again:
\begingroup \belowdisplayskip=0pt\belowdisplayshortskip=0pt
\[a_1 = a_2\]
\endgroup
\end{proof}
\end{document}