.TH fig2dev "" "" "X Application"
.PC "Translate fig code to other graphics languages"
.fi
\fBfig2dev
\-L \fIlanguage\fB
[\-m \fIratio\^\fB]
[\-f \fIfont\^\fB]
[\-s \fIfsize\^\fB]
[\fIother options\^\fB]
[\fIfig-file\fB [\fIout-file\fB\^\fB] ]\fR
.PP
.B fig2dev
translates code generated by the X application
.B xfig
into the specified graphics
.I language
and writes its output into
.IR out-file .
By default,
.I out-file
is the standard output.
.I fig-file
holds the
.B xfig
code to translate; by default, it is the standard input.
.PP
For details on
.B xfig
and its options, see its manual page.
.SH "Command-line Options"
.B fig2dev
recognizes the following command-line options:
.IP "\fB\-L \fIlanguage\fR"
Translate the
.B xfig
code into
.IR language .
.B fig2dev
recognizes the following languages:
.BR box ,
.BR epic ,
.BR eepic ,
.BR eepicemu ,
.BR latex ,
.BR null ,
.BR pic ,
.BR pictex ,
.BR ps ,
.BR pstex ,
.BR pstex_t ,
.BR textyl ,
and
.B tpic .
.IP "\fB\-m ratio\fR"
Magnify the image to
.IR ratio ,
which is a ratio of the size of the original image.
The default magnification is 1.0.
.IP "\fB\-f \fIfont\fR"
Set the default font used for text objects to
.I font.
The default font is Roman;
the format of this option depends on the graphics
.I language
in use.
In TeX-based languages,
the font is the base of the name given in lfonts.tex,
for instance
.B cmr
for Roman, or
.B tt
for teletype.
In PostScript, it can any font name known to the printer or interpreter.
.IP "\fB\-s \fIpoints\fR"
Set the default font size to
.IR points .
The default is 11\(mu\fIratio\fR, and thus is scaled by the option
.BR \-m .
If there is no scaling, the default font is 11-point Roman.
.PP
The other options that
.B fig2dev
recognizes are specific to
.IR language .
These are described in the follownig sections.
.SH "EPIC Options"
.II "Podar, Sunil"
.II EPIC
EPIC is an enhancement to LaTeX picture-drawing environment.
It was developed by Sunil Podar of Department of Computer Science
in S.U.N.Y at Stony Brook.
.PP
.II "Kwok, Conrad"
.II EEPIC
.II tpic
EEPIC is an extension to EPIC and LaTeX picture drawing environment,
which uses
.B tpic
specials as a graphics mechanism.
It was written by Conrad Kwok of Division of
Computer Science at University of California, Davis.
.PP
.II EEPIC-EMU
EEPIC-EMU is an EEPIC emulation package that does not use
.B tpic
specials.
.PP
With these languages, you can use the following command-line options:
.IP \fB\-S\fR
Scale the figure.
This options sets magnification and size to
.I scale
/ 12 and
.IR ratio ,
respectively.
.IP \fB\-l\fR
Use
.B \ethicklines
when width of a line exceeds
.IR lwidth .
The default is two.
.IP \fB\-v\fR
Include comments in the output file.
.IP \fB\-P\fR
Generate a complete LaTeX file.
In other words, the ouput file can be
formatted without requiring any changes.
The additional text inserted at the beginning and end of the file
is controlled by the configuration parameters
.B Preamble
and
.BR Postamble .
.IP \fB\-W\fR
Enable variable line-width.
.IP \fB\-w\fR
Disable variable line width.
Only
.B \ethicklines
or
.B \ethinlines
commands will be generated in the output file.
.PP
When you enable the variable-line-width option,
.B \ethinlines
is still used when line width is less than
.BR LineThick .
One potential problem is that the width of
.B \ethinlines
is 0.4 points,
but the resolution of
.B xfig
is 1/80 inch (that is, approximately one point).
If
.B LineThick
is set to two, normal lines will be drawn 0.4 points wide,
but the width of the next line is already two point.
One possible solution is to set
.B LineThick
to one, and set the width of the those lines you want to be drawn in
.B \ethinlines
to zero.
.PP
Due to this problem, varible line-width
.B VarWidth
is set to
.B false
by default.
.SH "LaTeX Options"
With this language, you can use the following command-line options:
.IP "\fB\-l \fIlwidth\fR"
Sets the threshold between LaTeX thin and thick lines to 
.I lwidth
pixels.
LaTeX supports only two line widths:
.B \ethinlines
and
.BR \ethicklines .
Lines thicker than
.I lwidth
pixels are drawn as
.BR \ethicklines ;
otherwise, they're drawn as
.BR \ethinlines .
This option also affects the size of dots in dotted-line style.
The default value of
.I lwidth
is zero.
.IP "\fB\-d \fIdmag\fR"
Set the magnification of the length of line dashes to
.IR dmag .
.IP \fB\-v\fR
Verbose mode.
.PP
LaTeX cannot accurately represent all the graphics objects that can
be described by
.BR xfig .
For example, the slope that a line can have is limited.
Some objects, such as spline curves, cannot be drawn at all.
.B fig2dev
chooses the closest possible line slope, and prints an error
message when it cannot draw an object accurately.
.SH "PIC Options"
With this language, you can use the following command-line options:
.IP "\fB\-p \fIextension\fR"
Use the PIC
.I extension
that is known to work with
.BR groff ,
the GNU implementation of
.BR troff .
Note that it is not known how compatible each
.I extension
is with DWB PIC.
.B fig2dev
recognizes the following
.IR extension s:
.RS
.IP \fBarc\fR
Allow
.BR ARC_BOX ,
i.e., use rounded corners.
.IP \fBline\fR
Use the
.B line_thickness
value.
.IP \fBfill\fR
Allow ellipses to be filled.
.IP \fBall\fR
Use all of the above.
.RE
.SH "PICTEX Output"
To include PiCTeX pictures within a document, you must load the PiCTeX macros.
.PP
PiCTeX uses TeX integer register arithmetic to generate curves;
therefore, it is very slow.
PiCTeX draws curves by
.BR \eput -ing
the
.I psymbol
repeatedly, and so requires a large amount of TeX's internal memory,
and generates large DVI files.
The size of TeX's memory limits the number of plot symbols in a picture.
As a result, it is best to use PiCTeX only to generate small pictures.
.SH "PostScript Options"
With this language, you can use the following command-line options:
.IP \fB\-c\fR
Center the figure on the page.
The centering may not be accurate if there are texts in the
.I fig_file
that extends too far to the right of other objects.
.IP \fB\-P\fR
The figure describes a full page that will not necessarily
be inserted into a document, but can be sent directly
to a PostScript printer.
This tells
.B fig2dev
to make sure that the instruction
.B showpage
appears at the end of the figure,
and to inhibit translation of the figure-coordinate system.
.IP "\fB-l \fIdummy_arg\fR"
Rotate figure to landscape mode.
.B fig2dev
ignores
.IR dummy-arg ,
but it must appear on the command line for reasons of compatibility.
.SH "PSTeX Options"
With this language, you can use the following command-line options:
.B pstex
is a variant of PostScript
that suppresses formatted (special) text.
The language
.B pstex_t
has the complementary behavior:
it generates only the LaTeX commands
needed to position special text, and to overlay the
PostScript file generated using
.BR pstex .
These two drivers can be used to generate a figure that combines the
flexibility of PostScript graphics with LaTeX text formatting of special text.
Overlaying of the PostScript file uses the macro package
.BR psfig .
.PP
When you use the driver
.BR pstex_t ,
you must also use the command-line option
\fB\-p \fIfile\fR, which
names the PostScript file to be overlayed.
If you do not set this option or its value is null,
then no PostScript file will be inserted.
.SH "TeXtyl Options"
There are no TeXtyl-specific options.
.SH "TPIC Options"
There are no TPIC-specific options.
.SH "See Also"
.B
fig2ps2tex,
transfig,
X,
X applications,
xfig
.R
.SH Notes
The version of
.B fig2dev
included in this package does
.I not
include drivers for TeX or any of its variants.
That is because as of this writing, TeX is not available for the \*(CO
operating system.
Should this situation change, you include the TeX drivers simply by
modifying the
.B Makefile
for
.BR fig2dev ,
and re-compiling.
Comments within the
.B Makefile
describe how to do this; it is quite simple.
.PP
.II "Beck, Micah"
.II "Kwok, Conrad"
.II "Schmuck, Frank"
.B fig2dev
was written by Micah Beck of Cornell University (beck@svax.cs.cornell.edu),
Sept 28 1990;
and by Frank Schmuck (then of Cornell University)
and Conrad Kwok (then of the University of California, Davis).
.PP
.II "Fernandez, Jose Alberto"
.II "Biehl, Gary"
Drivers were contributed by
Jose Alberto Fernandez of the University of Maryland,
and Gary Beihl of MCC.
.PP
.II "Sutanthavibul, Supoj"
.B fig2dev
was modified from
.B f2p
by Supoj Sutanthavibul of the University of Texas at Austin
(supoj@sally.utexas.edu), who is the original
author of
.BR xfig .
.PP
Original copyright \(co 1990 by Micah Beck.
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
No representations are made about suitability of this
software for any purpose.
It is provided ``as is'' without express or
implied warranty.
