Complete guide to essential LaTeX packages. Learn what each package does, how to use it, and see practical examples.
This reference covers the most important LaTeX packages organized by functionality. Each entry includes the package purpose, basic usage, and practical examples.
Package installation: LaTeX Cloud Studio includes all standard packages. No installation needed - just use \usepackage{packagename}.
\usepackage{amsthm}% Define theorem environments\newtheorem{theorem}{Theorem}[section]\newtheorem{lemma}[theorem]{Lemma}\newtheorem{corollary}[theorem]{Corollary}\theoremstyle{definition}\newtheorem{definition}[theorem]{Definition}\theoremstyle{remark}\newtheorem{remark}[theorem]{Remark}% Usage\begin{theorem}[Fermat's Last Theorem]No three positive integers $a$, $b$, and $c$ satisfy...\end{theorem}\begin{proof}The proof is left as an exercise.\end{proof}
\usepackage{array}% New column types\newcolumntype{C}{>{\centering\arraybackslash}X}\newcolumntype{R}{>{\raggedleft\arraybackslash}X}% Advanced tables\begin{tabular}{>{\bfseries}l c r} \hline Bold Header & Center & Right \\ \hline Row 1 & Data & Values \\ Row 2 & More & Data \\ \hline\end{tabular}
\usepackage{enumitem}% Customized itemize\begin{itemize}[label=\textbullet, itemsep=0pt] \item First item \item Second item\end{itemize}% Customized enumerate\begin{enumerate}[label=(\alph*), start=3] \item Third item (c) \item Fourth item (d)\end{enumerate}% Inline lists\begin{enumerate*}[label=(\roman*)] \item One \item Two \item Three\end{enumerate*}% Description lists\begin{description}[style=nextline] \item[Long term] Description on next line \item[Short] Inline description\end{description}
\usepackage{minted}% Inline code\mintinline{python}{print("Hello")}% Code block\begin{minted}[linenos,bgcolor=gray!10]{python}def quicksort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x for x in arr if x > pivot] return quicksort(left) + middle + quicksort(right)\end{minted}% External file\inputminted{javascript}{script.js}
\usepackage{verbatim}% Basic verbatim\begin{verbatim}Raw text with $special% characters&\end{verbatim}% Comment out sections\begin{comment}This entire section is commented outand will not appear in the output.\end{comment}% Verbatim input from file\verbatiminput{file.txt}
\usepackage{fontspec}% Set main fonts\setmainfont{Times New Roman}\setsansfont{Arial}\setmonofont{Courier New}% Font features\setmainfont[ Ligatures=TeX, Numbers=OldStyle]{Minion Pro}% Custom font families\newfontfamily\myfont{Comic Sans MS}{\myfont This text uses Comic Sans}
\usepackage{multicol}% Two-column text\begin{multicols}{2} This text will be formatted in two columns. LaTeX automatically balances the columns.\end{multicols}% Three columns with separator\begin{multicols}{3}[\section{Three Column Section}] Content in three columns with a section header.\end{multicols}% Column break\begin{multicols}{2} First column content. \columnbreak Second column content.\end{multicols}
\usepackage{setspace}% Document-wide spacing\singlespacing\onehalfspacing\doublespacing\setstretch{1.5}% Local spacing\begin{spacing}{1.8} This paragraph has 1.8 line spacing.\end{spacing}\begin{singlespace} This paragraph is single-spaced.\end{singlespace}\begin{doublespace} This paragraph is double-spaced.\end{doublespace}
% Avoid these combinations:% \usepackage{subfigure} % Old package% \usepackage{subcaption} % Use this instead% \usepackage{cite} % Basic citations% \usepackage{natbib} % Use this for advanced citations% \usepackage{hyperref}% \usepackage{cleveref} % Load cleveref AFTER hyperref