19

I am using the amsthm package, and I have this in the preamble:

\theoremstyle{definition}
\newtheorem{definition}{Definition}[chapter]
\newtheorem{example}[definition]{Example}

\theoremstyle{plain}
\newtheorem{theorem}[definition]{Theorem}
\newtheorem{lemma}[definition]{Lemma}

(I use only one counter for all environments -- this is intentional)

Now, I'd like the example environment to actually have an end mark similar to proofs (but with a different symbol). (Maybe also for the definition environment)

The \newtheoremstyle command from amsthm doesn't seem to help.

Is there some easy way to do this, or should I just define new LaTeX environments (with \newenvironment?

23

You can use the thmtools package as a front-end to amsthm; adding the end marks is then an easy matter:

\documentclass{book}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheorem[style=definition,qed=$\blacksquare$,numberwithin=chapter]{definition}
\declaretheorem[style=definition,qed=$\blacktriangle$,sibling=definition]{example}

\declaretheorem[style=plain,sibling=definition]{theorem}
\declaretheorem[style=plain,sibling=definition]{lemma}

\begin{document}

\chapter{Test Chapter}
\begin{definition}
Test
\end{definition}

\begin{example}
Test
\end{example}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.