If you're starting from scratch then this is a three step process as described here (pdf). If you're installing the program from CD, then skip to Step 3. The CD I'm referring to is a local product which contains the setup wizard, the MikTeX package repository, a "localtexmf" directory containing some useful additional packages, and the installers for GhostScript, GSView and WinShell. See me for a copy.
Step 1. Download a small (431 KB) wizard program called "setup.exe". This program is available from CTAN at:
http://www.ctan.org/tex-archive/systems/win32/miktex/setup/
Do not go to sourceforge.net (some links will try to direct you there) to download the large file named "basic-miktex-2.4.2207.exe". It's better (in my opinion) to let the wizard manage the large download from one of the many CTAN mirror sites.
Download the setup program to a convenient location (e.g. in a folder called "latex setup" on the Desktop).
Step 2. Run "setup.exe". The first screen gives you a choice between "Download only" and "Install". We want to download the MikTeX packages to a local package repository. You can choose between the "small", "large" and "total" installations. The small package is a 23 MB download, and the large is 64 MB. If you use the small installation then it's easy to add packages later from the internet using the MikTeX Update Wizard (a part of the program installation). Even with the small package this step will be very time consuming on a slow dial-up connection. Instead I recommend you download the entire large package onto a flash memory device or onto a cd here at school (I will write several of these myself which you may borrow). Then transfer it (and the setup program) to your hard drive at home.
When you run the program it will ask you to select one of the many mirror sites. When I did the download I kept getting file download errors. Keep running the setup wizard and you will eventually get the entire set of files.
If you plan to keep the package repository on your hard drive, move it to a logical location (e.g. "C:\MikTeX Packages" instead of on your Desktop). Then after you've installed MikTeX you can point it to that directory (Run the program MikTeX Options and click on the Packages tab). I prefer to keep a package repository on CD or else get missing packages on the fly from the internet.
Step 3. Run "setup.exe" again to install MikTeX from the local package repository. The installer will ask you several questions.
The program installation will take a few minutes. When it's finished, check that it has added (prepended, in fact) the directory "C:\texmf\mixtex\bin" to your PATH variable. To check this, open a command prompt and type "PATH" followed by a return. If "C:\texmf\mixtex\bin" is not in your path, then go to Control Panel-System-Advanced (in Windows XP), click on the Environment Variables tab, and then edit the PATH. You must close and reopen the cmd prompt to see the change.
Next we must install Ghostscript and GSView. Ghostscript is an interpreter for converting postscript to various other formats. This includes printing on a pcl printer (i.e. the usual kind) and saving as pdf. GSView is the associated viewer.
You can visit the Ghostscript home page to read about it, but to get the program you'll end up eventually at the University of Wisconsin mirror. So go directly to www.cs.wisc.edu/~ghost/doc/AFPL/get853.htm and download the file named gs853w32.exe. This is a 9.3 MB self extracting installer for Windows. The 8.53 in the file name refers to the Ghostscript version, so this may change as new versions are released. Always make sure that you have the latest stable release, and that your Ghostscript and GSView versions are compatible.
Obtain GSView from the same site at www.cs.wisc.edu/~ghost/gsview/get47.htm. The file to download is called gsv47w32.exe (1.5 MB).
Both installations are straightforward.
Install Ghostscript first, remembering to remove the space from "Program Files" (i.e. C:\ProgramFiles\gs). Check the "All Users" box if you like, and you definitely must download the Ghostscript fonts. The fonts are a collection of Adobe Type 1 outline fonts, including the Type 1 versions of the LaTeX "computer modern" fonts.
Next install GSView. Here I also removed the space from the installation path.
Be sure that you install WinShell after the other steps above.
You can get the most recent version from the author's site here or from CTAN here. The file you want is called WinShell30.exe and it is another self extracting installer (2.2 MB). Download and run this file to install the program (the defaults work fine). When the install is finished you can run the program.
There is one very important change which you should make to the default installation. Go to Options-Program Calls, and scroll to the entry for DVI->PS. Where it says cmd line, change the -D600 to -Ppdf, so the entire line should read
-Ppdf "%s.dvi"
This change tells dvips to use the Adobe Type 1 fonts mentioned above, rather than the default bitmapped "pk" fonts. Using the pk fonts results in awful looking, blurry pdf's.
Open a new document in WinShell, and type the following:
\documentclass{article}
\begin{document}
Hello world
\end{document}
Save the document (by default the extension should be *.tex, which is what you want). Now press the buttons for
When you make changes to your document you don't have to press all these buttons! In particular, you don't have to run LaTeX and pdfLaTeX on the same document. Usually it's either one or the other, depending on any graphics which you have included. Furthermore, once you have opened GSView, you can keep the program open and the viewer will automatically update as the postscript file is changed.
Try changing the file to this:
\documentclass{article}
\begin{document}
Hello world. Here is some math:
$$
\int\frac{1}{x}\,dx = \ln|x|+C
$$
\end{document}
Press the "DVIPS" button, and WinShell will automatically save the tex file, run LaTeX and then DVIPS. Maximize GSView (assuming the program is still running) and look at the result. Don't worry if you don't understand what all these LaTeX commands do. For the moment we're just trying to verify that LaTeX and WinShell are running correctly.
If you're not using the CD, then download "wise.sty" from the files section above, and place it in the path "C:\localtexmf\tex\latex" (you may need to create the subdirectories). This file is used by several of the samples on this site, and installing it gives us a chance to check that the localtexmf directory is functioning properly.
If you're installing from CD then you can copy the "localtexmf" directory on the CD onto the locatexmf you created when you installed MikTeX. The directory on the CD is empty except for wise.sty.
The localtexmf directory is your location for adding files which need to be in a common path. You might, for example, decide to add a logo graphic to all of your files, or create a collection of user defined colors. You can also modify wise.sty (please rename it first!) to create your own aliases and call your own preferred packages automatically.
Next (VERY IMPORTANT!) update the MikTeX file names database: Run the program Start-MikTeX-MikTeX Options, and press the top button labeled "Refresh Now". Any time you make changes to the localtexmf directory you must perform this step so that MikTeX can find the files.
Now change the file again to read:
\documentclass{article}
\usepackage{wise}
\begin{document}
Hello world. Here is some more math:
$$
\dom f = \{ x\in\R \mid x \ne 3 \}
$$
\end{document}
Re-TeX the file to make sure MikTeX found the style file. Note that "\dom" and "\R" are both aliases from wise.sty, so without that file this code would not compile.
That's it. Congratulations! You have successfully installed LaTeX.