A Student Guide To Writing Proofs in Latex: Discrete Mathematics - Spring 2022
A Student Guide To Writing Proofs in Latex: Discrete Mathematics - Spring 2022
Introduction
LATEX (pronounced LAY-tek or LAH-tek) is a tool used to create professional-looking
documents. It enables you to focus on the content of your document. Instead of spacing
out text on a page to control formatting, as with Microsoft Word, you can enter plain text
and let LATEX take care of the formatting.
● Focus only on content, not the format: One of the most important reasons to
use LATEX is that it separates the content of the document from the style. This
means that once you have written the content of your document, we can change
its appearance with ease.
1
What does a LATEX document look like?
Let's start with the simplest working example, This is how a simple latex code
looks like:
\documentclass{article}
\begin{document}
\end{document}
The first line declares the type of document, known as the class, which controls the
overall appearance of the document. Different types of documents will require different
classes i.e. a CV/resume will require a different class than a scientific paper. In this
case, the class is article, the simplest and most common LATEX class.
After this, you write the content of our document, enclosed inside the
\begin{document} and \end{document} tags. This is known as the body of the
document, where you can make changes to the text.
This is how the PDF document of the previous code looks like:
You can see that LATEX has already taken care of the first piece of formatting for you,
by indenting the first line of the paragraph.
2
What Am I Supposed To Do?
You are required to use an existing LATEX template to prepare for your assignment
submission. To do so, we will use Overleaf, which is an online LATEX editor that
eliminates the need for local installation. These are the required steps:
3. If you already have an account, click Login in the upper right corner, then type in
your email and password and click the Login button (see the following figure).
3
4. Once you are logged in, you should see the Overleaf Project Management page.
5. To upload a project template, all required files must be in a compressed .zip file.
You should find the required template on BrightSpace. In the Project
Management page, click New Project and in the drop-down menu click Upload
Project.
4
6. A box will appear, there you can drag and drop the .zip file or click Select a .zip
file to open a file browser and locate it.
7. Once you drop your file or select it in your file browser you will be redirected to
the editor, where a new project will be created with the same name as the .zip
file.
8. After that, you can start editing. To see the result of your changes in the PDF
viewer (shown at the right side of the figure below), you have to compile the
document by simply hitting Recompile.
9. You can download your finished PDF by clicking the Download PDF button on
your PDF viewer as shown below.
5
How Do I Add Proofs to LATEX?
The template you are supposed to use already includes the required package to write
proofs, which is amsthm. This is an example on how can you add a proof to your
document (see text in bold below):
\documentclass{article}
\usepackage{amsthm}
\begin{document}
\begin{proof}
\end{proof}
\end{document}
The word Proof will be italicized in the PDF and there is some extra spacing, also a
special symbol is used to mark the end of the proof, as shown below:
6
How Do I Add Math to My Proofs?
One of the main advantages of LATEX is the ease at which mathematical expressions
can be written. LATEX allows two writing modes for mathematical expressions:
● The Inline mode that is used to write formulas that are part of a text. To put your
equations in inline mode use one of these delimiters: \( ... \), $ ... $ or
\begin{math} ... \end{math}. They all work and the choice is a matter of
taste. See example latex code and how it is viewed in PDF below:
● The display mode that is used to write expressions that are not part of a text or
paragraph, and are therefore put on separate lines. The displayed mode has two
versions: numbered and unnumbered. See example below on how can we use
each in our proofs:
7
And this is the PDF:
https://www.overleaf.com/learn/latex/List_of_Greek_letters_and_math_symbols