Next: Search paths, Previous: Microsoft Windows, Up: Installation
In interactive mode, or when given the -V option (the default
when running Asymptote on a single file under MSDOS),
Asymptote will automatically invoke the PostScript
viewer gv (under UNIX) or gsview (under
MSDOS; available from
http://www.cs.wisc.edu/~ghost/gsview/) to display
graphical output. These defaults may be overridden with the
configuration variable psviewer.
Configuration variables are most easily set as Asymptote
variables in the configuration file (by default, .asy/config.asy in the
user's home directory or %USERPROFILE%\.asy\config.asy under
MSDOS); see configuration file.
Here are the default values of several important configuration variables.
import settings; psviewer="gv"; pdfviewer="xpdf"; gs="gs"; python="";
Under MSDOS:
import settings; psviewer="c:\Program Files\Ghostgum\gsview\gsview32.exe"; pdfviewer="c:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"; gs="c:\Program Files\gs\gs8.54\bin\gswin32c.exe"; python="c:\Python24\python.exe";
For PDF format output, the gs setting specifies the
location of the PostScript-to-PDF processor gs
and pdfviewer specifies the location of the PDF
viewer. The graphical user interface may also require setting the
variable python if Python is installed in a nonstandard
location.
The configuration variable dir can be used to adjust the
search path (see Search paths).
By default, Asymptote attempts to center the figure on the
page, assuming that the paper type is letter. The default paper
type may be changed to a4 with the configuration variable
papertype. Alignment to other paper sizes can be obtained by setting the
configuration variables paperwidth and paperheight.
The following configuration variables normally do not require adjustment:
latex dvips convert display animate xasy
Configuration variables may also be set or overwritten with a command line option:
asy -psviewer=gsview -V venn
Alternatively, system environment versions of these configuration
variables may be set in the conventional way. The corresponding
environment variable name is obtained by converting the configuration
variable name to upper case and prepending ASYMPTOTE_:
For example, to set the environment variable
ASYMPTOTE_PSVIEWER="c:\Program Files\Ghostgum\gsview\gsview32.exe";under
Microsoft Windows XP:
Start button;
My Computer;
Properties from the popup menu;
Advanced tab;
Environment Variables button.
To properly support interactive mode, the PostScript viewer
should be capable of automatically redrawing whenever the output file is
updated. The default UNIX PostScript viewer gv
supports this
(via a SIGHUP signal). Users of ggv will need to
enable Watch file under Edit/Postscript Viewer
Preferences and gsview users will need to enable
Options/Auto Redisplay (however, under MSDOS it is still
necessary to click on the gsview window; under UNIX
one must manually redisplay by pressing the r key).
The patches supplied in the patches directory fix known bugs
in the UNIX PostScript viewer gv-3.5.8 and
gv-3.6.1. In particular, a bug in gv-3.6.1 requires
it to be explicitly configured with ./configure
--enable-signal-handle for it to work properly with
Asymptote's interactive mode (these patches will be in the
next release of gv).
After downloading gv-3.6.1 from http://ftp.gnu.org/gnu/gv/
and denoting the location of the Asymptote source directory by
SOURCE, here are the steps to install a properly
working gv (as the UNIX root user):
tar -zxf gv-3.6.1.tar.gz cd gv-3.6.1 cat SOURCE/patches/gv-3.6.1-*.patch | patch -p1 ./configure --enable-signal-handle make install