I am using wiley-article class. In my text I have examples and definitions. The problem is the numbering of both is mixed. For example, suppose I have the following:

bla bla

xo xo

    bla2 bla2

The output is:

Example 1: bla bla
Definition 2: xo xo
Example 3: bla2 bla2

So what I need is to get a specific counter for the examples and another counter for the definition. Thus the output for the example above will be:

Example 1: ...
Definition 1 :...
Example 2:...

Noting that, the example and definition environments are built in the wiley-article class. So, if I add \usepackage{amsthm} I get errors since this class already has its own theorem and example and definition environments. Any help is appreciated.

  • This might not be particularly helpful for LaTeX, but can you try \tracingassigns2\tracingonline1 and then put \show\def immediately after the \end{definition}. What, if any, count changes have been logged? Commented Feb 11, 2020 at 3:32

1 Answer 1


The solution is so easy. Just the wiley-article.cls remove from [theorem] from the line

  • Rather than directly modifying the .cls file (which in general is not a good idea), this is best done with a patch. \patchcmd is provided by etoolbox, and this question provides help on how to use it. Commented Mar 12, 2020 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .