# Move QED symbol to the left, i.e. at the end of the sentence

I want to make the qed symbol at the end of a proof appear at the end of the last sentence, not at the far right of the same line.

Would like to do this the simplest way possible.

All I can find online is people using \qedhere to fix the symbol being on the wrong line.

-
Do you want this just for a single proof? –  Gonzalo Medina Oct 6 '12 at 17:22
no, but the single case would be sufficient, I can copy/paste for others. I don't really want to create a new environment or change the existing one because i'll forget what to do if I reformat laptop. –  john w. Oct 6 '12 at 17:34

You can redefine it to simply (Thanks to @egreg who pointed out the need for \unskip\nobreak)

\renewcommand{\qed}{\unskip\nobreak\quad\qedsymbol}%


Here's a (not so minimal) MWE:

\documentclass{article}
\usepackage{amsmath,amsthm}

\begin{document}

\begin{proof} A Simple Proof
Here is my proof
\end{proof}

\begin{proof} A Long Proof
Here is my very long proof that involves a lot of computation and stretches quite far to the margin.
\end{proof}

\begin{proof} A Proof with Equations (\verb!equation! environment)
Here is my proof:

$$x = a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + a_4}}}$$
\end{proof}

\begin{proof} A Proof with Equations (\verb!equation! environment) and \verb!\qedhere!
Here is my proof:

$$x = a_0 + \cfrac{1}{a_1 + \cfrac{1}{a_2 + \cfrac{1}{a_3 + a_4}}}$$  \qedhere

\end{proof}

\begin{proof} A Proof with aligned equations (\verb!align! environment)
\begin{align}
\intertext{If}
A &= \sigma_1+\sigma_2\\
B &= \rho_1+\rho_2\\
\intertext{then}
C(x) &= e^{Ax^2+\pi}+B
\end{align}
\end{proof}

\begin{proof} A Proof with aligned equations (\verb!align! environment) and \verb!\qedhere!
\begin{align}
\intertext{If}
A &= \sigma_1+\sigma_2\\
B &= \rho_1+\rho_2\\
\intertext{then}
C(x) &= e^{Ax^2+\pi}+B\qedhere
\end{align}
\end{proof}

\end{document}


## ISSUES

If your proof has equations, you should use \qedhere to avoid that the symbol goes to the next line (as @egreg suggested, it's not a good idea to add \qedhere to all equation environments)

-
Thanks. Exactly what I wanted. –  john w. Oct 6 '12 at 17:49
That redefinition of \qed can lead to perhaps an unwanted "dangling qed symbol" by itself on a new line if the last line of the proof itself is too long. For example, in the MWE replace Here is my proof with Here is my very long proof that involves a lot of computation and stretches quite far to the margin. –  murray Oct 7 '12 at 15:50
And this also breaks the logic crafted in the amsthm package for placing the tombstone symbol when the last line of the proof is a displayed equation (the symbol gets placed on the next line). Of course, one can always re-write the proof so that the last line is prose... –  Willie Wong Oct 8 '12 at 8:40
You're at least missing \unskip and \nobreak: \renewcommand{\qed}{\unskip\nobreak\quad\qedsymbol}. Otherwise it may result in a lonely tombstone symbol at the beginning of a line. –  egreg Oct 8 '12 at 13:30
I don't think it's a good idea to add \qedhere to all equation environments: \qedhere should be added where needed. With your code, if you have an equation environments in a single proof, it will be marked, independently of it being at the end of the proof; if there are two, the first one will be marked. Please, remove that part. –  egreg Oct 8 '12 at 14:52