Weise-ipedia

LaTeX

A quickstart guide to latex.

Installation

APT (Debian/Ubuntu)

apt install texlive-latex-extra

Pacman (Manjaro)

sudo pacman -S texlive-latexextra

Compiling Documents

pdflatex -halt-on-error LATEX_FILE

Images

Show:

Quick guide to adding images.

%% Preamble
\usepackage{graphicx}

%% Document
\begin{figure}[h]
    \centering
        \includegraphics[width=0.5\textwidth]{ IMAGE_PATH }
        \caption{ CAPTION }
\end{figure}

Placement

value placement
h Approx. here
H Precisely here. Requires float package
t Top of page.
b Bottom of page.
p Special page for floats only.
! Override positional optimization

Math

Show:

Math Symbols

A list of symbols I use often:

symbol LaTeX Description
\(\mathbb{R}\) \mathbb{R} Real Numbers
\(\mathbb{N}\) \mathbb{N} Natural Numbers
\(\mathbb{Z}\) \mathbb{Z} Zahlen Numbers (integers)
\(\mathbb{Q}\) \mathbb{Q} Complex Numbers
\(\mathbb{1}\) \mathbb{1} Identity Matrix
\(\dagger\) \dagger Adjoint Operator (Hermitian Conjugate)
\(\cap\) \cap Intersection (set theory)
\(\cup\) \cup Union (set theory)

Math Snippets

Align

In block sections the align function is used to line up formulas horizontally. Each new line in the align block can have different anchor points, at &, &&, etc. These anchor points will match horizonally on each new line.

LaTeX:

\begin{align}
    f(x) & = x^2 + 4^x + 3 \\
         & = (x+3)(x+1)   && \text{factoring the polynomial} \\
         & && \{Now we can find the roots}
\end{align}

Output: \[ \begin{align} f(x) & = x^2 + 4^x + 3 \\ & = (x+3)(x+1) && \text{factoring the polynomial} \\ & && \text{Now we can find the roots} \end{align} \]

Piecewise Functions

LaTeX:

\usepackage{amsmath}
\[
    f(x) = \begin{cases}
        \frac{1}{2} \text{ $x$ is heads} \\
        \frac{1}{2} \text{ $x$ is tails}
    \end{cases}
\]

Output: \[ f(x) = \begin{cases} \frac{1}{2} \text{ $x$ is heads} \\ \frac{1}{2} \text{ $x$ is tails} \end{cases} \]

Symbols

The complete list of symbols can be found on CTAN, but it has wandered in the past. This includes all font symbols, arrows, mathematical characters, and musical symbols, and more.

My LaTeX Document Templates

My Tex templates. - Homework - Presentation - Beamer Theme


Notes on Computers

AWS · Bash · C · C++ · Cyber Security · Git · LaTeX · Linux · Networking · Python · Raspberry Pi · Tools · Vim

Notes on Math & Physics

Information Theory · Linear Algebra · Solid State Physics


Copyright 2021 · Eric D. Weise