13

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?

5
  • 2
    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
    Commented Nov 2, 2011 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
    Commented Nov 2, 2011 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. Commented Nov 2, 2011 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
    Commented Nov 3, 2011 at 5:25
  • @Werner: see MWE in edited answer below. Note that my question is about the proof environment. Commented Nov 3, 2011 at 13:34

2 Answers 2

7

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}
    
2
  • You can use \rlap{\qquad\qedsymbol} instead of \phantom on the other side.
    – egreg
    Commented Nov 3, 2011 at 14:13
  • 1
    Thanks: this confirms my ideas for possible solutions. The \rlap placement of the QED symbol is neat. Commented Nov 4, 2011 at 20:56
1

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.

1
  • 1
    Please post fully compilable examples including \documentclass and all the packages required, as opposed to code snippets. Commented Nov 2, 2011 at 16:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .