# 9 essential LaTeX packages everyone should use

Originally, I started this blog to help the very beginners of LaTeX. I have to admit that the horizon got a little wider since the day howtoTeX.com was launched and that is (in my eyes) not a bad thing. Challenges will only keep you motivated! However, today a post that is very useful for starters. In this post, I sum up 9 LaTeX packages that are absolutely obligatory for every LaTeX user. Let’s start!

The following packages are just listed in a random order. The first line of each section presents the way I use the package most of the time.

## amsmath

\usepackage{amsmath}

The amsmath package is the most important package of the AMS collection. This package introduces several improvements for math environments. For example, with amsmath comes the align environment. Al my display equations are captured in an align (or align* for unnumbered equations) environment, even if there’s nothing to align. This PracTeX journal by Lars Madsen encourages the use of the amsmath environments.

## geometry

\usepackage[a4paper]{geometry}

To adjust the margins of pages, the geometry package comes in handy. The default page margins of the entire document can be altered with package options (the syntax between square brackets after \usepackage). I use this package most of the time to create A4 paper margins, which is done with the a4paper option.

With this package it is also possible to change the margins of one particular page as was described in this post. Another post on howtoTeX.com about the geometry package is about resetting two-sided document margins.

## graphicx

\usepackage{graphicx}

Nothing special about the graphicx package, but it probably is the most important of all. This package introduces the \includegraphics command, which is needed for inserting figures.

## nag

\RequirePackage[l2tabu, orthodox]{nag}

This package deserved a post on howtoTeX.com already. Actually, this package doesn’t do anything as long as your syntax is right. Load the package in the first lines of your preamble (even before the \documentclass command). It then checks for obsolete LaTeX packages and outdated commands. The documentation can be found here.

## microtype

\usepackage{microtype}

The microtype package improves the spacing between words and letters. It does a lot more and most people won’t notice the difference. But still, the resulting document will be easier to read and looks better when microtype is loaded. Load this package after fonts, if any, as the package behavior is dependent on this font.

## siunitx

\usepackage{siunitx}

The siunitx package greatly simplifies TeXing when writing scientific documents, where units and numbers are a big part of the writing. This package adds commands like \num for typesetting numbers in all sorts of ways and \si for units. The commands I use a lot are \SI and \SIrange. For example, \SI{10}{\hertz} results in ‘10Hz‘ in text (this is especially useful to prevent typo’s; I tend to write HZ or hz a lot instead of Hz). The \SIrange command requires one more input variable: \SIrange{10}{100}{\hertz} produces ‘10Hz to 100Hz‘.

Note that the siunitx package was already featured in an earlier post on this blog.

## cleveref

\usepackage{cleveref}

Another fascinating LaTeX package is cleveref. This package introduces the \cref command. When using this command to make cross-references, instead of \ref or \eqref, a word is placed in front of the reference according to the type of reference: fig. for figures, eq. for equations. Hence, another LaTeX package that simplifies the writing. The package was earlier mentioned in this post. In that post it is also shown how to change the words in front of references.

## hyperref

\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}

The possibilities with hyperref seem to be endless. The most prominent feature of this package is the hyperlinking; when referring to a figure, the reference becomes hyperlinked such that it takes you to the corresponding figure when you click on it.
Also, hyperref allows you to add PDF metadata to the compiled PDF.
One last note on this package: as a rule of thumb it should be loaded at the end of the preamble, after all the other packages. A few exceptions exist, such as the cleveref package that is also mentioned in this post. Hence, cleveref should be loaded after hyperref. More exceptions are listed in this post on TeX.SE.

## booktabs

\usepackage{booktabs}

The booktabs package allows you to create tables without vertical separators. These separators are just unnecessary and plain ugly. Creating a table with booktabs is however more of a pain than the normal way of creating LaTeX tables. Therefore, I dedicated a post on how to create nice tables with the booktabs package earlier.

A small latex file, mostly a preamble, is available for downloading here. In this file, all packages from above are already included. Happy TeXing!

## Did I miss something?

Of course, this post is a great one for discussion. I’m interested in the packages you think should be represented in this list. Leave a comment below!

1. La sola cosa che devi fare ora è darmi la tua
fiducia e la tua parola che una volta che avrai scoperto i trucchi non li dirai a tutti i tuoi amici.

2. Wonderful blog you have here but I was wondering if you
knew of any user discussion forums that cover the same
topics talked about here? I’d really love to be a part
of online community where I can get responses from other knowledgeable people that
share the same interest. If you have any suggestions, please
let me know. Thanks a lot!

• Leeser says:

http:\\tex.stackexcahnge.com

• Leeser says:

oops should have been tex.stackexchange.com

3. Truly nno matter if someone doesn’t know then its up to other
users tjat they will assist, so here it takes place.

4. Ed says:

Moderate your comments dude. There is a lot of comment spam in here.

5. Using these kinds of numerous facets of photography is what produces the right picture and could add some 4th dimension and inventive depth for your work.You plainly need some originality, so proceed, undertake some button snaps and more importantly have enjoyable by using it! If you have a Digital slr camera, each of the features and configurations you’ll need for trick photography already are incorporated inside your camera.

6. You really make it appear so easy along with your presentation but I find this matter to
be actually one thing which I think I would
never understand. It kind of feels too complex and extremely vast for me.
I’m taking a look ahead to your subsequent submit, I’ll attempt to get the
cling of it!

7. This is a useful list of packages, and I think it is good to keep it fairly minimal. I was especially happy to see siunitx and cleveref on it. I know others mentioned it too, but I would have included Biblatex as well.
I think I will add some of these to my slides (http://thomas.arildsen.org/2013/08/06/modern-latex-usage/) as well, thanks.

• Frits says:

I’m glad you found this useful! If I had to add one more package it would probably be Biblatex, yes.

8. [...] of available packages. “9 Essential Packages Everyone Should Use” are suggested in this excellent blog post here (on an overall really excellent site about [...]

9. [...] the reason I’m adding this here is I found this article on basic packages everyone should use (9 essential LaTeX packages everyone should use) and I must say I really like the cleveref package. Most of the others are pretty stand but that [...]

10. Jami says:

Excellent post. I was checking continuously this blog and I’m impressed! Very helpful info particularly the last part :) I care for such info a lot. I was seeking this particular information for a very long time. Thank you and best of luck.

11. hintze says:

hi! nice list. i totally agree with almost every package you mention (despite geometry, for the same reason it was mentioned before). but i am wondering for cleveref.. how do you think it compares to varioref?

as far as i can see, both packages are complementary.. they can be used together, but varioref has to be loaded at first (as you can probably find out by googling around).. i was using varioref for years now, i think i have to add cleveref as well ;) thanks :)

12. Maïeul says:

For author in humanities, this list is not the best of needed package ;-)

For example amsmath and siunitx are not needed, but biblatex yes !

• Frits says:

Can’t argue with that actually. However I still think 90% of the LaTeX use is for technical documents.

13. [...] packages that you should include in your .tex file are presented at howToTex.com as well: 9 essential LaTeX packages everyone should use Be aware that the geometry paper might break your page layout. Therefore, I recommend to not use [...]

14. Marcel says:

great and smart list, thanks for that! I think xspace is also a useful package.

“\xspace should be used at the end of a macro designed to be used mainlyin text. It adds a space unless the macro is followed by certain punctuation characters.”

• Almageste says:

I don’t see xspace as a basic package. This is mainly for developers which most users are not. But well, this starts to be soon useful when using LaTeX regularly.

• Frits says:

I was actually thinking about adding xspace to the list at the time I wrote the post. However I have to agree with Almageste: I don’t see it as an absolute essential package. It is very handy though!

• Clemens says:

xspace is nice but using it can result in wrong output, actually: link to a mrunix.de forum post of mine regarding this matter.

15. [...] 9 essential LaTeX packages everyone should use | howtoTeX.com … [...]

16. Karl Berry says:

FWIW, Jim Hefferon wrote a two-page document with pointers to recommended latex packages at my request. I wanted “texdoc latex” to return something generally useful …

• Frits says:

I had never heard of that document before, but it’s pretty useful! I’ll add it to the resources section on this blog.

17. Clemens says:

Funny: I just wanted to suggest the same packages as Stefan :)

I’d say both “amsmath” (or “mathtools”, respectively) and “siunitx” are for documents in natural science and mathematics mostly and thus probably not interesting for everyone. Similar things might be true for “biblatex” but I want to mention it anyway.

And I must admit I never used “nag” before…

Best

18. Almageste says:

I would add the mathtools package as a great complement to amsmath. Otherwise, nice idea to group your most used packages.

19. You don’t really need geometry if you use KomaScript, this documentclasses have their own page-settings options (see typearea).

20. I would definitively suggest todonotes.This allows you to create \todo marks in your code and they are also typeset into the document. So you know where there is something todo. ;)

• Frits says:

Yes, todonotes is a handy package indeed! Although I use it a lot, I don’t consider it essential. But that’s just my opinion! I don’t like the fact that it requires the tikz package, which significantly slows down the compilation process.

21. Nice list! I would add:

with LaTeX and pdfLaTeX:

– fontenc for T1 font encoding
– inputenc for UTF-8 support
– babel for language specific commands and shortcuts and hyphenation

with XeLaTeX:

– fontspec as interface for font settings
– polyglossia as replacement for babel

• Frits says:

Thanks for the input, I agree with all five!