# LaTeX it!

It’s the beginning of the coronavirus pandemic right now, and we have all been suddenly transitioned into online learning. So this happens to be very timely, but actually learning LaTeX is something every undergraduate mathematics major should do early in their careers.

LaTeX is a typesetting system for mathematics (and other things), universally used in graduate school and beyond. Forget equation editors in word processors, with their infuriatingly incomplete symbol lists and click-through menus! Forget having to scratch out wrong answers, or having your grader complain about your handwriting. LaTeX is the fastest and prettiest way to produce typeset PDF math homework, once you tough out the short but steep learning curve right at the beginning. It takes one hour, and I’m here to show you how.

To use LaTeX you have many options, but the easiest quick start is Overleaf. At the end of this post you’ll find the source for the tutorial, in case you are installing it on your own computer.

This tutorial is aimed at an undergraduate discrete mathematics or introduction to proofs course (in terms of the examples in the document), but could be used anywhere in the undergraduate curriculum.

So, without further ado, open up both links below. One is an interactive worksheet with which to teach yourself, and the other is the accompanying introductory video.

- link to Overleaf opening the LaTeX Tutorial
- Video Link to accompany the tutorial.

#### Further Details and Guide

Here’s a quick reference guide to have handy along with the intro above, once you’ve got yourself into some latex editing software and have a document open.

To add an equation to your latex document, as a separate line, you surround your math with $$ at the beginning and $$ at the end. So, you write

`$$ YOUR MATH HERE $$`

You can use symbols like + x – and for exponents you can write ^. For subscripts you can use _. So for example,

`$$ x^2y_3+6=z_2^7 $$`

produces

$$ x^2y_3+6=z_2^7 $$

You can also write fractions this way:

`$$ \frac{a}{b} $$`

producing

$$ \frac{a}{b} $$

You can make an integral like this:

`$$ 2\pi \int_a^b f(x) dx $$`

producing

$$ 2 \pi \int_a^b f(x) dx $$

You can make a sum, and limits, like this:

`$$ \lim_{N \rightarrow \infty} \sum_{i=1}^{N} \frac{1}{i} = \infty $$`

producing

$$ \lim_{N \rightarrow \infty} \sum_{i=1}^{N} \frac{1}{i} = \infty $$

Here’s a real pro tip: if you want your math inline, use $ and $ (single dollars) to surround it. So for example,

`I was trying to evaluate $ \lim_{N \rightarrow infty} \sum_{i=1}^{N} \frac{1}{i} = \infty $ when a pig flew.`

produces

I was trying to evaluate $$ \lim_{N \rightarrow \infty} \sum_{i=1}^{N} \frac{1}{i} = \infty $$ when a pig flew.

Finally, you can make a matrix this way:

`$$ \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} $$`

and you’ll get

$$ \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} $$

If you have a symbol in mind and want to know the latex for it, draw it in the “deTexifyer”:

http://detexify.kirelabs.org/classify.html

For a browsable list of lots of math symbols you can use, see

http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/MathSymb.html

If you install LaTeX yourself (the internet can help you do this), you may want the PDF and source (tex) files for my tutorial, which are here:

- PDF output of the LaTeX Tutorial
- source (tex) file of the LaTeX Tutorial