Setting Up LaTeX in Windows

LaTeX is Leslie Lamport's document markup language and document preparation system for the TeX typesetting language, which in turn was written by Donald E. Knuth to create (as he put it) "beautiful books" - especially mathematics books.

As a markup language, LaTeX is similar to HTML or XML, but it is far more powerful when it comes to "mathematical beauty". (Many publishers use it to prepare articles for journals like The Physical Review.)

The document is written as a plain text file containing both commands and textual content. This code is read by a compiler program which typesets the document, producing a binary device-independent (.dvi) file, which can later be converted to a standard format such as PostScript (.ps) or Portable Document Format (.pdf).

Thus you need 5 things to produce a document using LaTeX:

  1. A plain text editor to compose and edit your LaTeX input file.

  2. A TeX or LaTeX compiler to generate your .dvi file.

  3. A viewer for your .dvi file.

  4. A program to convert the .dvi file to the desired final format (usually .ps or .pdf).

  5. A document viewer to see your final document.

Under UNIX or Linux these steps are usually performed with several different programs: an editor such as pico or emacs, the tex or latex processor and xdvi viewer that come with virtually every distribution, the dvips or dvipdf converter and a viewer like xpdf or acroread.

In Windows several parts are often bundled together in one application that offers an editor, conversion to .dvi and display of the result; complete packages also include utilities to convert .dvi to .pdf as well.

There are several such packages available for Windows. We recommend MiKTeX, which provides all the features you will need and is free.

I.   Installing MiKTeX

Download and install MiKTeX 2.6 as instructed on that Website. MiKTeX 2.6 runs on Windows Vista, Windows XP, Windows 2000, Windows Me and Windows 98.

A new version, MiKTeX 2.7, is in beta test now and is scheduled for release in December 2007. If you volunteer to test it, please let us know how it works.

II.   Installing the Front End

You already have everything you need to make a LaTeX document but now we are going to make it easier. Currently you would have to open (for instance) Notepad, code your document, open a DOS command prompt, run the compiler on the document from the DOS command line, run another program to convert it to .pdf so you can view it and then do it all over again when you find a mistake. The front end program interfaces with MiKTeX to make writing documents easier. It automates the compiling processes for you. It also colour codes your document as you write it so it is easier to see the different parts of the document, making it easier to read.

We recommend WinEdt for this as it is designed to run with MiKTeX and automatically configures itself for your installation.

Download WinEdt here and execute the winedt55.exe setup file. The Installer Wizard will guide you through installation. After WinEdt's Installation is completed it is recommended that you let the installer start WinEdt for the first time.

WinEdt presents you with its Configuration Wizard where you can make some essential choices (e.g. your preferred method of wrapping) pertaining to WinEdt's Configuration and Appearance. It is strongly recommended that you do so before you start working on your TeX projects. In particular, you should make your choices pertaining to the Wrapping Method and Backup Strategy.

When you open up WinEdt to work on your document, you will see a bunch of grayed-out buttons on the right hand side of the tool bar. When you have a .tex document loaded up you can compile it by hitting the LaTeX button. Then you can view the document by pressing the View Dvi button. When you are done you can convert it to .pdf by hitting the Dvi to Pdf button. All nice and simple. Load up our sample TeX document and try it out!

III.   Installing the PDF viewer

This is the simple part. Once you create your document you need to view it. Most students will already have a PDF viewer on their computer but if you don't there are two good ones to choose from. Both of these are supported in WinEdt so you can open them up and view your document at the push of a button.

Adobe Acrobat Reader - A good program from the company that invented the PDF format. The Reader is free and easy to install but it has a lot of plugins and is slow to load. It can be quite annoying if you just want to quickly preview a change you made to your document.

GhostView - This is a nice Open Source alternative to Adobe. It's much faster to load and you can feel good that you are supporting the Open Source community. It is a little harder to install, though, as GhostView is a graphical user interface (GUI) for GhostScript, which you have to install separately.