## 8 Packages and Styles

### 8.1 Packages

Packages are used to extend LaTeX's functionality and to define (or redefine) ways of typesetting. They are sometimes calles style files, and are given the extension .sty. To include a package in your LaTeX document you use the \usepackage command before the document environment begins, e.g.
 

\documentclass[12pt,draft]{book}

% Use the graphicx package for graphics
\usepackage{graphicx}

\begin{document}

 

There are many packages available, including:

• graphicx for images and graphics
• makeidx for creating indices and glossaries
• multicols lets you span multiple columns in tables
• citesort improves the way multiple citations are typeset
• rotating allows large tables to be set sideways on the page, amongst other things
• pstricks for diagrams
• fancyhdr defines \pagestyle{fancy} for nice page headers
• color (note US spelling) allows you to use coloured text
• palatino includes the palatino font family

### 8.2 Beamer

The beamer package is designed not for written documents, but for presentations to accompany talks. It changes a lot of LaTeX's typesetting rules, changes the style dramatically, and adds lots of new commands. It is very flexible and powerful, but does take some time to learn.

### Summary

• LaTeX's functionality can be extended using \usepackage
• Packages usually just add new commands and/or tweak existing ones, but they may change almost anything about how LaTeX works