Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question is both on LaTeX and on mathematics writing style; I hope that's still apropriate here.

I have a proof that ends with a (right) numbered equation, and I'm pondering about where to put the QED symbol. The standard right margin position conflicts with the equation number, so what would be considered best style for the QED placement?

Secondly, I use the ntheorem package, but cannot place the QED symbol using \qedhere on this equation line. Is there a (simple) way to solve this?

share|improve this question
    
If equation numbers are on the right, I'd suggest never ending a proof with an equation as there's no sensible placement for the QED symbol. –  egreg Nov 2 '11 at 14:15
    
Have you checked out the question "End of theorem marker placement" (tex.stackexchange.com/questions/3799/…) and the answers that were provided? Also, have you tried loading the ntheorem package with the options amsmath and thmmarks -- as in \usepackage[amsmath,thmmarks]{ntheorem} -- to enable the automatic placement of end-of-theorem marks (and to improve compatibility with amsmath)? –  Mico Nov 2 '11 at 14:19
    
@Mico: Thanks for that link, but I don't see a solution there. I'm loading ntheorem with options including these. If I use an unnumbered equation, then the QED symbol is placed fine, with and without an explicit \qedhere. –  eldering Nov 2 '11 at 15:37
    
@eldering: Would you be able to provide an MWE that shows your current set up? Perhaps for a theorem with and without an ending equation. –  Werner Nov 3 '11 at 5:25
    
@Werner: see MWE in edited answer below. Note that my question is about the proof environment. –  eldering Nov 3 '11 at 13:34
add comment

2 Answers

up vote 4 down vote accepted

I have the following two suggestions:

  1. Reword your proof. Even if you merely state the obvious:

    ...
            x^n + y^n = z^n
    which completes the proof.
    

    or

    Proof. It follows trivially that for
            x^n + y^n = z^n
    there exist no solutions.
    
  2. Place the QED symbol manually next to the equation and correct for horizontal alignment with \phantom or use \rlap. Hopefully this is not something that has to be done frequently.

    enter image description here

    \documentclass[a4paper,11pt]{article}
    
    \usepackage{amsmath,amssymb}
    \usepackage[thmmarks,amsmath,amsthm,hyperref]{ntheorem}
    
    \newtheorem{theorem}{Theorem}[section]
    \begin{document}
    
    \begin{proof}
      foo.
    \end{proof}
    
    \begin{proof}
      It follows trivially that no solutions exist for
      \begin{equation*}\label{eq:fermat1}
        x^n + y^n = z^n.
        \refstepcounter{equation}
        \tag*{(\theequation)}
      \end{equation*}
    \end{proof}
    
    \begin{proof}
      It follows trivially that no solutions exist for
      \begin{equation}\label{eq:fermat2}
        x^n + y^n = z^n. \rlap{$\qquad \Box$}
      \end{equation}
    \end{proof}
    
    \end{document}
    
share|improve this answer
    
You can use \rlap{\qquad\qedsymbol} instead of \phantom on the other side. –  egreg Nov 3 '11 at 14:13
    
Ahhh, yes. Much simpler, thanks! –  Werner Nov 3 '11 at 14:16
    
Thanks: this confirms my ideas for possible solutions. The \rlap placement of the QED symbol is neat. –  eldering Nov 4 '11 at 20:56
add comment

The following (somewhat dirty) solution seems to work:

\documentclass[a4paper,11pt]{article}

\usepackage{amsmath}
\usepackage[thmmarks,amsmath,amsthm,hyperref]{ntheorem}

\newtheorem{theorem}{Theorem}[section]

\begin{document}

\begin{proof}
  foo.
\end{proof}

\begin{proof}
  It follows trivially that no solutions exist for
  \begin{equation*}\label{eq:fermat}
    x^n + y^n = z^n.
    \refstepcounter{equation}
    \tag*{(\theequation)}
  \end{equation*}
\end{proof}

\end{document}

It places the QED symbol right below the equation number, which is not as ugly as I had thought it would be.

I must acknowledge @egreg's comment, though, that it is not perfect from a stylistic point of view.

Edit: Now a full MWE, and I noticed that I had defined

\newcommand{\qedhere}{}

for backward compatibility with amsmath because ntheorem automatically places the QED symbol.

share|improve this answer
1  
Please post fully compilable examples including \documentclass and all the packages required, as opposed to code snippets. –  Peter Grill Nov 2 '11 at 16:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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