Stating definitions and theorems
Strictly structured math documents often contain certain numbered textual elements, which can be definitions, theorems, lemmas, examples remarks, and so on. Numbering is mainly for cross-referencing. Such structuring is especially the case in self-contained scientific works such as theses.
As a sample application, we will create a definition, a theorem with a proof, a lemma, and an additional note. All shall be automatically numbered for cross-referencing. Just for fun, we will apply it to school geometry: the theorem of Pythagoras.
Note
Actually, this recipe is of pretty universal use: you can create numbered, named environments, ready for cross-referencing, whatever it shall contain at the end.
How to do it...
We continue using the amsmath
package, with a special part of it, the amsthm
package as follows:
As usual, start with a document class. For our recipe, the
article
class is sufficient.\documentclass{article}
Load the packages
amsmath
andamsthm
:\usepackage...