LaTeX Wiki

The \newtheorem command is used to create environments for mathematical theorems, definitions etc. that will be formatted and numbered in a consistent style.

Syntax[]

The command can be used in three distinct ways:

\newtheorem{env_name}{title}
\newtheorem{env_name}{title}[numbered_within]
\newtheorem{env_name}[numbered_like]{title}

This defines a new environment env_name that will be labeled with title. If the optional parameter numbered_within is given, the environment's counter will be subordinate to the existing counter numbered_within, e.g. "chapter" or "section". If instead the optional parameter numbered_like is given, the environment will share the counter of the previously defined theorem-like environment numbered_like.

This command is fragile and is commonly used in the preamble.

Example[]

\newtheorem{lem}{Lemma}
\newtheorem{thm}{Theorem}

\begin{lem}
  text of lemma
\end{lem}

The next result follows immediately.
\begin{thm}[Gauss]  %  puts "Gauss" in parens after theorem head
  text of theorem
\end{thm}

See also[]

The amsthm package provides

  • a proof environment,
  • \newtheorem* to define unnumbered theorem-like environments, and
  • \theoremstyle to change the appearance of theorem-like environments.

External links[]