Where can I get LaTeX?

Introduction

To see all the LaTeX material available, go to the main Comprehensive Tex Archive Network (CTAN) or an Australian CTAN mirror. If you wish to keep these instructions on-screen whilst viewing another page, then rather than just clicking on the link, press shift-click. This will make it easier to follow instructions as to what to download.

The main site for MiKTeX for Windows is in Germany, at http://www.miktex.org/, another is in the United States at http://www.ctan.org/tex-archive/systems/win32/miktex/. Australian residents will find it faster to use the Australian MiKTeX mirror at http://mirror.aarnet.edu.au/pub/CTAN/systems/win32/miktex/. In the pages that follow, the Australian mirror site list listed first, followed by the main distribution site in brackets. For example: go to the Australian mirror (alternate site). The mirror site is generally faster, if you have access from an address within Australia. If elsewhere, there is no advantage in using the mirror site, and you should go straight to the alternate site.

The following notes are based on MiKTeX 2.5 running on Windows XP. Your specific setup may vary. If you download the "basic" distribution as recommended, it's around 45M. These are only intended to be a quick getting-started guide, together with some hints for customization - please see the official MiKTeX documentation (FAQ's, mailing list, installation notes) in the event of problems. After downloading any new system components, you should always scan your disk for viruses.

A note about saving files from your web browser: at various stages in this installation, you will be instructed to save files from a location (link) to your local hard drive. Do this via right-clicking on the link and then selecting Save Target As. In the dialog box that comes up, you should not change the file name, but you must change the "Save as type" box to "All Files". If you don't do this, Windows will add a ".txt" extension to your filename, and LaTeX (or any other program) will not be able to see the correct file type. Of course, this is not applicable where you are just clicking on a link to follow it to another page, it only applies where you are told to save a file.

You need three items of software:

  1. LaTeX - the formatting program to translate LaTeX commands in the source file. The specific port of LaTeX to Windows which we recommend is MiKTeX.
  2. A plain text editor - any will do, but the shareware winedt (main site) is highly recommended. Winedt includes buttons for LaTeX document creation, which you may prefer over having to run the command-line compilation as described below.
  3. A free editor is Crimson Editor.
  4. Another free editor is Notepad++.
  5. A PDF file viewer, such as Acrobat Reader. It's free from Adobe.

Preliminary Setup

  1. Although not strictly necessary, I recommend some changes to the windows interface to avoid confusion.
    Select MyComputer - Control Panel - Appearance and Themes - Folder Options.
    Select the option Show Hidden Files; to be ON;
    Select the option Hide Extensions for Known File Types; to be OFF;
    Select the option Show Full Path in the title bar; to be ON;
  2. Create a work folder, such as c:\MyWork\latex\test (or wherever you want to park your project files).
  3. Create the folder c:\archive\miktex (that is, on MyComputer, select Local C: Drive; then create archive, then in that folder create miktex. This will be used to store the downloaded files for the application. It is recommended that you backup this location to a CD or some other media after the download is completed, as it can be used to re-install MiKTeX at a later date if necessary.
  4. start-run and type cmd. You then have a Windows command prompt, and may use commands such as cd to change directory, dir to get a directory listing, md (or mkdir) to make a directory. Type help for more command information, and exit to close the command prompt window.
  5. Create a shortcut to a command prompt, by right-clicking on the desktop, selecting new-shortcut, and finding cmd.exe. When the shortcut is set up, right-click on it and select Properties, then select Start In, and change the string to c:\MyWork\latex\test.

Download & Install

  1. Go to the setup folder at MiKTeX setup folder (alternate site).
  2. Download setup.exe by right-clicking to save it to the download location such as c:\archive\miktex.
  3. Double-click on setup to run it.
  4. It is possible to install over the network, but it is suggested that you select the download only option to download all the files onto your hard drive. This will allow you to re-install it at a later date, if necessary.
  5. Select download, basic package set, and the country/site to one of the sites that is closest to you (to maximize the download speed). It is recommended you use defaults for other settings.
  6. When the download has completed, run the setup program setup.exe in the downloaded folder. This time you can select install from local repository (that is, from your hard drive). Again select basic package set.

Test

  1. Download the style files a4page.sty and a4pdf.sty to your work folder. Do this via right-clicking on the link and then selecting Save Target As. In the dialog box that comes up, you should not change the file name, but you must change the "Save as type" box to "All Files". If you don't do this, Windows will add a ".txt" extension to your filename, and LaTeX (or any other program) will not be able to see the correct file type.
  2. Download the file sample.tex
  3. Start the command window from the icon created previously, and type
    pdflatex sample
    Note that you may get warnings, which for the most part you can ignore (they will just scroll off the screen). The pdf document will still be created. Errors, however, will prevent the pdf document from being created. If any errors occur, the process will stop with a message. You then have to go back to the source tex file and see what is wrong.
  4. You should be able to open the resulting file sample.pdf using Acrobat Reader (if your file extensions are set up, you can just type sample.pdf on the command-line, and it will fire up Acrobat directly).
  5. Try opening the sample.tex file with a text editor, change the text, and repeat the above procedure.

Extra notes on MiKTeX installation (advanced use only)

Back