I understand that usually for LaTeX we do \qedhere to force the QED symbol to appear where you want it.

How do I change the Proof environment in LyX to get LyX to do the same thing?

Right now if I have alignat environment as the last bit of my proof, the QED square appears one line below where I would like it to be.

enter image description here

  • As far as I know it's simple only with the ntheorem package.
    – Bernard
    Apr 8, 2016 at 10:58
  • 1
    if you are using amsthm. insert \qedhere before \end{equation*} or \]. Apr 8, 2016 at 11:32
  • 2
    if you could provide a small compilable example, you'd likely get more extensive answers. not knowing what document class you're using or which packages puts potential answerers at a distinct disadvantage, requiring them to use telepathy or a crystal ball, neither of which has been perfected yet. Apr 11, 2016 at 0:00
  • As Barbara said, some more information would be useful. At the very least, which theorem-module are you using? Better, create a small sample document and add that to your question. Apr 16, 2016 at 6:41
  • @KennyLJ I think my answer is correct. Do you have any feedback?
    – G.M.
    Apr 27, 2016 at 17:50

1 Answer 1


In any amsmath environment such as alignat, you can add \qedhere at the end of the last cell and wrap it inside \tag*, as follows:

\qedhere inside \tag*

For repeated usage, I recommend defining a macro as follows:

macro with \qedhere inside \tag*

I have been using this trick for years, it always worked for me.

You must log in to answer this question.