Creating the combined figure

From Bradley Kuszmaul:

(1) Set the 'special' flag in xfig.

(2) Generate two files using:

$ make overview.pstex overview.pstex_t -n -W overview.fig
fig2dev -L pstex  overview.fig overview.pstex
fig2dev -L pstex_t -p overview.pstex  overview.fig overview.pstex_t

(3) include the graphics in your latex by doing


(4) You may need some graphcs mode thing, such as


(5) I use this macro

 \caption{\mbox{\tt (#1.eps)} #2}%

which I use like this

\figput{overview}{How the components fit together.  The program is
written in an extension to C that has some implicit and explicit
atomicity.  The compiler produces an executable that, using a
combination of the run-time library and the hardware, runs the
program.  The interface between the executable and the
hardware-and-library is called the transactional API\@.}
Note: i don't think you need epsfig, but you do need:
Also, you don't need to run fig2dev directly; xfig can export the 2 files in "combined" form.

Scaling the combined figure

A script (from Tinh Tieu?) that creates a little .tex document with your figure and uses dvips to get an eps.
# convert xfig pstex to eps
# usage pstex 
open TEX, ">$basename.tex" or die "Cannot open $basename.tex for write :$!";
print TEX "\\documentclass{article}\n";
print TEX "\\usepackage{graphicx,color}\n";
print TEX "\\setlength{\\textwidth}{100cm}\n";
print TEX "\\setlength{\\textheight}{100cm}\n";
print TEX "\\begin{document}\n";
print TEX "\\pagestyle{empty}\n";
print TEX "\\input{$basename.pstex_t}\n";
print TEX "\\end{document}";
close TEX;
system("latex $basename.tex");
print STDOUT "making eps\n";
system("dvips -E $basename.dvi -o $basename.eps");
print STDOUT  "making pdf\n";
system("epstopdf $basename.eps");
print STDOUT  "making pgn\n";
system("convert -density 600 $basename.pdf $basename.png");
system("rm $basename.dvi $basename.aux $basename.log $basename.tex");