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.

Download

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!

27 Comments

  1. 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.

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

  3. [...] 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 [...]

  4. 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.

  5. 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 :)

    • Frits says:

      I’ve never used varioref, but from the documentation I find it to be especially handy for page references. However, in scientific papers and documents like that, page references are almost never used. Therefore I’d chose cleveref over varioref. But thankfully they are complementary ;-)

  6. 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 !

  7. [...] 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 [...]

  8. 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.”

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

  10. 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 …

  11. 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

  12. Almageste says:

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

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

  14. 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.

  15. 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

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>