LaTex Frequently used commands

Chester Wyke June 23, 2023 Updated: April 15, 2025 #latex

Symbol List

University of Oregon Symbol List

Local Copy

Aligned Math Environment

\begin{equation*}
    \begin{aligned}
        x + y &= 5 \\
        x &= 5 - y \\
    \end{aligned}
\end{equation*}

Center each line individually

\begin{center}
\end{center}

Centers everything in its argument

\centerline{}

Bold

\textbf{}

Underline

\underline{}

Italic

\textit{}

Summation with super and subscript

$\sum_{i=1}^{n} i$

Binomial coefficient or all combinations

N Choose K

{n \choose k}

Table

\begin{center}
    \begin{tabular}{ | m{8em} | m{8em}| m{8em} | m{8em} | }
        \hline
        \textbf{Operation} & \textbf{Actual cost} & \textbf{Amortized cost} & \textbf{Change in bank account}
        \\
        \hline
        1st & 2nd & 3rd & 4th \\
        \hline
    \end{tabular}
\end{center}

Enumerated Document List (Alternate counting types)

\begin{enumerate}
    [label=\alph*)]
    \begin{enumerate}
        [label=\roman*)]
        \begin{enumerate}
            [label=\arabic*)]
        \end{enumerate}
    \end{enumerate}
\end{enumerate}

Dots

Writing line (like multiple full stops)

$\ldots$

Vertically centered like multiple \cdot

$\cdots$

Vertical dots

$\vdots$

Diagonal dots

$\ddots$

URL

Source: https://www.overleaf.com/learn/latex/Hyperlinks

Requires \usepackage{hyperref}

\url{}
\href{URL}{DISPLAYED TEXT}

Vertically stacked things

Puts one thing on top of the other without a line between

\underset{bottom}{top}

Brackets

\lbrace \rbrace
\langle \rangle
\lfloor \rfloor

ARG MIN / MAX

\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

Horizontal Rule

Source: https://tex.stackexchange.com/questions/19579/horizontal-line-spanning-the-entire-document-in-latex/19582

Entire width of the page

\noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}

2cm long line

\noindent\rule{2cm}{0.4pt}

Text width

\makebox[\linewidth]{\rule{\textwidth}{0.4pt}}

Special Chars

Lower case cursive L

$\ell$

Figure

\begin{figure}[!htb]
    \centering
    \includegraphics[width=\textwidth]{filename}
    \caption{\label{fig:my-label} Caption Here}
\end{figure}

Include a PDF in document

\includepdf[pages=-,pagecommand={}]{file.pdf}

Start numbering from page after title

\begin{document}
    \maketitle
    \thispagestyle{empty}
    \clearpage
    \pagenumbering{arabic}
\end{document}