I already had issues (described here: amsmath package error using SIAM LaTeX template files) with the newest version of SIAM LaTeX template from http://www.siam.org/journals/auth-info.php
For now, I would like to clarify why the position of QED symbol in the proof environment depends on the equation environment type. Using example from manual with \begin{displaymath}\end{displaymath}
:
\begin{corollary}
Let $f(x)$ be continuous and differentiable everywhere. If $f(x)$
has at least two roots, then $f’(x)$ must have at least one root.
\end{corollary}
\begin{proof}
Let $a$ and $b$ be two distinct roots of $f$.
By \cref{thm:mvt}, there exists a number $c$ such that
\begin{displaymath}
f’(c) = \frac{f(b)-f(a)}{b-a} = \frac{0-0}{b-a} = 0.
\end{displaymath}
\end{proof}
puts QED symbol at the right position (end of the equation).
However, using $$ $$
QED symbol is completely absent from the proof environment:
\begin{corollary}
Let $f(x)$ be continuous and differentiable everywhere. If $f(x)$
has at least two roots, then $f’(x)$ must have at least one root.
\end{corollary}
\begin{proof}
Let $a$ and $b$ be two distinct roots of $f$.
By \cref{thm:mvt}, there exists a number $c$ such that
$$
f’(c) = \frac{f(b)-f(a)}{b-a} = \frac{0-0}{b-a} = 0.
$$
\end{proof}
Finally, using \begin{equation*}\end{equation*}
puts QED symbol in a wrong position, i.e., above the equation.
\begin{corollary}
Let $f(x)$ be continuous and differentiable everywhere. If $f(x)$
has at least two roots, then $f’(x)$ must have at least one root.
\end{corollary}
\begin{proof}
Let $a$ and $b$ be two distinct roots of $f$.
By \cref{thm:mvt}, there exists a number $c$ such that
\begin{equation*}
f’(c) = \frac{f(b)-f(a)}{b-a} = \frac{0-0}{b-a} = 0.
\end{equation*}
\end{proof}
My questions are following:
-
Is this behavior typical for any proof environment containing math equations and adding the QED symbol at the end of it; or this another 'bug' in SIAM template file?
-
What is the correct way to type in proof environment math equations?
Previously I have used most often\begin{equation*}\end{equation*}
, but here it produces the wrong behavior.
Best Answer
First of all, never ever use
$$...$$
in LaTeX: you have discovered another reason why, but please have a look at Why is \[ ... \] preferable to $$ ... $$?Second, it's another feature of
ntheorem
with thethmmarks
option, that modifies some environments but not all in order to provide automatic placement of the tombstone.In particular
equation*
doesn't get redefined, so it's not in line with the automatic placement. You can make it compatible by redefining it.However,
equation
will not push the QED in the same position asequation*
(I deem wrong the placement inequation*
, but apparently this pleases the author ofntheorem
).