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

Suppose I have a theorem that is defined a certain way, as follows.


And I want to redefine it another way further down in my document, as below.


What is the easiest way to go about this?

I would like something like this, but I get undefined control sequence on \renewtheorem.


\begin{thmTemp} First one.  \end{thmTemp}

\begin{thmTemp} Second one.  \end{thmTemp}

When I run pdflatex on this, I get the following:

! Undefined control sequence.
l.10     \renewtheorem

I am avoiding ntheorem because it does not preserve the theorem styles defined by amstheorem, even when the amsthm option is passed to it, and I would prefer not to redefine those styles.

share|improve this question
Have you tried \renewtheorem? It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. That way we would know which packages you are using as some solutions may be package specific. – Peter Grill Mar 18 '13 at 6:13
Try replacing amsthm with ntheorem. – Peter Grill Mar 18 '13 at 6:22
@PeterGrill, There's actually a specific reason I want to use amsthm and not ntheorem. I prefer not to redefine \theoremstyle{definition} among others. – merlin2011 Mar 18 '13 at 6:23
And yes, I have tried the [amsthm] option to ntheorem, but it does not achieve the desired effect. – merlin2011 Mar 18 '13 at 6:23
Perhaps it would help if you specified more closely what you mean by 'redefine it another way'... How do you expect the redefined theorem environment to behave? Do you simply want to change the heading and continue numbering with the previous counter? Or do you also want to change the style of the theorem? – benwilfut Mar 18 '13 at 8:12
up vote 7 down vote accepted

Rather than redefining the environment each time, I would define a wrapper:


First one.

Second one.

enter image description here

share|improve this answer

If one systematically needs different theorems definitions in the same documents, egreg approach is convenient. But many of us might have a mymath.tex with common shortcuts and settings, which is a very likely place for the \newtheorem definitions, and occasionally one might want to override these definitions, e.g. to change the theorems' locale.

In these cases, editing mymath.tex or mantaining a second one is inconvenient and prone to errors, much better to plug a new altthm.tex in the main document overriding theorem definitions.
To this end, we need a \renewtheorem command:

  \expandafter\let\csname c@#1\endcsname\relax

Use as the \renewtheorem as the standard \newtheorem:


It works with amsthm.

The MWE, excluding the \renewtheorem definition, is:


My theorem ...

My theorem ...

share|improve this answer
Please, do not tell me you submit papers using some sort of mymacros.tex. If you do, I truly hope I won't meet the papers. – yo' Feb 26 at 22:30
@yo': Hmm... sorry to disappoint you, but LaTeX most relevant feature is macros, which avoid repetitive typing. Putting all of them in the preamble, or even worse in the body of text, creates clutter and defeats the whole purpose of LaTeX being focused on content, rather than presentation. Anyway, unless you are involved publishing a journal, you are not supposed to read the sources producing the papers. P.S. in case you might be interested, I fixed a bug in the code. – antonio Feb 27 at 20:10
Well, if people define 100 macros in their "preamble file" and then use 5 of them in the article, it's anything but convenient. (btw, I am involved in journal typesetting...) – yo' Feb 27 at 20:16
@yo' from your perspective, you are right. From the author perspective, you are absolutely wrong. But I understand that journal typesetting is the key part of Science. – Spherical Triangle Mar 1 at 17:18
@antonio Can your trick be made to work with \newtheorem*{thm*} ? – Paulo Ney Apr 26 at 6:31

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.