Essential LaTeX Packages

LaTeX's power comes from its package ecosystem. There are over 6,000 packages on CTAN — but you only need to know a core set to handle 95% of documents well. This guide covers the most important packages by category with usage examples.

All packages listed here are pre-installed on Skozin — no configuration needed. Just add \usepackage{name} to your preamble and compile.

Document & Layout

geometry

Set page margins, paper size, and orientation. The single most commonly used layout package.

setspace

Control line spacing. Provides \singlespacing, \onehalfspacing, \doublespacing, and \setstretch{1.3}.

multicol

Create multi-column layouts within a page. Use \begin{multicols}{2}...\end{multicols} for two-column sections.

parskip

Add space between paragraphs and remove paragraph indentation — the modern style preferred in many documents.

Typography & Fonts

microtype

Enables character protrusion and font expansion. Dramatically reduces overfull hbox warnings and improves text appearance.

fontenc

Use T1 font encoding for correct hyphenation of words with accented characters and proper PDF copy-paste.

inputenc

Tell LaTeX your source file is UTF-8 encoded. Required for pdfLaTeX when using any non-ASCII characters.

lmodern

Load the Latin Modern fonts — a cleaner, scalable replacement for the default Computer Modern fonts.

Mathematics

amsmath

The essential math package. Provides align, gather, multline environments, and \text{}, \operatorname{}, \DeclareMathOperator.

amssymb

Extra math symbols: ℝ, ℤ, ℕ, ∅, ⊂, ≤, ≥, ∈ and hundreds more.

amsthm

Theorem-like environments: \newtheorem{thm}{Theorem} creates numbered theorems, lemmas, proofs, and definitions.

siunitx

Format numbers and physical units consistently: \SI{9.8}{m/s^2}, \num{3.14e6}, \ang{45}.

Figures & Tables

graphicx

Include images with \includegraphics. Supports PNG, JPEG, PDF, EPS. Provides scaling, rotation, and cropping options.

booktabs

Professional table rules: \toprule, \midrule, \bottomrule. Required for publication-quality tables.

subcaption

Place multiple figures or tables side by side with individual sub-captions (a), (b), etc.

float

Adds the [H] placement specifier that forces a float exactly where it appears in the source.

Code & Verbatim

listings

Syntax-highlighted code blocks for 80+ programming languages. Configure colours, line numbers, and frame style.

minted

Superior code highlighting using Python Pygments. Requires --shell-escape compile flag. Better output than listings.

verbatim

Enhanced verbatim environment and \verbatiminput{file.txt} to include a plain-text file as-is.

References & Links

hyperref

Makes all cross-references, citations, and URLs clickable in the PDF. Load last in preamble. hidelinks removes coloured boxes.

cleveref

Smart references: \cref{fig:arch} outputs 'Fig. 1' automatically. Handles plurals: \cref{fig:a,fig:b} → 'Figs. 1 and 2'.

url

Formats and line-wraps long URLs with \url{https://...}. Safer than typing URLs in text mode.

Package Loading Order Matters

Load hyperref last

hyperref must be loaded after almost all other packages to avoid conflicts. Only packages explicitly designed for it (like cleveref) should come after.

inputenc and fontenc come first

Load encoding packages before font packages and certainly before loading document content.

amsmath before amsthm

amsthm depends on amsmath; always load amsmath first.

Avoid loading conflicting packages

Don't load both subfig and subcaption — they solve the same problem differently and will conflict. Pick one.

Experiment with packages in the editor

All packages above are available instantly — no installation needed.

Start Writing

Continue Learning