Document 734

Numbering theorem-like environments

Version: 3.5x, 4.x, 5.x - Scientific WorkPlace & Scientific Word

When you typeset a document containing theorems, LaTeX or pdfLaTeX formats and numbers the theorems and, if you've created markers for the theorems, creates any cross-references to them. In-text cross-references appear as the number of the theorem.

NoteYou must typeset the document to generate theorem numbers.

Most typesetting specifications use a common numbering sequence throughout a document for all theorem-like statements. Based on \newtheorem statements, the sequence results in numbers like these: Theorem 1, Corollary 2, Lemma 3, Theorem 4, and so on. Usually, the environments are numbered on the basis of the Theorem environment. You can change the numbering scheme.

\newtheorem statements

The theorem numbering sequence is determined by the \newtheorem statements that ordinarily appear in the document preamble. A \newtheorem statement has two forms:

\newtheorem{counter}[counter_basis]{Counter_title}

and

\newtheorem{counter}{Counter_title}[numbered_within]

The commands have these parameters:

Parameter Use
counter Names the environment to be counted
counter_basis The source of the count
Counter_title The label for the environment
numbered_within Names an already defined counter


The part of a typical document preamble that defines the theorem environments looks like this:

\newtheorem{theorem}{Theorem}

\newtheorem{acknowledgement}[theorem]{Acknowledgement}

\newtheorem{algorithm}[theorem]{Algorithm}

\newtheorem{axiom}[theorem]{Axiom}

\newtheorem{case}[theorem]{Case}

\newtheorem{corollary}[theorem]{Corollary}

:

\newtheorem{solution}[theorem]{Solution}

\newtheorem{summary}[theorem]{Summary}

These lines define a number of theorem-like environments, all numbered on the basis of the Theorem environment.

ExampleThe statement

\newtheorem{corollary}[theorem]{Corollary}

applies the label Corollary to statements tagged with the corollary tag and numbers the statements using the numbering sequence used for theorems.

Changing the numbering scheme

If you're familiar with TeX and LaTeX and the \newtheorem statements appear in the preamble of your document, you can change the numbering sequence for theorems in your document by changing the \newtheorem statements. You can

Sometimes the \newtheorem statements are included in the typesetting specifications for the shell. In that case, don't attempt to modify the statements. Choose a different shell in which theorem statements are numbered to your liking.

/* Added 07/12/06, revised 12/22/09 */ Last revised 12/22/09

This document was created with Scientific WorkPlace.