1

This question already has an answer here:

Thanks to an answer to my question asked here, I used the following codes to generate for each theorem-alike environment exactly one square symbol as the ending sign:

\documentclass[12pt]{amsart}
\usepackage{manfnt}
\makeatletter
\renewcommand\@endtheorem{\vvv@endmarker\endtrivlist\@endpefalse}
\newcommand\vvv@endmarker{%
{\unskip\nobreak\hfil\penalty50
\hskip2em\vadjust{}\nobreak\hfil\openbox
\parfillskip=0pt \finalhyphendemerits=0 \par
\penalty 10000 \parskip=0pt\noindent}\ignorespaces}
\makeatother 
\newtheorem{thm}{Theorem}

\begin{document}
\title[]{Title}
\author[]{Author}

\maketitle

\section{Proofs}
... The above argument proves the following theorem:
\begin{thm}
There are infinitely many integers $x, y, z > 0$ such that
\[ x^{2} + y^{2} = z^{2}.\]
\end{thm}


\end{document}

However, how do I make the square symbol, the ending sign, lie within the displayed equation? I tried \qedhere but nothing happened.

marked as duplicate by Mico math-mode May 29 '15 at 6:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Excuse me. Is my question clear enough for an expert to answer? Thank you. – Benicio May 29 '15 at 4:26
  • Yes of course. But because I am writing tutorial notes, whose readers are not mathematicians, so, I found it better to use square signs like some textbooks do in order to end an example, say. – Benicio May 29 '15 at 5:08
  • You're apparently not using the second method @egreg provided in his answer to your earlier query. Is there something about the \newmarkedtheorem method that's not working for you? – Mico May 29 '15 at 6:26
  • No, I just picked one of them and it happened to work. I have never tried the method you mentioned. Do you mean that method can solve the present problem? – Benicio May 29 '15 at 6:28
  • I certainly believe that @egreg's second method addresses your objective. – Mico May 29 '15 at 6:44