1TransFig is a set of tools for creating TeX documents with graphics
2which are portable, in the sense that they can be printed in a wide
3variety of environments.
4
5The transfig directory contains the source for the transfig command
6which generates a Makefile which translates Fig code to various graphics
7description languages using the fig2dev program. In previous releases,
8this command was implemented as a shell script.
9
10The fig2dev directory contains a general program for translating from
11Fig code to other graphics desciption languages. The dev subdirectory
12contains a library of output drivers used by fig2dev.
13
14Drivers currently exist for the following graphics langauges:
15(E)EPIC macros, LaTeX picture environment, PIC, PiCTeX, PostScript, and TeXtyl.
16Fig2dev can be configured with a subset of these drivers
17
18The doc directory contains man pages for fig2dev and for the transfig command.
19The subdirectory doc/manual contains a manual for using TransFig to create
20documents with portable graphics. The manual also contains a reference
21guide describing Fig code in detail, and a description of TFX, an extension to
22Fig code which is supported by the translators in this package.
23
24The file LATEX.AND.XFIG contains a useful tutorial on using xfig with LaTex.
25It was written by Eric Masson (McGill University)
26
27TransFig and its companion xfig are available from:
28 ftp://epb.lbl.gov/xfig
29 http://www.xfig.org/xfigdist
30 ftp://ftp.x.org/contrib/applications/drawing_tools
31 ftp://ftp.cdrom.com/pub/X11/contrib/applications/drawing_tools
32 from any CTAN machine e.g. ftp://ftp.tex.ac.uk/pub/archive/graphics.
33
34*************************************************************************
35To make TransFig:
36
371. Edit fig2dev/Imakefile and fig2dev/dev/Imakefile to make any changes
38 noted below. At least make sure that you point XFIGLIBDIR to the
39 same directory that xfig uses (usually /usr/local/lib/xfig). This
40 will be used to hold the bitmaps directory for the tk fill patterns.
412. Do a "xmkmf" to create the top level Makefile from the Imakefile
423. Do a "make Makefiles" (That's with an "s")
434. Do a "make" to make the programs
44 **** This MUST be done before "make install" ****
455. Do a "make install" to install them in the system
466. Do a "make install.man" to put the manual pages in the proper directories
47
48o If you want to install transfig and fig2dev in a directory other than the
49 default X11 binary directory, uncomment "BINDIR=<directory>" in both
50 transfig/Imakefile and fig2dev/Imakefile, and change <directory> to the full
51 path of the directory where you want the programs to be installed.
52
53o You may also have to redefine MKDIRHIER because "make" looks for it relative
54 to the BINDIR variable. Set it to: "MKDIRHIER = /bin/sh <path>/mkdirhier"
55 where <path> is the path to mkdirhier. This should be changed in both the
56 transfig/Imakefile and fig2dev/Imakefile.
57
58o To change where the standard "man" pages go, uncommand and change MANDIR=<path>
59 in both the transfig/Imakefile and fig2dev/Imakefile.
60
61o Uncomment the USELATEX2E flag in the transfig/Imakefile file to use the
62 \\usepackage{} command for LaTeX2e.
63 The default is to use \\documentstyle{} for LaTeX209.
64
65o In fig2dev/Imakefile for the described features:
66
67 o Comment out the DDNFSS = ... line if you don't want NFSS2 font selection
68 for LaTeX texts.
69 o Comment out the DDLATEX2E_GRAPHICS = ... line if you don't want to use the
70 standard graphics package distributed w/ LaTeX2e.
71 o UNcomment the DDEPSFIG = ... line if you want to use the deprecated epsfig macros
72 distributed w/ LaTeX2e (DDLATEX2E_GRAPHICS must also be defined).
73
74 Hint: Users of LaTeX2e will probably want to include both of these
75 options; users of LaTeX 2.09 will probably want to include neither.
76
77o If your system doesn't have strcasecmp() and/or strncasecmp(), uncomment the
78 lines in the Imakefile with HAVE_NO_STRCASECMP and HAVE_NO_STRNCASECMP.
79
80o If your system doesn't have strstr(3) uncomment the "#define NOSTRSTR"
81
82o Make sure that you point XFIGLIBDIR to the same directory that xfig uses
83 (usually /usr/local/lib/xfig). This will be used to hold the bitmaps
84 directory for the tk fill patterns.
85
86o If you *don't* want PNG support, comment out the #define USEPNG line in
87 the Imakefile.
88
89o If you want to be able to import PNG images then:
90 o Uncomment the "#define USEPNG" line in the Imakefile.
91 o You need the PNG library (-lpng) and the zlib (-lz) compression library.
92 You can find the PNG sources at http://www.libpng.org/pub/png/libpng.html and
93 the zlib sources at ftp://ftp.cdrom.com/pub/infozip/zlib.
94
95o If you want to be able to translate Fig files that have imported XPM files
96 (color pixmaps) uncomment the "#define USEXPM" line in fig2dev/Imakefile.
97 You need version 3.4c or newer of the XPM package.
98 This is available from ftp.x.org in /contrib/libraries.
99
100o If your system doesn't have the strerror() function then uncomment the
101 "#define NEED_STRERROR" in the Imakefile.
102
103o If your system can open files in text and binary modes and has the setmode()
104 function, uncomment HAVE_SETMODE. This probably only applies to Windows 9x/NT
105 systems.
106
107o Look in the Imakefiles to see if any options are relevant to your system.
108
109o If you use epic, eepic or tpic you must have compiled your dvips and xvdi
110 with the tpic support (-DTPIC for dvips).
111
112o To use the -b (binary) option for CGM export, the ralcgm program is required.
113 This is available from ftp://ftp.cc.rl.ac.uk/pub/graphics/ralcgm/
114
115***************
116IMPORTANT NOTE:
117
118o As of version 3.2.0 (final), fig2dev has taken over the translating of Fig
119 to the bitmap formats (ACAD, GIF, JPEG, XPM, XBM, PCX, TIFF).
120 In the past, xfig itself rendered the bitmap formats. This change was made
121 to have a more consistent look and better fonts. First, the Fig file is
122 translated to PostScript, then ghostscript is used to render the image to
123 the final format in the case of JPEG, PCX and TIFF, or to PPM (portable
124 pixmap) after which the appropriate ppmtoXXX filter is used to get ACAD, GIF,
125 XPM and XBM. If smoothing is done (-S option) when jpeg output is used, the
126 "ppmtojpeg" program must be installed from the netpbm package.
127
128 o You need the netpbm package version 9.1 (or later), which you can find at
129 http://download.sourceforge.net/netpbm
130
131 o You will also need ghostscript, which can be found on ftp.cs.wisc.edu in
132 /ghost/aladdin, *AND* it must be compiled with the pcx256, jpeg, png256,
133 ppmraw and tiff24nc drivers.
134
135*************************************************************************
136Please send email about any questions/bug fixes/contributions etc. about
137TransFig or xfig to bvsmith@lbl.gov.
138
139Brian V. Smith
140Lawrence Berkeley National Laboratory
141bvsmith@lbl.gov
142*************************************************************************
143
144Note that although I work at Lawrence Berkeley Laboratory (LBL) I don't speak
145for LBL nor do I represent LBL with respect to my work on TransFig and xfig,
146nor does LBNL make any representations about the suitability of this software
147for any purpose.
148Here is the legal part:
149
150THE LAWRENCE BERKELEY NATIONAL LABORATORY DISCLAIMS ALL WARRANTIES WITH
151REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
152AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL,
153INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
154LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
155OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
156PERFORMANCE OF THIS SOFTWARE.
157
158********************************
159PROBLEMS and POSSIBLE SOLUTIONS:
160********************************
161
162--------------------------------------------------------------------------------
163Pattern shading (e.g. bricks, shingles, etc.) only work for PostScript output.
164--------------------------------------------------------------------------------
165
166Solaris 2.x users:
167
168You you must link with -lnsl because gethostname() is used.
169
170The Solaris C compiler version 4.2 has a bug in the optimizer when level -O4 or
171-O3 is used. Either change the Makefile to use -O2 or less, or change your
172imake config files to specify -O2 or lower then do "xmkmf" again and "make".
173
174--------------------------------------------------------------------------------
175HP systems:
176
177You may need to reduce optimization to +O2 instead of +O3.
178The symptom is that not all of the objects in compound objects print.
179________________________________________________________________________________
180PROBLEM:
181 Arc-boxes don't appear correct when viewing exported PostScript with
182 ghostview or ghostscript.
183
184POSSIBLE CAUSE AND SOLUTION:
185 Ghostscript version 4.01 has a bug with the arcto operators.
186 Get version 4.03 or newer.
187