Resurchify

# Packages in LaTeX

## Introduction

Most of the functionalities and utilities are by default provided by the LaTeX. However, in certain situations, it becomes necessary to include some special functionalities and utilities. For those special situations, LaTeX allows you to include different packages.

# Using LaTeX Packages

Use \usepackage command in order to import the new package. This command is added in the preamble of your document.

Consider the below example:

 1 2 3 4 5 6 7 \documentclass{article} \usepackage{NAME_OF_PACKAGE} \begin{document} ... \end{document} 

## Installing Packages in LaTeX

Generally, most of the packages are pre-installed by default in your system if you are using Mac or Linux operating system. However, in the case of Windows, the MiKTeX bundle will popup the download window when you include the package in your document. On the other hand, for the Ubuntu operating system, you can install texlive-full from your package manager or from the command terminal in to get all the packages.

## Purpose of using Packages in LaTeX

You can find innumerable packages available for LaTex providing different features. In this tutorial, for the sake of simplicity, we will discuss one of the most used amsmath.

Let us understand the purpose of using packages in LaTeX with an example. LaTex provides the environment called environment equation in order to perform the math typesetting. All the content written using this environment is printed in a math mode.

 1 2 3 4 5 6 7 8 9 \documentclass{article} \begin{document} \begin{equation} g(x) = x^3 \end{equation} \end{document} 

This will produce the output:

$$g(x) = x^3~(1)$$

By default, LaTeX inserts the equation number as you can see in the above example. However, in some cases, you don't need the equation number. Hence, to do so you need to include amsmath package in your code.

## How to include/use package in LaTeX

In certain cases, you don't need by default auto-numbering feature and it becomes necessary and important to remove auto-numbering. For this, you need to include the package called amsmath and add the Asterix(*) symbol just after the keyword equation.

Check the below example:

 1 2 3 4 5 6 7 8 9 \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} g(x) = x^3 \end{equation*} 

The above example will produce the output without the equation number:

$$g(x) = x^3$$