7

One of the proofs in my paper ends with a multi-line equation. Unfortunately, when I put the QED sign at the end via the \qedhere command, it does not end up at the end of the line like the other QED signs (it also throws a warning that \qedhere may not work correctly). The difference is not big, but it's kind of annoying. How to make it right?

EDIT: now I see that a similar question has already been asked, but that was five years ago (and the suggested workaround does not seem to work). Has nothing changed?

MWE:

\documentclass{amsart}

\begin{document}
    \begin{proof}
        This is the first proof.
    \end{proof}

    \begin{proof}
        This is another proof.
        \begin{multline}
            6\cdot 9=\\
            42\qedhere
        \end{multline}
    \end{proof}
\end{document}

enter image description here

tomasz
  • 825
  • I'm afraid this is a known bug of amsthm. – egreg Jun 01 '18 at 13:33
  • @egreg: I see. Still, maybe one can work around it? – tomasz Jun 01 '18 at 13:39
  • Strangely, your code doesn't have this problem on my system. – Bernard Jun 01 '18 at 14:19
  • @Bernard: well, on my system the result is this: https://imgur.com/a/8AzSgYv – tomasz Jun 01 '18 at 14:29
  • @tomasz -- i've taken the liberty of adding the image. – barbara beeton Jun 01 '18 at 14:45
  • Oh! see. I thought you meant the vertical alignment. I also have this shift. However, with ntheorem (and the article class), everything is fine – and I don't have to type \qedhere. – Bernard Jun 01 '18 at 14:57
  • @Bernard: Interesting. Unfortunately, adding '\usepackage[amsmath,amsthm]{ntheorem}' to the preamble of my actual document (documentclass book) results in a boatload of errors. – tomasz Jun 01 '18 at 15:09
  • Even without the amsthm option? – Bernard Jun 01 '18 at 15:13
  • @Bernard: even without it. – tomasz Jun 01 '18 at 18:09
  • There's probably some thing in your code that is incompatible with ntheorem, such as also loading amsthm. Can you compile the very code you posted (just modified to use ntheorem)? – Bernard Jun 01 '18 at 18:17
  • @Bernard: I don't really know how to use ntheorem. The main issue seems to be that ntheorem does not know the proof environment, and it tries to redefine theoremstyle plain from amsthm (or vice versa). – tomasz Jun 01 '18 at 19:00
  • If you load it with the [amsmath, thmmarks, standard] options it defines a proof environment (and lemma, theorem, definition &c.). If you don't like the details of the layout, it's easy to customise. – Bernard Jun 01 '18 at 19:15

1 Answers1

7

this isn't ideal, but if you're willing to put up with the vertically centered equation number and qed box, and the narrowed alignment of the display math, it at least doesn't complain.

\documentclass{amsart}
\usepackage{mathtools}

\begin{document}
    \begin{proof}
        This is the first proof.
    \end{proof}

    \begin{proof}
        This is another proof.
        \begin{equation}
        \begin{multlined}
            6\cdot 9=\\
            42
        \end{multlined}
        \qedhere
    \end{equation}
    \end{proof}
\end{document}

enter image description here

  • I don't really care about the equation number (I don't really do numbered equations in the first place). The fact that the qed box is centered is a bit annoying, but better than having it horizontally misaligned. While indeed not perfect, this seems good enough. Thanks! – tomasz Jun 01 '18 at 14:08