Getting started with LaTeX

The standard method for typing mathematics is to use LaTeX (lay-tech). If you have an aspirations to graduate school, then you'll have to learn how to do this eventually, so you might want to start by learning to type your homework...

LaTeX has two main difficulties for the new learner:
  1. Production of a finished document is a two-step process: content is first typed in a text file (.tex extension), which is then compiled using the (pdf)latex program to produce an output file (usually a pdf). Standard office programs (e.g. Word) do these steps simultaneously, so this will take some getting used to.
  2. All mathematics and formatting is typed in code using commands: in LaTeX these begin with a backslash (\).
Here are two methods for how to get started.

1. The Basic Method

Overleaf is a free online LaTeX compiler (others are available). With an account you can easily save, edit and compile a file online. To test things out, try uploading this sample file, which should result in your browser looking like this:

screenshot

Help with commands can be found via the main menu or directly. Try reading Learn LaTeX in 30 minutes, in particular Section 10: Adding math to LaTeX.

2. The Traditional Method

Download and install a full (La)TeX distribution. For suggestions based on your operating system see the LaTeX project. To test everything out, download the sample file and open using the editor for your distribution. The picture below shows how things look using the MiKTeX editor (TeXworks) on Windows; to compile the document, select pdflatex from the drop-down menu at the top and hit the green triangle. If you do everything correctly, your screen should look like this
screenshot
and the file main.pdf will appear in the same folder as main.tex. Any other files produced by the compilation (main.log and main.aux) can be safely ignored. If you attempt to compile faulty code, the log file will typically be displayed to help diagnose the problem.


Tips and Tricks