Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 15 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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