[ English Version | Japanese Version ]

[ Contents | Operating Manual | New Features and Bugs Fixed | Technical Information | Authors ]

[ Options and Resources | Installation | FAQ
| Japanese Support (or Internationalization) | Fig Format 3.2 ]

# Installation

## Installling xfig

This is the installation procedure of xfig. See `README` file for more details. For information about how to use Japanese support facility, see also Japanese Support (or Internationalization).

1. Get the source of xfig(`xfig.3.2.1.tar.gz`) and gunzip and untar the file.

   You can get the source from www-epb.lbl.gov/xfig, ftp.x.org and its mirror sites in `/contrib/applications/drawing_tools/xfig`, or from any CTAN machine (ftp.tex.ac.uk, for example) in `/pub/archive/graphics`.

2. You also need ghostscript which can be found at prep.ai.mit.edu and its mirror sites, or at ftp.cs.wisc.edu/ghost/aladdin.
   It must be compiled with the pbmraw, ppmraw, pcx256, jpeg, and tiff24nc drivers.

3. Edit the `Imakefile` if you need to customize it.
   If you don't want GIF support, comment out ``#define USEGIF`' using the `XCOMM` comment directive (e.g. `XCOMM #define USEGIF`).

   To enable JPEG support, uncomment ``#define USEJPEG`' (this is the default) and modify the definition of `USEINSTALLEDJPEG` and `JPEGLIBDIR` if necessary. To use JPEG, you must have JPEG library (Version 5b or later). If you already if the JPEG library installed in your system area then make sure the USEINSTALLEDJPEG variable is uncommented (the default). If you don't have jpeg installed, get the source from ftp://ftp.uu.net/graphics/jpeg or ftp://ftp.x.org/contrib/libraries

   If you don't want JPEG support, comment out ``#define USEJPEG`'. using the `XCOMM` comment directive (e.g. `XCOMM #define USEGIF`).

   To enable XPM support, uncomment ``#define USEXPM`' and modify the definition of `XPMLIBDIR` if necessary. To use XPM, you must have XPM3 package (Version 3.4c or later).

   If you don't want XPM support, comment out ``#define USEXPM`', using the `XCOMM` comment directive (e.g. `XCOMM #define USEGIF`). This is the default.

   If you want to use Xaw3d (Three-D Athena Widget) library, uncomment ``XAWLIB = -lXaw3d`'. When Xaw3d is used instead of Xaw, the buttons will appear 3 dimensional. The Xaw3d library should be compiled without `-DARROW_SCROLLBAR`.

   Small Icons - If you have a small screen (e.g. 800x600 or so) you may want to use the small mode panel buttons for xfig. If so, uncomment the ``#define USESMALLICONS`' line.

   Check the `README` file for more information about specific systems.

4. Type `xmkmf` to generate a `Makefile` for your system.

5. Type `make` to compile xfig.

6. After the compilation has finished, type `make install` to copy the files to the appropriate directories.

   If you don't use `make install` and copy files manually, note that:

   the `xfig` executable should go in your command search path,
   `Fig.ad` and `Fig-color.ad` should go in the `app-defaults` directory with the names `Fig` and `Fig-color` respectively,
   The `CompKeyDB` file , the `Doc/html` directory, and the `xfig-howto.pdf` and `xfig.pdf` files should be copied into the directory specified by the `XFIGLIBDIR` variable in the `Imakefile`

7. Type `make install.man` to copy the manual pages to the appropriate directory.

## Installing TransFig/fig2dev

Here is the installation procedure for TransFig (fig2dev). See `README` file in for details.

1. Get the source of TransFig (`transfig.3.2.tar.gz`), and untar the file. It should be available at the same site as xfig.

2. You shouldn't need to change the toplevel `Imakefile` or the `Imakefile` in `fig2dev/dev`.
   Edit `fig2dev/Imakefile` if you need to customize it:

   If you don't want to use NFSS2 font selection for LaTeX text, comment out ``DDNFSS = -DNFSS`' using the `XCOMM` directive. If you don't want to use `epsfig` macros as distributes with LaTeX2e, comment out ``DDEPSF = -DEPSF`' in the same way.

   Hint: Users of LaTeX2e will probably want to include both of these options; users of LaTeX 2.09 will probably want to include neither.

   To enable JPEG support, uncomment ``#define USEJPEG`' (this is the default) and modify the definition of `USEINSTALLEDJPEG` and `JPEGLIBDIR` if necessary. To use JPEG, you must have JPEG library (Version 5b or later). If you already if the JPEG library installed in your system area then make sure the USEINSTALLEDJPEG variable is uncommented (the default). If you don't have jpeg installed, get the source from ftp://ftp.uu.net/graphics/jpeg or ftp://ftp.x.org/contrib/libraries

   If you don't want JPEG support, comment out ``#define USEJPEG`'. using the `XCOMM` comment directive (e.g. `XCOMM #define USEGIF`).

   To enable XPM support, uncomment ``#define USEXPM`' and change `XPMLIBDIR` if necessary. To use this facility, you must have XPM3 package (Version 3.4c or later).

   If you don't want XPM support, comment out ``#define USEXPM`'. This is the default.

   If your system DBM routines are in a separate library, uncomment ``DBMLIB = -lgdbm`'.

   For the Redhat distributions of Linux you may have to change it to ``DBMLIB to -ldb'`.
   For some Linuxes you may need to change it to ``DBMLIB = -ldbm'`.
   Slackware Linuxes use `-lgdbm`.

   If your system doesn't have `strcasecmp()` and/or `strncasecmp()`, uncomment

   ``HAVE_NO_STRCASECMP = -DHAVE_NO_STRCASECMP`'
   and/or
   ``HAVE_NO_STRNCASECMP = -DHAVE_NO_STRNCASECMP`'.

   If your system doesn't have `strstr()`, uncomment ``#define NOSTRSTR`'.

   If your system doesn't have `strerror()` (but support `sys_errlist`), uncomment ``NEED_STRERROR = -DNEED_STRERROR`'.

   On Solaris 2, you must add `-lnsl` to `LOCAL_LIBRARIES`. On HP-UX, you may need to reduce optimization level to `+O2`.

   See `README` and `Imakefile` for more details.

3. Type `xmkmf` to generate the `Makefile`.

4. Type `make Makefiles` to generate the `Makefile`s. Note the ``s'' in ``Makefiles''.

5. Type `make` to compile TransFig and fig2dev.

6. Type `make install` to copy the executable and files to the appropriate directories.

7. Type `make install.man` to copy the manual pages to the appropriate directory.

# Related Software

## Libraries

Xaw3d (Three-D Athena Widget) library
If Xaw3d is used instead of normal Xaw, widgets such as buttons will have 3-D appearance. It is available from ftp.x.org and its mirror sites in `/contrib/widgets`.

XPM3 package
This package provides facilities to handle images in XPM format. It is available from ftp.x.org and its mirror sites in `/contrib/libraries`.

JPEG library
This package provides facilities to handle images in JPEG format. The official distribution site is ftp.uu.net in `/graphics/jpeg`. It is also available from ftp.x.org and its mirror sites in `/contrib/libraries`.

## Applications

Here is a list of related applications. See also Scientific Applications on Linux (SAL) for more applications for Linux (many of them may also work on another UNIX-compatible platforms).

fig2dev (TransFig)
fig2dev provides the facility to convert figures created with xfig into various formats. You must have fig2dev because xfig invokes it when Exporting or Printing. fig2dev is part of the TransFig package.

GhostScript
xfig will invoke GhostScript (the `gs` command) when displaying an imported PostScript image. GhostScript is a product of the Free Software Foundation (Aladdin Enterprises owns the copyright), and it is available from prep.ai.mit.edu and its mirror sites, or ftp.cs.wisc.edu/ghost/aladdin.

cdraw2fig
Converts `Cheap Draw' format to Fig format. Cheap Draw 2.0 was written by Bob Pratt and is available from the UNIXPC archives at osu-cis.

GIMP
A comprehensive image manipulation program, GIMP (Gnu Image Manipulation Program) is freely available from http://www.gimp.org/.

gnuplot
gnuplot is a plotting package which can output in Fig and other formats. The official distribution site is ftp.dartmouth.edu, but you can also get it from the `comp.sources.misc` archive newsgroup.

gzip (gunzip)
xfig will invoke gunzip when reading gzipped files. gzip (gunzip) is a product of the Free Software Foundation, and is available from prep.ai.mit.edu and its mirror sites.

hp2xx
hp2xx can convert HP-GL files into other formats such as PostScript, LaTeX or Fig. It is available from ftp://ftp.engr.usask.ca/pub/hp2xx/.

mifXfig
mifXfig will convert files between MIF format (of Framemaker(TM)) and Fig format. See http://www.ida.liu.se/~vaden/teaching/m2f/ for details.

netpbm
fig2dev will invoke the appropriate command from the netpbm package when exporting figures to bitmap formats. netpbm is available from ftp.x.org and its mirror sites or from ftp.cdrom.com.

pic2fig
Convertes PIC format (used with troff, ditroff, etc) to Fig format. It is available from ftp.cs.orst.edu or ftp.x.org and its mirror sites in `/contrib/utilities`.

plot2fig
Converts UNIX plot format to Fig format. Available from any GNU site.

pstoedit
pstoedit can convert PostScript files into Fig format. It is available from ftp.x.org and its mirror sites in `/contrib/applications/tgif/pstoedit`.

xgraph
xgraph is a plotting package which runs in X11. The version on iworks.ecn.uiowa.edu in `comp.hp` can output Fig files.

xpaint
xpaint is a paint program which runs under X11. It is available from http://www.danbbs.dk/~torsten/xpaint and any SunSite machines such as ftp://sunsite.unc.edu/pub/Linux/apps/graphics/draw/.

xv
xv can be used to display images in various formats and allows some editing of those images (cropping, color editing scaling/rotating etc). By default, xfig will invoke xv when the Edit Image button is pressed in the edit PICTURE object panel. xv is shareware and is available via anonymous ftp from ftp://ftp.cis.upenn.edu/pub/xv.

Goto TOP

written by us