LaTeX quick reference

The commands people look up most, as you type them. The Insert and Format menus write many of these for you.

How to…

Figures

Tables

Equations

References and citations

Review and submission

Document layout

Document structure

You typeYou get
\documentclass[11pt]{article}The class: article, report, book, beamer, or a journal's own
\usepackage{amsmath}Load a package (in the preamble, before \begin{document})
\title{…} \author{…} \date{…} \maketitleThe title block
\begin{abstract} … \end{abstract}The abstract
\chapter{…} \section{…} \subsection{…} \subsubsection{…} \paragraph{…}Headings; \section*{…} is unnumbered
\tableofcontentsThe table of contents (compile twice)
\input{file} · \include{chapter}Bring in another .tex file; \include starts a new page
\appendixWhat follows is lettered A, B, …
\newpage · \clearpageA new page; \clearpage also places waiting figures

Text

You typeYou get
\textbf{…} · \emph{…} · \textit{…}Bold · emphasis · italic
\underline{…} · \texttt{…} · \textsc{…}Underline · monospace · small capitals
{\small …} · {\large …} · {\Large …}Size: \tiny \footnotesize \small \normalsize \large \Large \LARGE \huge
\footnote{…}A footnote
\href{https://…}{text} · \url{…}A link (needs hyperref)
`` … '' · ` … 'Opening and closing double · single quotes
-- · ---En dash (pages 1--9) · em dash
~A space that never breaks (Fig.~\ref{f})
\\ · \parNew line · new paragraph (or an empty line)
\% \$ \& \# \_ \{ \}The special characters themselves
\textbackslash · \textasciitilde\ and ~

Lists

You typeYou get
\begin{itemize} \item … \end{itemize}Bullets
\begin{enumerate} \item … \end{enumerate}Numbers
\begin{description} \item[Term] … \end{description}Terms and definitions

Maths

You typeYou get
$ … $Maths in the line of text
\[ … \]Displayed maths, unnumbered
\begin{equation} … \label{eq:x} \end{equation}Numbered equation; cite it with \eqref{eq:x}
\begin{align} a &= b \\ c &= d \end{align}Aligned equations (amsmath); align* is unnumbered
x^{2} · x_{i} · x_{i}^{2}Superscript · subscript · both
\frac{a}{b} · \sqrt{x} · \sqrt[n]{x}Fraction · square root · n-th root
\sum_{i=1}^{n} · \prod · \int_{a}^{b} · \lim_{x \to 0}Sum · product · integral · limit
\left( … \right)Brackets that grow with their contents
\mathbf{x} · \mathrm{d} · \mathcal{L} · \mathbb{R}Bold · upright · calligraphic · blackboard (amssymb)
\hat{x} · \bar{x} · \tilde{x} · \vec{x} · \dot{x}Accents
\begin{pmatrix} a & b \\ c & d \end{pmatrix}A matrix in round brackets (bmatrix: square)
\text{…}Ordinary text inside maths (amsmath)

Symbols

Inside maths. Insert → Symbol inserts them for you.

You typeYou get
\alpha \beta \gamma \delta \epsilon \theta \lambda \mu \pi \sigma \phi \omegaGreek letters; capitals: \Gamma \Delta \Theta \Lambda \Sigma \Phi \Omega
\leq \geq \neq \approx \sim \equiv \propto≤ ≥ ≠ ≈ ∼ ≡ ∝
\times \cdot \pm \div \circ× · ± ÷ ∘
\in \notin \subset \subseteq \cup \cap \emptyset∈ ∉ ⊂ ⊆ ∪ ∩ ∅
\forall \exists \neg \land \lor∀ ∃ ¬ ∧ ∨
\rightarrow \Rightarrow \leftrightarrow \mapsto→ ⇒ ↔ ↦
\infty \partial \nabla \ldots \cdots∞ ∂ ∇ … ⋯

Figures and tables

You typeYou get
\usepackage{graphicx}Needed for \includegraphics
\begin{figure}[t] \centering \includegraphics[width=\columnwidth]{figures/f.pdf} \caption{…} \label{fig:f} \end{figure}A figure; [t] top, [b] bottom, [h] here, [p] own page
\begin{table}[t] \caption{…} \begin{tabular}{lcr} a & b & c \\ \hline \end{tabular} \end{table}A table: l, c, r align columns; & separates cells; \\ ends a row
\toprule \midrule \bottomruleBetter table rules (booktabs)
\multicolumn{2}{c}{…}A cell across two columns

References and citations

You typeYou get
\label{sec:intro} · \ref{sec:intro} · \pageref{…}Name a place · refer to its number · its page
\eqref{eq:x} · \cref{…}An equation number in brackets · a reference with its word (cleveref)
\cite{key} · \cite{a,b}Cite one or several works
\citep{key} · \citet{key}(Author, year) · Author (year) — natbib
\parencite{key} · \textcite{key}The same with biblatex
\bibliographystyle{plain} \bibliography{refs}A BibTeX bibliography from refs.bib
\addbibresource{refs.bib} … \printbibliographyA biblatex bibliography (compiled with biber)
\nocite{*}List every entry of the .bib, cited or not

Spacing and layout

You typeYou get
\vspace{1em} · \hspace{1em}Vertical · horizontal space
\noindentNo indent for this paragraph
\centering · \begin{center} … \end{center}Centre text or a figure
\usepackage[margin=2.5cm]{geometry}Page margins
\linewidth · \columnwidth · \textwidthWidths to size figures by