How to install $\LaTeX$

So, you want to produce professional quality typesetting of mathematical formulae? Look no further. You will need a distribution of LaTeX. A tremendous resource in addition to (or perhaps even in place of) this article is the LaTeX Project.

Windows: MiKTeX or ProTeXt

Since ProTeXt is MiKTeX based I will only cover the installation of ProTeXt. However ProTeXt is probably easier to install and anyway, it is the recommended distribution for Windows from the LaTeX Project.

MiKTeX is the recommended distribution for Windows machines. You can download MiKTeX from their website. However, please read on to see which download you should choose. On the page linked above, there is a “recommended download” and “other downloads.” Be sure to look in the “other downloads” section. Why?

  • If you have a 64-bit processor, you should be downloading the corresponding version of MiKTeX.

  • You need to decide between the Basic Installer and the Net Installer (or, if you often work on several computers which you do not own you may want to consider the portable version).

Installation types

  • Basic Installer: To install a basic TeX/LaTeX system, download and run this installer. MiKTeX has the ability to install needed packages automatically (on-the-fly), i.e., this installer is suitable for computers connected to the Internet.

  • Net Installer: This installer allows you download all packages and install a complete TeX/LaTeX system.

The Basic Installer will create a smaller installation of LaTeX but whenever you use a new package (which can be quite often), MiKTeX will need to download it from the internet. It can do this automatically, but it can be inconvenient if you are trying to work at a time when you don’t have internet access.

The Net Installer creates a much larger installation of LaTeX but you will have all the packages at your fingertips. However, you should still run the updater from time to time.

Updating

When you have installed MiKTeX, it is recommended that you run the update wizard in order to get the latest updates. I would also recommend running the update wizard once every 6 months or so to make sure you have the latest versions (or more often if you find that some package isn’t working properly).

Testing

After installation, you will need to test your distribution and choose a editor in which to author your LaTeX documents (this will be addressed in a future post).

Mac OS X: MacTeX

MacTeX is a version of the TeXlive distribution (see GNU/Linux section below for details) which is specifically packaged for OS X (10.5 or higher with special instructions for El Capitan). MacTeX comes in two flavors from which you will need to choose:

  • Full MacTeX: This version contains a complete LaTeX installation, but at the cost of being rather large (>2GB).

  • BasicTeX: This is a minimal version of LaTeX, so you will most likely need to install packages via the TeX Live Utility.

The full version of MacTeX comes bundled with a number of GUI applications including the LaTeX editor TeXShop as well as the reference manager BibDesk among others. This is probably the easiest way to get up and running.

If you are really tight on space or you eschew having things lying around that you don’t need, then BasicTeX might be the choice for you.

Updating

TeX Live, and hence MacTeX, have an annual release cycle. I recommend updating you entire MacTeX distribution every year so you have the latest packages and compiler binaries. When you install the new versions of MacTeX they will be placed beside the old ones and you can choose which release you are using through a preference pane in System Preferences. You can uninstall old releases if you want the space.

Testing

After installation, you will need to test your distribution and, if you selected BasicTeX, choose a editor in which to author your LaTeX documents (this will be addressed in a future post).

GNU/Linux: TeXLive

Although TeX Live can be installed manually, this is not recommended. Rather, it should be installed with your package manager from your distributions package repositories. The method for achieving this depends on your distribution, so you should consult the relevant documentation. In general you will need to be root (or use privilege escalation with sudo) to install systemwide. However, as some examples:

  • Ubuntu: Search ‘TeX Live’ in the Ubuntu Software Center; or, for those comfortable with the shell and the apt-get package manager: # apt-get install texlive

  • Arch Linux: via the pacman package manager: # pacman -S texlive-most

  • Fedora: via yum: # yum install texlive

All of the above commands will create fairly complete but monolithic installations of TeX Live. This can be circumvented through various means so that you get a more personalized installation. On Fedora this is managed through the TeX Live schemes, and on Arch it is managed by installing individual packages from the texlive-most group.

Updating

You should update TeX Live through your package manager when updates are available through your distributions repositories unless you desperately need newer versions of certain packages, which you can then update using the TeX Live Manager tlmgr command line interface. If you really need a newer version, you can install TeX Live manually by following the instructions provided on their website (just be sure to uninstall it through your package manager first! Otherwise you will have two copies of the binaries and the ones that get used will be determined by your $PATH).

Testing

You should test the functionality of your distribution as described below.

Testing your installation

The ‘user-friendly’ way

Use a LaTeX editor of your choice depending on your operating system (e.g., TeX Studio, TeXnicCenter, TeXShop, Kile, etc.) to create the minimal TeX file hello-world.tex whose contents are:

\documentclass{article}
\begin{document}
Hello World!
\end{document}

Then click the typeset button to produce the dvi or pdf (depending on the presets of the editor you chose). The output should be a single page with the text ‘Hello World!’

The minimalistic way

Use a text editor (Microsoft Word is not a text editor, it is a word processor which is another animal entirely) of your choice to create the minimal TeX file hello-world.tex as described above. Then, in a shell, navigate to the directory containing this file and execute:

$ latex hello-world.tex # produces: hello-world.dvi
$ pdflatex hello-world.tex # produces: hello-world.pdf
Jireh Loreaux
Jireh Loreaux
Assistant Professor of Mathematics

My research interests include operator theory and operator algebras