Separate Numbering for Problems in LaTeX

By default when using the amsthm to create environments such as theorems, claims and problems, they all use the same numbering. Sometimes it’s annoying, as the numbering for the problems should generally be unaffected by the theorems present (or 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.

\let\problem\@undefined % undefines the existing problem environment
\theoremstyle{definition} % set the style of the new environment to 'definition'
\newtheorem{problem}{\protect\problemname} % (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 subordinately numbering (numbering per section).

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.