📖 Guide
LaTeX — Complete Reference
Quick reference for LaTeX document structure, math mode, formatting, and common packages.
81 commands across 9 categories
Document StructureText FormattingMath ModeSymbols & OperatorsLists & TablesFigures & FloatsReferences & CitationsPackagesCommon Patterns
Document Structure
| Command | Description |
|---|---|
\documentclass{article} | Set document class (article, report, book, beamer) |
\usepackage{name} | Import a package |
\begin{document} ... \end{document} | Document body wrapper |
\title{} \author{} \date{} | Set document metadata |
\maketitle | Render title block |
\tableofcontents | Generate table of contents |
\section{Title} | Numbered section heading |
\subsection{Title} | Numbered subsection heading |
\paragraph{Title} | Paragraph-level heading (no number) |
\input{file} | Include another .tex file |
Text Formatting
| Command | Description |
|---|---|
\textbf{text} | Bold text |
\textit{text} | Italic text |
\underline{text} | Underlined text |
\texttt{text} | Monospace / typewriter text |
\emph{text} | Emphasis (toggles italic) |
\textsc{text} | Small caps |
{\large text} | Increase font size (also \Large, \LARGE, \huge) |
{\small text} | Decrease font size (also \footnotesize, \tiny) |
\footnote{text} | Add a footnote |
\verb|code| | Inline verbatim / code |
Math Mode
| Command | Description |
|---|---|
$ ... $e.g. $x^2 + y^2 = z^2$ | Inline math mode |
\[ ... \] | Display math (centered, no number) |
\begin{equation} ... \end{equation} | Numbered equation |
\begin{align} ... \end{align} | Aligned multi-line equations (use & for alignment, \\ for newline) |
\frac{a}{b} | Fraction a/b |
x^{n} | Superscript (exponent) |
x_{i} | Subscript |
\sqrt[n]{x} | nth root of x |
\sum_{i=0}^{n} | Summation with limits |
\int_{a}^{b} | Definite integral |
Symbols & Operators
| Command | Description |
|---|---|
\alpha \beta \gamma \delta | Greek letters (lowercase) |
\Gamma \Delta \Omega | Greek letters (uppercase) |
\leq \geq \neq | Comparison: ≤ ≥ ≠ |
\times \div \cdot \pm | Arithmetic operators |
\infty | Infinity symbol ∞ |
\partial | Partial derivative symbol ∂ |
\in \notin \subset \cup \cap | Set operators |
\rightarrow \Rightarrow \leftrightarrow | Arrows → ⇒ ↔ |
\forall \exists \nabla | Logic and calculus symbols |
\hat{x} \bar{x} \vec{x} \dot{x} | Accents over symbols |
Lists & Tables
| Command | Description |
|---|---|
\begin{itemize} \item ... \end{itemize} | Bulleted list |
\begin{enumerate} \item ... \end{enumerate} | Numbered list |
\begin{description} \item[Term] ... \end{description} | Description list |
\begin{tabular}{|l|c|r|} | Table with left, center, right columns |
cell & cell \\ \hline | Table row with cells and horizontal line |
\multicolumn{2}{c}{text} | Span multiple columns |
\begin{tabularx}{\textwidth}{|X|X|} | Auto-width table (requires tabularx) |
\cline{1-2} | Partial horizontal line in table |
Figures & Floats
| Command | Description |
|---|---|
\begin{figure}[htbp] ... \end{figure} | Float container for figures |
\includegraphics[width=0.8\textwidth]{file} | Insert image (requires graphicx) |
\caption{Description} | Add caption to figure or table |
\label{fig:name} | Add label for cross-referencing |
\begin{table}[h] ... \end{table} | Float container for tables |
\centering | Center content within a float |
\begin{minipage}{0.5\textwidth} | Side-by-side content blocks |
\listoffigures | Generate list of figures |
References & Citations
| Command | Description |
|---|---|
\ref{label} | Reference a numbered label (section, figure, etc.) |
\pageref{label} | Reference page number of a label |
\cite{key} | Cite a bibliography entry |
\bibliography{bibfile} | Specify .bib file for references |
\bibliographystyle{plain} | Set citation style (plain, alpha, ieee) |
\begin{thebibliography}{9} | Manual bibliography environment |
\bibitem{key} Author, Title... | Manual bibliography entry |
\usepackage[backend=biber]{biblatex} | Modern bibliography with biblatex |
Packages
| Command | Description |
|---|---|
\usepackage{amsmath} | Extended math environments (align, cases, etc.) |
\usepackage{graphicx} | Image inclusion support |
\usepackage{hyperref} | Clickable links and PDF bookmarks |
\usepackage{geometry} | Page margin and layout control |
\usepackage{listings} | Source code listings with syntax highlighting |
\usepackage{xcolor} | Color support for text and backgrounds |
\usepackage{tikz} | Programmatic drawing and diagrams |
\usepackage{booktabs} | Professional-quality tables (toprule, midrule) |
\usepackage{fancyhdr} | Custom headers and footers |
Common Patterns
| Command | Description |
|---|---|
\newcommand{\cmd}[1]{definition}e.g. \newcommand{\R}{\mathbb{R}} | Define a custom command |
\renewcommand{\cmd}{def} | Redefine an existing command |
\newenvironment{name}{before}{after} | Define a custom environment |
% comment | Single-line comment (not rendered) |
\usepackage[utf8]{inputenc} | UTF-8 input encoding (default in modern LaTeX) |
\clearpage | Force page break and flush all floats |
\vspace{1cm} \hspace{1cm} | Add vertical or horizontal space |
~ | Non-breaking space (e.g., Figure~\ref{fig:x}) |
📖 Free, searchable command reference. Bookmark this page for quick access.