7

I was wondering how one can place the QED symbol at the end of an equation when using the IEEEproof environment?

With the standard proof environment of amsthm this is done by simply placing \qedhere at the end of the equation, for example:

\begin{equation}
     x = y+z \qedhere
\end{equation}

But the same code does not work when we change the environment to IEEEproof. In this case the QED symbol will be placed at the end of next line.

  • amsmath does not provide a proof environment; that is provided by amsthm. the mechanism for qedhere is rather complicated, and depends on coordination between amsthm and amsmath. it is probably possible to patch IEEEproof to enable \qedhere to work, but without access to ieeetran.cls (it's not on ctan), i'll leave that to someone else. – barbara beeton Sep 24 '13 at 16:21
  • Thanks for your comment. I will correct my question. Indeed, I thought there should be something similar to \qedhere also in ieeetran.cls. – Mani Bastani Parizi Sep 25 '13 at 12:05
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – user36296 May 22 '17 at 8:50
5

The IEEEtran documentclass does have its own versions of \qedhere namely \IEEEQEDhereeqn for use in equations and \IEEEQEDhere for eqnarray and other enviroments, e.g. lists (thank you to Aditya for noting the latter). Here is a demonstration:

Sample output

\documentclass{IEEEtran}

\newtheorem{theorem}{Theorem}

\begin{document}
\begin{theorem}
  Ordinary case.
\end{theorem}

\begin{IEEEproof}
  That's it!
\end{IEEEproof}

\begin{theorem}
  A statement.
\end{theorem}

\begin{IEEEproof}
  We see
  \begin{equation}
    x=y \IEEEQEDhereeqn\quad
  \end{equation}
\end{IEEEproof}

\begin{theorem}
  Another statement.
\end{theorem}

\begin{IEEEproof}
  We consider the following points:
  \begin{enumerate}
  \item assumptions,
  \item implications. \hspace{1em plus 1fill}\IEEEQEDhere
  \end{enumerate}
\end{IEEEproof}

\begin{theorem}
  Final statement.
\end{theorem}

\begin{IEEEproof}
  We compute
  \begin{IEEEeqnarray}{rCl}
    1 + 2 & = & 2 + 1 \IEEEnonumber\\
    & = & 3.
    \qquad\IEEEQEDhere
  \end{IEEEeqnarray}
\end{IEEEproof}

\begin{IEEEproof}[Alternative proof.]
  We compute
  \begin{equation}
    \begin{IEEEeqnarraybox}{rCl}
    1 + 2 & = & 2 + 1 \\
    & = & 3.
  \end{IEEEeqnarraybox}
  \IEEEQEDhereeqn\quad
\end{equation}
\end{IEEEproof}

\end{document}

Note the spacing. For the equation version you need add some space afterwards otherwise it will be right up against the equation number. I have chose \quad but another possibility is \. In the other cases you see that \IEEEQEDhere does not place the symbol at the right-hand margin without help. I have shown how to this in an enumerate. For the IEEEeqnarray it is does not seem to be possible, but I give a work around, placing it inside an equation, in the case when you only want one equation number.

  • IEEEQEDhere is meant to manually place the QED symbol if a proof ends with an enumeration, etc. – Aditya Aug 16 '16 at 12:26
  • 1
    @Aditya Many thanks - I have now substantially updated my answer. – Andrew Swann Aug 16 '16 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.