TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In beamer, when I use \setbeamertemplate{theorems}[numbered] but this groups them all as the following.

What I have

What I want is theorems, lemmas and other environments to have different counters such as the following.

What I want

Is there a simple way for this? I can use notheorems option for beamer and redefine the environments myself but in this case the colour styles of the environments are removed.

share|improve this question
You can say \newtheorem{mylemma}{Lemma} or \newtheorem{mylemma}{\translate{Lemma}} if you want to rely on multilingual features. The appearance of the mylemma environment will be the same as for theorems, but with autonomous numbering. This said, I prefer consecutive numbering even for presentations. – egreg Jul 12 '13 at 13:50
This also kills the colouring for example. – bkarpuz Jul 12 '13 at 15:55
Please, give an example of what you're doing – egreg Jul 12 '13 at 16:00
Please see the pictures in OP (just added). – bkarpuz Jul 12 '13 at 16:11
@bkarpuz Use \theoremstyle according to my changed answer. – Toscho Jul 12 '13 at 17:09
up vote 3 down vote accepted

beamer uses amsthm, which doesn't have a \renewtheorem like ntheorem does. You could hack into beamer (the file is /tex/latex/beamer/beamerbasetheorems.sty) but that is really bad behaviour. It's probably easier, to just \undef (from the package etoolbox) the macro \lemma and recreate the theorem with \newtheorem.

Foo and bar.
Either bar or foo.
\begin{theorem}{Something new}
No, not really.

Concerning other theorem environments: look at the above file. After \mode<all>{ you'll find the definitions, beamer does, which you can \undef and recreate as you like. By default, the counting depends on the counting of theorem (except for proof/beweis of course). You'll also find the theoremstyles used for the different theorems. example for example (no pun intended) uses \theoremstyle{example}.

share|improve this answer
Nope, I do the same for example and it removes the example colouring. It is not green any more... – bkarpuz Jul 12 '13 at 15:47
I changed the answer to accomodate for that. – Toscho Jul 12 '13 at 17:10

Your Answer


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.