This appendix lists the packages used throughout this book, organised by purpose. For each package, the table shows the recommended loading position (early = before most packages; late = after most packages), a brief description, and the chapter where it is covered in depth.
All packages listed here are included in a standard TeX Live or MiKTeX installation. Install any missing package with tlmgr install packagename.
B.1 Page layout and geometry
Package
Load
Description
geometry
Early
Page dimensions, margins, paper size. Replaces manual \hoffset/\voffset settings. See Chapter 8.
fancyhdr
After geometry
Running headers and footers. Provides \pagestyle{fancy} with \fancyhead, \fancyfoot, \fancyhf. See Chapters 8, 20, 22.
titlesec
Any
Section heading formatting. Replaces \@startsection. Provides \titleformat and \titlespacing. See Chapter 19.
setspace
Any
Line spacing via \setstretch{factor}, \onehalfspacing, \doublespacing. Prefer \linespread for small adjustments.
parskip
Any
Replaces paragraph indentation with vertical space. Suitable for documents with short paragraphs.
multicol
Any
Multiple columns with automatic balancing. More flexible than the twocolumn class option.
wrapfig
Any
Wrap text around figures. Use with caution near page boundaries. See Chapter 23.
B.2 Typography and fonts
Package
Load
Description
fontenc
Early
Output font encoding. Always use [T1] for Western European documents with pdfLaTeX.
inputenc
Early
Input encoding. Use [utf8] with pdfLaTeX. Not needed with XeLaTeX or LuaLaTeX.
fontspec
Early
Font selection by name for XeLaTeX and LuaLaTeX. Provides \setmainfont, \setsansfont, \setmonofont. See Chapters 3, 12.
microtype
After fonts
Microtypography: character protrusion, font expansion, tracking. Major quality improvement. See Chapter 26.
csquotes
Any
Language-aware quotation marks. \textquote{...} and \enquote{...}. Integrates with babel/polyglossia. See Chapter 25.
textcomp
After fontenc
Additional text symbols: \texteuro, \textdegree, \textregistered. Often loaded automatically.
B.3 Mathematics
Package
Load
Description
amsmath
Any
Extended math environments: align, gather, multline, cases. Improved \frac, operators. Essential for any mathematical document. See Chapter 12.
amssymb
Any
Additional mathematical symbols: \mathbb{R}, \square, \therefore, etc.
amsthm
Any
Theorem environments. Provides \newtheorem with plain, definition, and remark styles. See Chapter 12.