The following is not neccesary for getting a running system. It should
not be carried out if your system cannot go through the test after the installation. It is a more experimental
section, and is is biased towards my preferences, so you should pick
the steps you like. I have not documented the intructions in great
detail, so you will need to be an advanced user of windows. If you
think I can improve the instructions, feel free to contact me.
The uninstall instructions do not
cover all of the additions described here.
Adding packages to Miktex
The intention is that the localtexmf directory be the root of
the place where all local files (e.g., .sty and .bib files) (as
opposed
to Miktex package distributions) live. So local
.bib files go in C:\Local TeX Files\bibtex\misc
.sty files go in C:\Local TeX Files\tex\latex\misc
Each time you add a file to one of those directories, you must run
Miktex Options and select "Refresh Now" under file name database on
the general tab.
An example .emacs
This assumes that you have installed everything to c:\ as described
and have gone through most of the steps below. I have tried to write
explanations to most of the content, so you should be able to edit it
to your own needs. If you copy it, you will not need to do the 'insert
the following lines into your c:\.emacs' instructions below. Since
emacs will not startup properly with this .emacs until all
the packages are installed, some of the tests will fail.
Unzip startup2.zip to c:\ (the value of HOME)
Insert the commands you wish from the created file
".emacs.advanced" into your .emacs file.
Installing AUCTeX 11.82
[ The development page of AUCTeX now offers binary versions of
Emacs+AUCTeX, see this
page. I am not too happy using development versions in my work,
though... ]
Don't do this if your AucTeX 11.14 does not work! If you have
cygwin or Mingw, you probably do not need MSYS. See the
INSTALL.windows file that comes with the AUCTeX distribution.
Download MSYS-1.0.10.exe
from Mingw. Install by
executing the file, accepting everything.
Download auctex-11.82.zip from AUCTeX. Unzip auctex-11.82.zip into a temporary directory, eg. c:\temp\
After installing MSYS, you should have an icon on your
desktop called "MSYS shell". Click on this, to start the
shell. In the shell, execute the following commands
cd c:/temp/auctex-11.82
./configure --prefix='C:/Program Files/emacs' --with-texmf-dir='C:/Local TeX Files' --disable-preview
At this point, you should see a lot of info showing in the
window. Hopefully it ends with
Congratulations! Configuration of AUCTeX is complete.
Type "make" at the prompt to build.
Now, at the prompt, type
make
And watch a lot of text appearing on the screen, hopefully
ending with "Congratulations! Build is complete". The final
step is to call
make install
Now, exit the shell by typing
exit
In your .emacs, find the line "(load "tex-site")" and
replace it with the following lines
Copy the shortcut to your profiles "Send to" folder (eg. located
in c:\winnt\profiles\administrator\send to).
The "Start in" sets the initial directory for Emacs. You can have
several shortcuts to Emacs with different "Start in" directories. Note
that ~/ will always be HOME.
The "Send to" enables rightclicking on any file and choosing "send to"
Emacs, which will cause the file to be opened by emacs.
File Associations (gnuserv)
In explorer in the Tools menu, go to Folder Options.
On the "File Types" tab, create a new file type called TeX.
Click the advanced tab
You can change the icon (There are a few icons in C:\Program
Files\emacs\etc\icons)
Create a new Action called Edit and defined by
"C:\program files\emacs\bin\gnuclientw.exe" "%1"
Define or edit associations/actions for other file types, e.g. .bib,
.txt. The Edit action for the existing file type .html (called
"Microsoft HTML document 5.0" on my system) can be used by Internet
Explorer, so that when you choose "edit" from within IE, the file
opens in Emacs. After creating the edit action, open Internet
explorer, click Tools/Internet options. Choose the Programs tab and
gnuclientw should be in the list of HTML editors.
Inverse search in YAP
In Yap, choose View/Options DVI Inverse Search, and in the Program field,
choose "NTEmacs (Single Instance) (auto-detected)".
Letter paper
To get dvips to use letter-paper instead of A4, insert the following
line in the file c:\program files\texmf\dvips\config\config.ps
Move lacheck.exe to C:\Program Files\MiKTeX 2.5\miktex\bin
Test: At a DOS prompt, run "lacheck file.tex", where
file.tex is a latex-file. It should spit out some suggestions. In
Emacs in latex-mode, choose the "Check" command from the Command menu.
In your Autoexec.bat or System/environment, define the variable
BIBINPUTS pointing to the directory where you keep your .bib
files.
The BIBINPUTS is used by bib-cite which comes with auctex. Reftex also
uses it. However, Bibtex does not use it, so check the miktex local
guide for setting the searchpath for bibtex. (In a personal miktex.ini
file).
Be sure to have your R\bin directory in your path,
e.g. c:\program files\r\r-2.3.0\bin (or whatever statistics program
you use - put the bin-directory in your path)
(to speed up ess, in Emacs, call C-u 0 M-x byte-recompile-directory
and choose c:\program files\emacs\site-lisp\ess\lisp).
Matlab mode
Put matlab.el into c:\program files\emacs\site-lisp\matlab