When a proof ends with a formula in equation
or equation*
environment, putting \qedhere
after the equation would cause the QED symbol to appear in the right place. I.e. at the end of the line in which the equation appears. For example:
\begin{equation}
x = y+z \qedhere
\end{equation}
However, I cannot get the same result when the formula is inside an align
/align*
environment using the same method:
\begin{align}
x &= a+b \\
&= y+z \qedhere
\end{align}
The square appears just after (y+z) and is not shifted to the right boundary of the page.
Here is a MWE:
\documentclass[a4paper]{article}
\usepackage{hyperref}
\usepackage{amsthm}
\usepackage[cmex10]{amsmath}
\interdisplaylinepenalty=2500
\usepackage{amssymb}
\title{Example to Show QED is Misplaced}
\author{}
\begin{document}
\begin{proof}
This proof is typeset correctly:
\begin{equation*}
x = y + z \qedhere
\end{equation*}
\end{proof}
\begin{proof}
But this one not!
\begin{align*}
x & = u + v \\
& = y + z \qedhere
\end{align*}
\end{proof}
\end{document}
ntheorem
might also be worth a lookcmex10
option toamsmath
may be needed only with very old TeX installations; don't use it unless you get aMath formula deleted
error. In this case, first try updating your TeX distribution.