add tag
samcarter
How to automatically add symbols to other theorem environments, similar to the qed symbol at the end of a proof?


```
\documentclass{beamer}

\begin{document}

\begin{frame}
  \begin{theorem}
  content...
  \end{theorem}
  \begin{lemma}
  content
  \end{lemma}
  \begin{proof}
  content...
  \end{proof}
\end{frame}

\end{document}
```
Top Answer
samcarter
One can use the `theorem begin` and `theorem end` templates to smuggle in a thm symbol, which can then be adjusted for each environment:

```
\documentclass{beamer}

\setbeamertemplate{thm symbol}{}
\addtobeamertemplate{theorem begin}{
    \def\qedsymbol{\leavevmode\hbox{\usebeamertemplate*{thm symbol}}}%
    \pushQED{\qed}%
}{}
\addtobeamertemplate{theorem end}{\popQED}{}


\AtBeginEnvironment{lemma}{
  \setbeamertemplate{thm symbol}{Quack}
}
\AtBeginEnvironment{theorem}{
  \setbeamertemplate{thm symbol}{\color{gray}$\blacktriangle$}
}

\begin{document}

\begin{frame}
  \begin{theorem}
  content...
  \end{theorem}
  \begin{lemma}
  content
  \end{lemma}
  \begin{proof}
  content...
  \end{proof}
\end{frame}

\end{document}
```


![document-1.png](/image?hash=41160669d37fd0dac7763c1a2841eac00ae6bc473137699f472a2f58823fc79b)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.