# Useful LaTeX Packages

This reference introduces you to the LaTeX packages I load using a snippet every time I start a new LaTeX document (using the article document class). Before you read through my examples, you should familiarize yourself with the texdoc command. This command can be entered in a command prompt followed by the package you want to look up (e.g., texdoc amsthm). This will present you with a manual for the package in PDF form. A web-friendly alternative is http://texdoc.net/pkg/packagename, where packagename is replaced with the desired package (e.g., amsthm).

# amsmath and amssymb

amsmath Documentation amssymb Documentation These indispensible packages make the formatting of mathematics a breeze. amsmath includes support for all manner of equations, multi-line equations, matrices, etc. amssymb provides support for many mathematical symbols. See, for example, the real-number and natural-number set notation using the mathbb command:

 $$\mathbb{N} \in \mathbb{R}$$

(Here’s a link to a handy symbol reference and a complete symbol reference)

# amsthm

amsthm Documentation I use this to make nicely formatted theorems. First you need to add the following line to your preamble:

 \newtheorem{thm}{Theorem}

You could, in fact, change thm and Theorem to any other pair of environment tag and displayed name you want. For example, changing thm to axm and Theorem to Axiom will allow you to have nicely formatted axioms (or lemmas or squirrels or … you get the point). The next step is using your newly created environment to identify the theorems in your text:

 \begin{axm} Agents have rational expectations. \end{axm}

# ctable

ctable Documentation While it may take a moment to get used to these tables compared to those available by default, the slight learning curve is totally worth it. Here’s a quick example of a table using the ctable package:

 \ctable[ caption=Table Title label=tbl:tblname ]{ccc}{ \tnote[]{This note does not have a corresponding mark} \tnote[a]{This note does have a mark} }{ \toprule ~ & Cooperate & Defect \\ %\midrule % midrules are useful for tables with a clear heading row Cooperate & (8,8) & (0,10) \\ Defect & (10,0) & (3,3) \\ \bottomrule }

# fullpage

fullpage Documentation I use this package to use up more of the white space LaTeX leaves by default. To use it, simply include the package.

# graphicx

graphicx Documentation This is the de facto king of graphics packages. Sublime Text 2 includes a handy snippet triggered by typing bfigure then pressing the TAB key:

 \begin{figure}[tb] \begin{center} \includegraphics[]{} \end{center} \caption{Caption here} \label{fig:figure1} \end{figure}

Now all you need to do is add the filename to the snippet. Suppose you want to add an image called picture1.png which is located in the same folder as your LaTeX source (i.e., the *.tex file). Simply add picture1 like so:

 \includegraphics[width=\textwidth]{picture1}

You can also leave the width option blank, or set the width to a specific measurement (e.g., width=4in). I have found the LaTeX wikibook an immensely useful resource when working with graphics in LaTeX.

# microtype

microtype Documentation microtype improves the look of your document with the magic of microtypography. In brief, microtype adjusts font widths and the protrusion of punctuation to make lines look more evenly spaced and aligned. Like fullpage, microtype can be activated by simply including it.

# natbib

natbib Documentation natbib takes care of citation formatting. I like to use the apalike option to sidestep the inconsistencies of author-name formatting in my BibTeX file:

 \bibliographystyle{apalike}

# setspace

setspace Documentation This package makes it simple to change the spacing of your document. I often print my drafts in 1.5 spacing:

 \onehalfspacing

# Closing Remarks

There are many packages not mentioned here (see the big list for some examples). My hope is this has given you a good starting point. Be sure to check out my tutorial on setting up snippets in Sublime Text 2 for a slick way to load these packages with each new document.