Technical Support
Forums and Mailing Lists
Search Mackichan Web

SWP & SW
Version 5/5.5

Installation
Word Processing
Computations
Typesetting
File Issues
Graphics
Exam Builder
Style Editor
Other
Technical Articles

Scientific Notebook
Support Information
Troubleshooting

TeXnology
BibDB

Document 611

## Theorem numbering: lemmas numbered within theorems

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

In many documents, all of the theorem-like environments---theorems, corollaries, lemmas, etc.---use a common numbering scheme. That is, they are typeset in a single sequence, as in this series:

Theorem 1, Corollary 2, Lemma 3, Theorem 4, Lemma 5, etc.

You can create independent numbering of theorem environments so that each environment has its own numbering sequence, as in this series:

Theorem 1, Corollary 1, Lemma 1, Theorem 2, Lemma 2, etc.

You can also

The numbering scheme for theorem-like environments is controlled by \newtheorem statements, which are typically included in the document preamble.

### Numbering lemmas within theorems

You can create a numbering sequence in which one theorem-like environment is counted within another and the numbering is restarted with each new outer environment. The result might be a numbering scheme like this:

Theorem 1, Lemma 1, Lemma 2, Theorem 2, Lemma 1, Lemma 2, Theorem 3, Lemma 1, Lemma 2, etc.

1. From the Typeset menu, choose Preamble.

2. Click the mouse in the input area.

3. Find the statement

\newtheorem{lemma}[theorem]{Lemma}

4. Change the statement to

\newtheorem{lemma}{Lemma}

\makeatletter

\makeatother

6. If you want to number other theorem-like environments within theorems, make similar changes to the corresponding \newtheorem statements for those environments.

7. Choose OK.

### Creating an alternate numbering scheme

You can create an alternate numbering scheme such as this:

Theorem 1, Lemma 1.1, Lemma 1.2, Theorem 2, Lemma 2.1, Lemma 2.2

1. From the Typeset menu, choose Preamble.

2. Click the mouse in the input area.

3. Find the statement

\newtheorem{lemma}[theorem]{Lemma}

4. Change the statement to

\newtheorem{lemma}{Lemma}

\numberwithin{lemma}{theorem}

6. If you want to change the numbering scheme for other theorem-like environments, make similar changes to the corresponding \newtheorem statements for those environments.

7. Choose OK.

Last revised 07/12/06

MacKichan Software, Inc. 19689 7th Avenue NE, Suite 183 #238 Poulsbo, WA 98370
Phone: 360-394-6033 Toll-free: 877-724-9673 Fax: 360-394-6039