Life

Life

Sunday, June 15, 2008

Set up Latex Environment for Emacs in Windows

My first setting up follows the advice from http://www.math.aau.dk/~dethlef/Tips/, which is the ideal choice for the beginner. However, software used in this setting up is always being updated, e.g. miktex up to 2.7, emacs up to 22.2 etc. So there will be a little difference using those updated version.

For the preparation, downloading the proper version of software is the first priority. Google the key word "emacs in windows", and you will get several useful suggestion. If you are the fans of cygwin or mingw, you can set up those environment in the first place, then use linux distribution of those GNU software. In fact, it is totally unnecessary if you are not interested, although both cygwin and mingw are powerful tool in windows, especially if you want to set up emacs+gcc+gdb+make for C programming. Anyway, for emacs 22.2, there is binary distribution of windows http://www-uxsup.csx.cam.ac.uk/pub/gnu/windows/emacs/, and the installation is very simple: unzip the files into a directory and run addpm in \bin. You don't have to worry environment variable.

For miktex, current stable version is 2.7, which can be found from http://miktex.org/. For complete system installation, download the net installer, run it and choose "download". Save the files into a directory you can find afterwards. Run the installer again after finishing download, and choose "install" this time. Browse into the directory where you download the distribution. Still you don't have to worry environment variable.

For Auctex, the current stable version is 11.85. My suggestion is to use binary distribution from http://www.gnu.org/software/auctex/download-for-windows.html, if you don't want to get into trouble of compiling it yourself. Only thing you have to do is to unzip the files into emacs directory.

For Ghostscript and Gsview setting up, refer to the link in the beginning. Google it and find the latest verion. Install and add the directory \gsview\ gs\gs8.xx\lib \gs\gs8.xx\bin into environment variable PATH.

Ispell installation becomes simpler thanks to Akira Kakuto, who compile it by Microsoft VC++. Download binary distribution from http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html. Read the document README.w32.english. My suggestion is to unzip the .exe files in bin to bin directory of emacs, create directory C:\usr\local\lib, and unzip files in \dic into it. This is very simple and you don't have to worry about environment variable.

If you want to run emacs in server mode, or associate files type with emacs, one of choice is gnuclient. Actually the current emacs provides eamcsclient to do the same thing, but I find it a little difficult to set up. Download it from http://www.wyrdrune.com/index.html?gnuserv.html~main. Unzip it to \site-lisp\ and cut the .exe files in \Release to \bin of emacs. Then you can use "folder options" to make the association.