Separate Numbering for Problems in LaTeX

By default, when using amsthm to create environments such as theorems, claims, and problems, they all use the same numbering. Sometimes this is annoying, as the numbering for the problems should generally be unaffected by the theorems present (or the lack of them). For example, the default behavior produces:

Problem 1
Problem 2
Theorem 3
Problem 4

where the desired behavior would be (in my opinion):

Problem 1
Problem 2
Theorem 1
Problem 3

Fortunately, this can be done by redefining the problem environment.

letproblem@undefined % undefines the existing problem environment
theoremstyle{definition} % set the style of the new environment to 'definition'
newtheorem{problem}{protectproblemname} % (re)define the 'problem' environment

The theoremstyle can be one of three defaults: plain, definition, and remark, or some custom style defined using newtheoremstyle.

See amsthm‘s documentation for more information, such as subordinate numbering (numbering per section).

Leave a Reply

Your email address will not be published. Required fields are marked *