Skip to Main Content

LaTeX document preparation system

LaTeX Packages

A basic TeX distribution has limited functionality. To create a LaTeX document, you'll often need additional packages that provide extra options or features. There are a wide variety of packages available, generally categorized into two types:

  1. Packages that modify the layout or structure of your document, such as multicol.
  2. Packages that add new or enhanced content to your document, such as graphicx or amsmath

To use a package in your document, you must include it in the preamble, before the \begin{document} statement. The syntax for this is \usepackage{ }, with the package name inside the brackets.

  • Square brackets in \usepackage[]{} helps you to provide further arguments and additional setting for each package. You can add multiple arguments using comma in square brackets.
  • You can list multiple packages within the \usepackage{}

We would need to use LaTeX code such as the following to create the preamble:

\documentclass{article}

\usepackage{graphicx}

\usepackage[margin=1in]{geometry]

\usepackage[doublespacing]{setspace}

\usepackage{amsfonts, amsmath, amssymb}

\usepackage{multicol}

\title{Title of Your Project}

\author{Your Name}

\date{\today}

\begin{document}

\maketitle

\end{document}

Here's a screenshot of LaTeX preamble with included packages:

Screenshot of the code mentioned in text

The text in cyan color inside the square brackets are options for the called package, altering how it affects the document. These options are specified in the package's documentation. Function names (like \begin{}) are in blue color to differentiate between text, argument, and functions.