4/2/12

Installing LaTeX on Windows XP

I'm currently working on a take home midterm for an aeroelasticity course I'm taking at San Diego State. I'm encouraged to build my document using the AIAA template in LaTeX. Unfortunately we use Windows XP at work, so I'm limited to that platform. To accomplish this goal, I downloaded the most recent build of MiKTeX. It was also recommended that I install TeXnicCenter. As a JEdit user, I also installed LaTeXTools, which is also available via repository. Unfortunately, when I tried to build sample.tex, I received the following warnings:
This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)
entering extended mode

("U:/Documents/Courses/San Diego State/EM 731/aiaa-latex-4.0.1/Copy of sample.t
ex"
LaTeX2e <2011/06/27>
Babel and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
("U:\Documents\Courses\San Diego State\EM 731\aiaa-latex-4.0.1\aiaa-tc.cls"
Document Class: aiaa-tc 2007/09/20 v4.0.1 AIAA technical conference paper
("C:\Program Files (x86)\MikTeX\tex\latex\base\article.cls"
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
("C:\Program Files (x86)\MikTeX\tex\latex\base\size10.clo"))
("C:\Program Files (x86)\MikTeX\tex\latex\psnfss\times.sty")
("C:\Program Files (x86)\MikTeX\tex\latex\geometry\geometry.sty"
("C:\Program Files (x86)\MikTeX\tex\latex\graphics\keyval.sty")
("C:\Program Files (x86)\MikTeX\tex\generic\oberdiek\ifpdf.sty")
("C:\Program Files (x86)\MikTeX\tex\generic\oberdiek\ifvtex.sty")
("C:\Program Files (x86)\MikTeX\tex\generic\ifxetex\ifxetex.sty")
("C:\Program Files (x86)\MikTeX\tex\latex\geometry\geometry.cfg"))
("C:\Program Files (x86)\MikTeX\tex\latex\fancyhdr\fancyhdr.sty")
("C:\Program Files (x86)\MikTeX\tex\latex\lastpage\lastpage.sty")
("C:\Program Files (x86)\MikTeX\tex\latex\graphics\graphicx.sty"
("C:\Program Files (x86)\MikTeX\tex\latex\graphics\graphics.sty"
("C:\Program Files (x86)\MikTeX\tex\latex\graphics\trig.sty")
("C:\Program Files (x86)\MikTeX\tex\latex\00miktex\graphics.cfg")
("C:\Program Files (x86)\MikTeX\tex\latex\pdftex-def\pdftex.def"
("C:\Program Files (x86)\MikTeX\tex\generic\oberdiek\infwarerr.sty")
("C:\Program Files (x86)\MikTeX\tex\generic\oberdiek\ltxcmds.sty"))))
("C:\Program Files (x86)\MikTeX\tex\latex\graphics\color.sty"
("C:\Program Files (x86)\MikTeX\tex\latex\00miktex\color.cfg"))
("C:\Program Files (x86)\MikTeX\tex\latex\hyperref\hyperref.sty"
("C:\Program Files (x86)\MikTeX\tex\generic\oberdiek\hobsub-hyperref.sty"
("C:\Program Files (x86)\MikTeX\tex\generic\oberdiek\hobsub-generic.sty"))
("C:\Program Files (x86)\MikTeX\tex\latex\oberdiek\kvoptions.sty")
("C:\Program Files (x86)\MikTeX\tex\latex\hyperref\pd1enc.def")
("C:\Program Files (x86)\MikTeX\tex\latex\00miktex\hyperref.cfg")

Package hyperref Warning: Option `pagecolor' is not available anymore.

("C:\Program Files (x86)\MikTeX\tex\latex\ltxmisc\url.sty"))

Package hyperref Message: Driver (autodetected): hpdftex.

("C:\Program Files (x86)\MikTeX\tex\latex\hyperref\hpdftex.def"
("C:\Program Files (x86)\MikTeX\tex\latex\oberdiek\rerunfilecheck.sty"))
("C:\Program Files (x86)\MikTeX\tex\latex\natbib\natbib.sty")

! LaTeX Error: File `hypernat.sty' not found.

Type X to quit or to proceed,
or enter new name. (Default extension: sty)
It seems as though hypernat.sty is nowhere to be found. Luckily, the AIAA README.txt recommends doing the following:
you will need to obtain these missing packages from CTAN
http://ctan.org.  For package installation instructions and
answers to many other questions, see the UK TeX FAQ,

 http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes

or search the news:comp.text.tex group via,

 http://groups.google.com/group/comp.text.tex
I was able to find the missing package here. Apparently hypernat.sty is not part of the MiKTeX repository, so I had to download the zip file found here. Per the MiKTeX manual instructions, I created C:\Program Files (x86)\MikTeX\localsty and stored hypernat.sty there. I then opened MiKTeX options and tried to add C:\Program Files (x86)\MikTeX\localsty to the list of root directories. Unfortunately I received the following error:
not a TDS-compliant root directory
To fix this problem, I found this link helpful and changed the directory structure to C:\Program Files (x86)\MikTeX\localsty\tex\latex\ with hypernat.sty inside. The list of frequently asked questions was helpful as well.

After that, TeXworks prompted me to add a few more packages that are part of the repository and I was able to write out the AIAA PDF template.

Now time to do that take home midterm. I have a theory that my few hours installing LaTeX will be time well spent. After all, I've spent far too many hours in the past entering equations manually into Microsoft Word...

Hope this helps someone at some point!

Update: The Wikibook can be found here. Lots of great stuff in there!