LATEX Course

LaTeX

You can use LaTeX to easily write documents such as reports, presentations, or even resumes. This is also quite convenient to write math inside a document or a website.

In this course, you will learn

  • how to write a basic latex document
  • how to write math in latex

Introduction

You may code latex (.tex) documents on

  • Overleaf (previously writelatex.com), a simple and collaborative tool, you need to register
  • CoCalc, the UI may be a bit hard to use but no account is required

You can also use a latex compiler on your machine, but that's not covered for now.

There are a lot of latex templates, so be sure to check them before starting a document from scratch https://www.overleaf.com/latex/templates since there are presentation templates, CV/resumes templates, report templates...


Writing documents

Generally, latex documents look like

\documentclass{article}
% your packages
\usepackage[utf8]{inputenc}

\begin{document}
your content here
\end{document}

Each time, you would want to use some tags for your content, you will have to use a directive starting with \begin{directive} and ending with \end{directive}.


Writing math in latex

First and foremost, you should check out this awesome website http://atomurl.net/math/.

A math equation needs to be put inside

  • $latex$ (or \(latex\)): inline math, meaning inside a sentence
  • \[latex\]: the formula will be rendered on a whole line.

An alternative to \[latex\] is \begin{equation}latex\end{equation}.

Spaces are useless in your latex code since the math parser will do whatever he wants, you should either use \ (backslash followed by a space) or use \quad (or \,, \:, ...). You can make a horizontal space with \hspace{1cm}.

Note: if you don't remember the name of a symbol, just draw it on detexify and ask him to look for it.

Related


Cheatsheet

Because I'm enjoying adding links to cheat sheets, here are some sheets that look good


Sources