LaTeX

NoteIntroduction

Welcome to the LaTeX information page! Here, you will find general information about LaTeX. LaTeX is a language for mathematical typesetting that is commonly used for documentation and writing mathematic formulas in academic papers.

1 Download LaTeX

The link to the LaTeX official website is below. Follow the instructions here to start the download process. https://www.latex-project.org/get/
In addition to the language itself, it is highly recommended that you use an LaTeX editor such as Overleaf or Texstudio Q for easier usage of the language.

2 Why do we use LaTeX and what can LaTeX do?

LaTeX can be used to produce documents with precise formatting. This is very helpful for your future research papers or presentations. It can also be handy in creating complex yet professional-looking mathematical formulas. Here is an example:

x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

3 Document classes and packages in LaTeX

LaTeX uses document classes to create documents. These classes usually include article, book, report, letter, and more.

Here is an example piece of code for declaring an article class. You can always add features such as text size, paper size, etc in the options brackets. "\documentclass[options]{article}"
"\begin{document}"
(Put your text in this section!)
"\end{document}"

3.1 Algorithm

In addition to those classes, LaTeX also has some more specialized packages like “algorithm”. “Algorithm” is a commonly used package that provides an environment for formatting pseudo-code.

Below is the syntax for declaring an algorithmic section in your document.
"\begin{algorithmic}"
(Put your code in this section!)
"\end{algorithmic}"

3.2 Beamer

Another useful class in LaTeX is “beamer.” This document is for presentation.
Note: beamer class have a unique syntax in which you will need to declare each frame for presentation, below is an example:
"\documentclass{beamer}"
"\begin{document}"
"\frame{\FirstPage}"
"\begin{frame}"
(Put your presentation in here!)
"\end{frame}"
"\end{document}"

3.3 Tables for basic types of classes and their function

Latex classes and functions
document classes function
article articles in scientific journals, presentations, short reports
book books
beamer presentations
report long reports contain multiple chapters
slides sildes

4 Mathematic Expressions

4.1 Basic syntax for inline math formula

To use an inline math formula for LaTeX, you can use the following syntax:
"\(...\)"
"$...$"
"\begin{math}...\end{math}"

4.2 Write mathematical formula

Mathematical equations can be formed using mathbf. Here is an example:
"[latex]\mathbf{\alpha+\beta}[/latex]"
\mathbf{\alpha+\beta}

4.3 Matrix, vector, tensor

Example code for a matrix:
"\begin{matrix}"
"1 & 2 & 3\\"
"a & b & c"
"\end{matrix}"
\begin{matrix} 1 & 2 & 3\\ a & b & c \end{matrix}

Example code for a vector:
"\mathbf{Z} = \mathbf{X} + \mathbf{Y}"
\mathbf{Z} = \mathbf{X} + \mathbf{Y}

Example code for a tensor:
"\sum_{i=1}^n X^i Y^{1-i}"
\sum_{i=1}^n X^i Y^{1-i}

4.4 Table for mathematic operations

LaTeX Math Operators
Operation Latex Expression
\times " \times "
\div " \div "
\leq " \leq "
\geq " \geq "
\approx " \approx "
\equiv " \equiv "
\cap " \cap "
\cup " \cup "

5 Additional Resources and Tutorial

Here is a beginner friendly online tutorial for LaTeX:
https://www.learnlatex.org/en/

Follow this link for a more specific introduction of different classes and their features. https://en.wikibooks.org/wiki/LaTeX/Document_Structure

Short Form Latex tutorial video: https://youtu.be/lgiCpA4zzGU?si=zzA8fN7TrTnWsw02 Longform Latex tutorial video, starts in the Overleaf browser, then moves to offline application: https://youtu.be/ydOTMQC7np0?si=oFs66SgbMDxW68f2

Back to top