As we have seen, the document class is the “type” of the document. On the other hand, a package is a piece of LaTeX code that enables certain features, e.g., typesetting of theorems, or multiple columns, or additional mathematical symbols, and many others. There exist hundreds or even thousands of LaTeX packages for various purposes; the CTAN site enables searching through package database.
Using a package is as simple as typing
\usepackage{package name}
in the preamble. For example, when you want to use the amsrefs package (which is very helpful when typesetting bibliographies), you could say
\usepackage{amsrefs}
From time to time it is necessary to modify the working of the package in some way. In LaTeX, one does it by specifying package options, i.e., keywords put before the \usepackage
command and the package name in brackets. (The available options are described in the package documentation.) For example, if you want amsrefs to use initials of the authors instead of full given names, you could type
\usepackage[initials]{amsrefs}
There are literally thousands of LaTeX packages available; we will cover the basics of a few of them.
NB: in a similar way, we can apply options to the \documentclass
command; they can modify the look of the document in various ways. For example, when the default, 10pt font is too small, we can say for example
\documentclass[12pt]{article}