[Tex/LaTex] QED symbol in a custom theorem environment

amsmaththeorems

I have created my own theorem environment like this

\newtheoremstyle{mythmstyle}{}{}{}{}{\scshape}{.}{ }{}
\theoremstyle{mythmstyle} \newtheorem{mythm}{Theorem}

How do I add the QED symbol (the white rectangle) into this custom environment? The \qedhere should work for it too, in case I need it.

Best Answer

One option would be to use the thmtools package as a front-end for amsthm:

\documentclass{article}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheoremstyle[
  spaceabove=\topsep, spacebelow=\topsep,
  headfont=\normalfont\scshape,
  notefont=\mdseries, notebraces={(}{)},
  bodyfont=\normalfont,
  postheadspace=1em,
  qed=\qedsymbol
]{mythmstyle}
\declaretheorem[style=mythmstyle]{theorem}

\begin{document}

\begin{theorem}
test
\end{theorem}

\begin{theorem}
test
\[
a\qedhere
\]
\end{theorem}

\end{document}

enter image description here