正如我的标题所说,我希望我的 qed 符号比证明的最后一行低一行。默认情况下,它在同一行上,并向右对齐。
我怎样才能实现这个目标?
编辑:请参阅下面的代码作为示例:
\documentclass[11pt,a4paper]{article}
\usepackage[margin=3cm]{geometry}
\usepackage[english]{babel}
\usepackage{amsmath, amsthm}
\begin{document}
\begin{proof}
Hello there good chap! I'll put in another line here just to be sure its clear what I mean.
\end{proof}
\end{document}
答案1
在你的序言中添加以下几行:
\usepackage{etoolbox}
\patchcmd{\endproof}
{\popQED}
{\par\popQED}
{}
{}
通过这种方式,我们修补proof
环境(其结束部分)以在打印 qed 符号之前\endproof
发出。\par
完成 MWE:
\documentclass[11pt,a4paper]{article}
\usepackage[margin=3cm]{geometry}
\usepackage[english]{babel}
\usepackage{amsmath, amsthm}
\usepackage{etoolbox}
\patchcmd{\endproof}
{\popQED}
{\par\popQED}
{}
{}
\begin{document}
\begin{proof}
Hello there good chap! I'll put in another line here just to be sure its clear what I mean.
\end{proof}
\end{document}
输出:
答案2
不要这样做。大多数情况下,墓碑会不知从何而来。
\documentclass[a4paper]{article}
\usepackage{amsthm}
% lower the symbol and make it zero width
\renewcommand{\qedsymbol}{\raisebox{-\baselineskip}{\llap{\openbox}}}
\begin{document}
\begin{proof}
This is a proof that this setting is \emph{really bad}
\end{proof}
\end{document}
答案3
\par\nobreak
在设置“QED 段落”之前发出一个似乎足够了(没有经过彻底测试) :
\documentclass{article}
\usepackage{amsthm,amsmath,xpatch}
\newtheorem{theorem}{Theorem}
% \xpatchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\xpatchcmd{\qed}{\leavevmode}{\par\nobreak\leavevmode}{}{}
\begin{document}
\begin{proof}
\begin{equation}
f(x) = ax^2 + bx + c
\end{equation}
\end{proof}
\begin{proof}
\begin{equation}
f(x) = ax^2 + bx + c
\end{equation}
Some more text.
\end{proof}
\end{document}