I'm using the proof environment from the amsthm package. In some cases, the last line of a proof falls at the end of a page, but the QED symbol (the little white box) ends up on the following page.

Is there any way to guarantee that in each instance of \begin{proof} ... \end{proof} in my document, the QED symbol will always be on the same page as the last line of the proof?

Here is an MWE which demonstrates this problem:





This is the concluding line of the proof.


This line is on the second page, below the QED symbol.

  • 7
    An example? Does the proof end with a list environment or a displayed equation? In that case check for \qedhere in the documentation of amsthm
    – egreg
    Commented Apr 13, 2012 at 14:26
  • 2
    How full is this last line? If it spans the entire \textwidth, you may have to restructure the sentence in order to leave room for the QED symbol to fit on the same line.
    – Werner
    Commented Apr 13, 2012 at 15:29
  • 1
    @Werner I believe that it should be possible to use widow penalty to solve it in that case. @jamaicanworm: Could you please try adding \widowpenalty=10000 at the very end of the last paragraph of your proof? I'm really not sure whether it can help and I can't test it now.
    – yo'
    Commented Apr 13, 2012 at 16:43
  • Thank you for your comments. I edited the question to include an MWE which demonstrates the problem. (Adding \widowpenalty as @tohecz suggested unfortunately does not help.) Commented Apr 13, 2012 at 18:20
  • 4
    @jamaicanworm: Removing the blank line before the end of your proof environment. If you want to keep this for readability purposes, then use a % in the blank line.
    – Werner
    Commented Apr 13, 2012 at 18:24

2 Answers 2


If you remove the blank line between This is the concluding line of the proof. and the \end{proof}, the problem disappears.

  • 1
    I have run into the same problem with no blank like before \end{proof} but with \end{equation} before \end{proof}. Is there another solution to that problem? Actually, I found the answer here: tex.stackexchange.com/a/128022/18 Commented Jan 5, 2015 at 19:33

it's probable that your proof ends with a list or a display environment. since you're using amsthm, you can put \qedhere just before the end of that environment and the "tombstone" will be moved up onto the last line of the list or display.

edit: with the addition of a (non)working example, it became obvious that the problem was caused by a blank line before \end{proof}. never leave a blank line before \end{proof}; doing so will always result in the qed box being on a separate line, and even possibly on the next page as in this example.

  • 3
    I have voted on this answer since it gives more general answer(in my paper I didn't leave blank line) - although from the OP's view the marked answer is better.
    – quapka
    Commented Apr 19, 2014 at 13:04

You must log in to answer this question.

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