A basic TeX distribution doesn't actually provide much functionality. In most cases, creating a LaTeX document will require packages that provide additional options or functionality. There is an extremely broad range of packages available, but they generally fall into two categories:
multicol
amsmath
Packages required by a document are called in the preamble of your LaTeX document, i.e. before the \begin{document}
statement. The syntax to do so is \usepackage{ }
, with the name of the package included in the brackets. Below is a screen capture of a LaTeX preamble that includes packages:
The orange text surrounded by square brackets in the above example are options for the package being called. These change how the package affects or is applied the document. Available options should be specified in the package's documentation.
Some common packages, like amsmath
, are included in most TeX distributions, but the vast majority are not. Any additional packages must be installed in order to compile the document.
When processing a .tex file which has packages listed in its preamble that are not yet installed, MikTeX can install those packages as part of the process of compiling the document.
MiKTeX and TeX Live both include package managers which will find and install a specified LaTeX package for the user.
For MiKTeX, this is done using the MiKTeX Console, a program which is included when MiKTeX is installed.
TeX Live (and hence MacTeX) installs packages via the command line or terminal. Installing the geometry
package, for example, can be done using the following commands:
tlmgr install geometry
with TeX Live (Linux)sudo tlmgr install geometry
with MacTeX (Mac)Additional information can be found below:
The packages listed below are likely to be of use regardless of discipline or motivation for using LaTeX.
multicol
allows for more columns and provides some extra functionality with the formatting of columns.geometry
package controls the size of the document, its margins, and other aspects of layout with more options than LaTeX on its own.graphicx
package provides extra functionality for including images into a document.hyperref
package allows for easier inclusion of hyperlinks in a LaTeX document.tikz
is the best option.