TUTORIAL 9: THEOREM STYLES
CHRISTOPHER RARIDAN
Abstract. Upon completion of this tutorial, the author should
be able to construct the numbered theorem styles that are typically
necessary to write a mathematical paper and will be able to label
and reference these constructs. In addition, the author will learn
how to change the equation numbering so that the equations are
numbered relative to the section in which they occur and how to
change whether these numbers appear on the left- or right-hand
side of the page.
1. Welcome
• Hello. My name is Dr. Christopher Raridan (Dr. R).
• I want to welcome you to the LATEX Tutorial Series.
• In this tutorial, we will introduce a few of the common theorem
style environments.
• By the end of this tutorial, the author should be able to construct the theorem styles that are typically necessary to write
a mathematical paper: theorem, lemma, corollary, proposition, conjecture, definition, and example.
• The author also will learn how to label and reference these
constructs.
Part of Math 3006, Communication in Mathematics, Clayton State University.
1
2
C. RARIDAN
• In addition, the author will learn how to change the equation
numbering so that the equations are numbered relative to the
section in which they occur and how to change whether these
numbers appear on the left- or right-hand side of the page.
• This is the ninth in a series of tutorials meant introduce you to
LATEX.
• We assume that you have successfully completed Tutorial 8 and
we will use the results of this tutorial in subsequent tutorials.
• Hopefully, Windows and Mac users will have a similar experience.
2. Getting Started
(1) Navigate to the “LaTeX Tutorials” folder on your computer.
(2) Inside this folder, create a new folder entitled “Math and Theorem Styles”.
(3) Open the “Typesetting Mathematical Expressions” folder.
(4) Double-click on the Typesetting-Mathematical-Expressions.tex
file.
(5) In the TeXworks editor, click [Window] > Show > Tags if the
“Tags” window is not already displayed.
(6) Change the title of this article to “Mathematics and the Theorem Styles” with a short title of “Math and Theorems”.
(7) Verify that your author information is correct.
TUTORIAL 9: THEOREM STYLES
3
(8) Click [File] > Save As....
(9) Navigate to your “Math and Theorem Styles” folder.
(10) Inside that folder, name your file Math-Theorem-Styles.tex.
(11) Click [Save] to save your file.
3. Theorem Style Environments
There are several environments within LATEX that are automatically
numbered. In previous tutorials, we discussed the “\section{}” numbered environment and how to label and reference them. We continue
in that vein by introducing now the numbered environments for theorem, lemma, corollary, proposition, conjecture, definition, and
example.
3.1. Updating the Preamble. Before we can use the LATEX numbered environments, we must tell LATEX how to behave with respect to
them. This will require us to add some information to the preamble of
our LATEX document.
(1) After “\renewcommand{\baselinestretch}{1.5}” hit [Enter]
twice.
(2) Type “% THEOREM STYLES DEFINED” and hit [Enter] twice.
(3) Type “% Each of these will numbered relative to each
other and the text will be italicized.” and hit [Enter].
(4) Type “\theoremstyle{plain}”.
4
C. RARIDAN
(5) The command “\theoremstyle{plain}” tells LATEX that the
constructs that follow it will be “plain,” which in the amsart
document class produces italicized font.
(6) After “\theoremstyle{plain}” hit [Enter].
(7) We are now going to tell LATEX how to format our first theorem
style, which will be Theorem.
(8) Type “\newtheorem{thm}{Theorem}[section].”
(9) This first \newtheorem command has the form
“\newtheorem{key}{Name}[relto]” and tells LATEX:
• The key is “thm,” so we type “\begin{thm}” to begin the
theorem environment and “\end{thm}” to end it. If you
prefer, you could set the key as “theorem” instead–we are
just abbreviating.
• The Name is “Theorem,” so LATEX will display Theorem.
• The relto is “section,” so LATEX will number each theorem relative to the section that it is in, i.e., Theorem 2.4
will be the fourth of the numbered theorem styles in Section 2.
(10) Now, scroll to the end of the document.
(11) After the displayed equation
“\[ \lim_{x \rightarrow a} f(x) = f(a). \]”,
hit [Enter] twice.
(12) Type “\section{Theorem Styles}” and hit [Enter].
(13) Type “\label{sec:thm-styles}” and hit [Enter] twice.
TUTORIAL 9: THEOREM STYLES
5
(14) Type “In this section, we give examples of the numbered
theorem styles.” and hit [Enter] twice.
(15) Type “\begin{thm}” and hit [Enter] twice.
(16) Type “\end{thm}”.
(17) Remember, it is always a good idea to type \begin{} and
\end{} in pairs.
(18) Place your cursor between these two commands and type
“The number $\sqrt{2}$ is irrational.”.
(19) [Ctrl]+[T] to typeset.
(20) We should see that we now have our first theorem of section 3,
named and numbered appropriately as Theorem 3.1.
(21) Note that the \theoremstyle{plain} command that we entered in the preamble actually typesets the text of the theorem
in italics, as it should be.
(22) Let’s add a label: place your cursor after \begin{thm}, hit
[Enter], and type “\label{thm:sqrt-2-irrational}”.
(23) Now, let’s add a few more theorem styles: Lemma, Corollary,
Proposition, and Conjecture.
(24) Scroll back up to the preamble and after
“\newtheorem{thm}{Theorem}[section]”
hit [Enter].
(25) Type the following:
6
C. RARIDAN
\newtheorem{lem}[thm]{Lemma}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{conj}[thm]{Conjecture}
(26) Each of these “\newtheorem” commands has the form:
“\newtheorem{key}[relto]{Name}.”
• Notice that the relto portion is in a different location and
that it is “thm”.
• This tells LATEX to follow the the convention established
for the theorem environment created previously.
(27) Scroll back down to the bottom of your document.
(28) Place your cursor at the end of the paragraph that ends with
“numbered theorem styles.” and hit [Enter] twice.
(29) Type “\begin{lem}” and hit [Enter] twice.
(30) Type “\end{lem}”.
(31) Place your cursor between these two commands and type
“\label{lem:even-squares}” and hit [Enter].
(32) Type “For all integers $x$, $x^2$ is even if and
only if $x$ is even.”.
(33) [Ctrl]+[T] to typeset.
(34) We should now see that LATEX has added this lemma before the
theorem and renumbered appropriately.
TUTORIAL 9: THEOREM STYLES
7
(35) Note that the \theoremstyle{plain} command that we entered in the preamble actually typesets the text of this lemma
in italics, as it should be.
(36) In fact, each of the constructs Theorem, Lemma, Corollary,
Proposition, and Conjecture will be typeset in italics.
(37) We now need to prove both of these statements!
(38) After “\end{lem}” hit [Enter] twice.
(39) Type “\begin{proof}” and hit [Enter] twice.
(40) Type “\end{proof}”.
(41) The amsart documentclass has a built in construction for proofs,
which is why we did not have to create one ourselves.
(42) Place your cursor on the blank line between \begin{proof}
and \end{proof}.
(43) Type the following proof for the lemma:
Let $x$ be an integer. First, we show that if $x$ is even,
then $x^2$ is even. Let $x = 2k$, where $k$ is any integer.
Then $x^2 = (2k)^2 = 4k^2 = 2(2k^2)$, which is even. Now,
we show that if $x^2$ is even, then $x$ is even by proving
the contrapositive. If $x$ is odd, then $x = 2j + 1$ for
some integer $j$. Then $x^2 = (2j + 1)^2 = 4j^2 + 4j + 1 =
2(2j^2 + 2j) + 1$, which is odd.
(44) [Ctrl]+[T] to typeset.
(45) LATEX has added the proof environment.
8
C. RARIDAN
(46) In the amsart documentclass, proofs start with “Proof.” and
end with an open box, “”.
(47) Note that other documentclasses may not predefine the proof
environment!
(48) Notice that the open box has been right-justified (automatically), just as it should be.
(49) Let’s add a “proof” for the theorem.
(50) After “\end{thm}” hit [Enter] twice.
(51) Type “\begin{proof}” and hit [Enter] twice.
(52) Type “\end{proof}”.
(53) On the blank line between these two commands, type
“The proof relies on the result of
Lemma~\ref{lem:even-squares}.”.
(54) [Ctrl]+[T] to typeset.
(55) Of course, this is not a real proof of the theorem, as there are
some details that need to be added.
(56) This is just an example of how we often use a lemma, and a
reminder of how to use internal labels and references.
(57) Typically, a lemma is used as a “helping theorem” in a proof of
another “larger” result.
(58) Let’s enter our last few numbered theorem styles, Definitions
and Examples.
TUTORIAL 9: THEOREM STYLES
9
(59) Although we certainly could follow the same mold prescribed
for the theorem styles we have already developed, we would like
to provide an alternative.
(60) Typically, we want numbered definitions and examples to appear in “regular” Roman font; that is, we want the text of these
constructs to use the same font style as the rest of the paper
instead of the italic font used for theorems, lemmas, etc.
(61) Scroll back up to the preamble.
(62) Place your cursor on the line that contains
\newtheorem{conj}[thm]{Conjecture}
and hit [Enter].
(63) Type “% Definitions and examples are numbered relative
to theorems but the font is not italicized.” and hit
[Enter].
(64) Type “\theoremstyle{definition}”.
(65) The command “\theoremstyle{definition}” tells LATEX that
the constructs that follow it will be typeset using the standard
Roman font (i.e., not italics) of the amsart document class.
(66) After “\theoremstyle{definition}” hit [Enter].
(67) Type “\newtheorem{defn}[thm]{Definition}” and hit [Enter].
(68) Type “\newtheorem{ex}[thm]{Example}”.
10
C. RARIDAN
(69) Please note that we cannot use the abbreviation “def” for the
definition theorem style because that command is a reserved
LATEX command.
(70) Just to see what these theorem styles will look like and how
they are numbered, scroll to the end of your LATEX document.
(71) Place your cursor at the end of the paragraph that ends with
“numbered theorem styles.” and hit [Enter] twice.
(72) Type “\begin{ex}” and hit [Enter] twice.
(73) Type “\end{ex}”.
(74) on the blank line between these two commands, type
“\label{ex:even-squares” and hit [Enter].
(75) Type “If $x$ is 2, 4, or 6, then $x^2$ is 4, 16, or 36,
respectively.”.
(76) [Ctrl]+[T] to typeset.
(77) Notice that this example is typeset in the usual “upright” Roman font rather than in italics, which was used for the lemma
and theorem.
(78) In addition, LATEX has updated the numbering of these theorem
styles appropriately.
4. Changing the way LATEX numbers equations
In this section, we examine how to change the numbering of equations
so that they are numbered relative to the section in which they occur
TUTORIAL 9: THEOREM STYLES
11
and how to move the equation number from the left-hand side of the
page to the right-hand side of the page.
(1) Scroll back up to the preamble.
(2) Place your cursor on the line that contains
“\newtheorem{ex}[thm]{Example}”
and hit [Enter] twice.
(3) Type “% Equations will be numbered by section.” and
hit [Enter].
(4) Type “\numberwithin{equation}{section}”.
(5) There should be only one blank line between this last LATEX command and % END PREAMBLE.
(6) The command \numberwithin{equation}{section} tells
LATEX that equations will be numbered within sections, but relative only to each other and not any other numbered construct.
(7) [Ctrl]+[T] to typeset.
(8) We should notice that the integral expression (on page 2) is now
numbered “(2.1)”; it is the first numbered equation in Section 2.
(9) To move the equation numbering from the left-hand side of the
page to the right-hand side, we need to add to the optional
argument in the \documentclass command.
(10) Scroll back to the top of your LATEX document and locate
\documentclass[12pt]{amsart}.
12
C. RARIDAN
(11) Place your cursor after “12pt” but before the right closing
bracket.
(12) Type “,reqno”.
(13) That is, type a comma then reqno.
(14) This optional argument tells LATEX to place the equation numbering on the right-hand side of the page.
(15) [Ctrl]+[T] to typeset.
(16) You should see that equation number “(2.1)” has been moved
accordingly.
(17) This is not a required argument, but an optional one!
(18) Although we have seen equations numbered on both the leftand right-hand side of the page within journal articles, we believe it “looks better” when they are numbered on the right.
5. Updating the Abstract
Please update your previous abstract (from Tutorial 8) to reflect
what you learned in this tutorial as well. Please do not add more
than 2 or 3 sentences or about 50 words.
Department of Mathematics, Clayton State University, Morrow,
Georgia 30260
E-mail address: [email protected]
© Copyright 2026 Paperzz