2.7 Installation under MS Windows
Installation of preview-latex has been verified to work (in order of
increasing operating speed) with current CVS versions of
GNU Emacs, and with both Cygwin and native versions of XEmacs.
Since various fixes in the installation procedure have been
incorporated for Windows lately, you should install the current release
of preview-latex.
Ok, here are the steps to perform:
- The installation of preview-latex will require the MSYS tool set from
http://www.mingw.org. If you have the Cygwin tool set from
http://cygwin.com installed, that should do just fine as well,
but it is quite larger and slower. If you need to compile Emacs/XEmacs
from source, you'll also need compilers and stuff that are also
available for both of those tool sets. Compiling Emacs is outside of
the scope of this manual: good luck. preview-latex itself does not
(yet) require a C compiler for installation. Without either of
those tool sets, however, you would need to generate your various
Makefile copies from the respective Makefile.in files by
hand, and that would mean quite a lot of guesswork. There is no sense
going into too much details here: the instructions would change severely
between versions, and the above tool sets are easy enough to acquire to
make manual configuration unnecessary.
- Install a current version of XEmacs (such as 21.4.10) from
http://www.xemacs.org or try getting and compiling an
CVS version of GNU Emacs from
http://savannah.gnu.org/cvs/?group=emacs.
- You need a working TeX installation. One popular installation under
Windows is MikTeX. Another much more
extensive system is TeX live
which is rather close to its Unix cousins.
- Install AUCTeX according to
its instructions. It is recommended that you install at least 11.14.
At the current point of time this means that you should forego
installing AUCTeX from the XEmacs package repository (version 1.35):
it is not up to date. If you insist, there are patch instructions for
older versions of AUCTeX in
Prerequisites.
- You need a copy of GhostScript.
- Perl is needed for building the
documentation. When we release tarballs for preview-latex, we also
pregenerate the documentation. If you install the prebuilt-docs
tarball over the normal source after configuration is complete, the
dependencies for the documentation will be satisfied without needing to
run Perl. If you are building preview-latex from CVS,
however, you'll need Perl.
- Now the fun stuff starts. Unpack the preview-latex distribution into
some installation directory. Do not unpack it right into your
Emacs' own directories: the installation will copy the material that
needs to be placed there. Keep the installation directory separate:
you can remove its contents after installation completes. Since you
are reading this, you probably have already unpacked preview-latex,
but it should still be easy to move it elsewhere now.
- Ready for takeoff. Start some shell (typically bash) capable of
running configure, change into the installation directory and
call
./configure
with appropriate options.
Typical options you'll want to specify will be
--with-emacs
- if you are installing Emacs. You can use
--with-emacs=/path/to/emacs to specify the name of the
installed Emacs executable, complete with its path if necessary (if
Emacs is not within a directory specified in your PATH
environment setting).
--with-xemacs
- If you are using XEmacs, of course use --with-xemacs in the same
manner.
--with-texmf-dir=
dir- This will specify the directory where your TeX installation sits. If
your TeX installation does not conform to the TDS (TeX directory
standard), you may need to specify more options to get everything in
place. See
Configure
for more information about the available options.
--with-lispdir=
/dir- This may be needed for GNU Emacs installation, but hopefully
configure should figure this out by itself. Don't use this for
XEmacs, rather use
--with-packagedir=
/dir- which gives the location of the package directory for XEmacs where
stuff should be installed. Again, hopefully this is not necessary to
specify.
Some executables might not be found in your path. That is not a good
idea, but you can get around by specifying environment variables to
configure:
GS="/path/to/GhostScript" ./configure ...
should work for this purpose.
- If you need to use the prebuilt documentation (see above), now is the
time to unpack it over the rest of the installation directory.
- Run
make
in the installation directory (we have had one report
that Emacs did not manage to byte compile the Elisp files, and that had
to be done by hand. No idea about what might have gone wrong there).
- Run
make install
in the installation directory.
- The above will leave you with a file preview-latex.el in the
installation directory. Emacs must load this on startup. It may be
that your version of Emacs already has a place where it keeps such
startup files. If not, copy it into a place in your Emacs
load-path
, then put
(load "preview-latex.el" nil t t)
into your .emacs file or, if you have more than one user using
your system, into the global default.el file.
- Load circ.tex into Emacs or XEmacs and see if you can generate
previews.
If this barfs and tells you that image type png is not
supported, try adding the line
(setq preview-image-type 'pnm)
at the end of your installed version of preview-latex.el. If
this helps, complain to wherever you got your Emacs: all current
Emacs/XEmacs versions capable of running preview-latex by now can be
compiled to support PNG images. Which is important, because
PNM files take away vast amount of disk space, and
thus also of load/save time.
Well, that about is all. Have fun!