NAME
fig2ps, fig2eps,fig2pdf - Convert xfig files in
ps|pdf, processing all the text marked as special with LaTeX.
SYNOPSIS
fig2ps [-h|--help]
fig2ps [--[no]gv] [--packages=pack1,pack2,...]
[--add=pack1,pack2,...] [-k|--keep]
[--bbox=dvips|gs|a,b,c,d] [--input=file] [--[no]pdf]
[--dvips=s] [--eps] [--[no]forcespecial] file1.fig
{file2.fig ...} [--preamble=s]
DESCRIPTION
fig2ps is a little perl
script which takes advantage of the pstex and
pstext_t export formats of fig2dev to format the text inside
a Xfig figure using LaTeX. fig2pdf does the same, but ensures that
the ps file producted converts nicely to pdf and actually performs
the conversion.
OPTIONS
- --[no]gv
- Tells wether to run gv at the end of the
script to see the result. On by default, if fig2ps detects he's
talking to a terminal.
- --keep
- Use this option if you want to keep the
intermediate files used by fig2ps. May be useful for debugging...
- --packages=pack1,pack2,...
- Sets the package list to be used to
pack1,pack2,.... For packages taking arguments, you can use
the syntax [arg]package, which so far does recognise only
one argument, or the newer syntax arg1:arg2:arg...:package,
which allows for an arbitrary number of arguments.
- --add=pack1,pack2,...
- Adds pack1,pack2,... to the
existing list of packages. The same recommandation applies for
packages with arguments.
- --bbox=dvips|gs|a,b,c,d
- Chooses the method to determine the
Bounding Box:
-
- dvips
- Tells fig2ps to run divps with option
-E to generate a fitting bounding box. This will work on
many cases, but might fail if there is not a lot of text.
- gs
- Tells fig2ps to use gs with option
-sDEVICE=bbox to get the bounding box. I never saw it fail so far.
- a,b,c,d
- Specify your bounding box by
hand.
- --input=file
- Uses file as a template for the Tex file,
that is, do not print out a list of packages, but instead include
file using \input file. There is one exception: color is always
included (after \input), because export from xfig depends on it.
This flag is designed for compatibility with a private use of
fig2ps; you may of course use it, but you will find that, most of
the times, what you actually need is to use --add with an
appropriate .sty file (make sure that kpsewhich does
find it).
- --[no]pdf
- Whether the output of fig2ps will be pdf
or ps. On when the program names includes ``pdf'', as for instance
fig2pdf.
- --eps
- Change the output default extension from
.ps to .eps. This is on by default if the program is called as
fig2eps.
- --dvips=s
- Passes s as options when running
dvips.
- --keepps
- Tells fig2pdf to keep the intermediary ps
file after converting to pdf. It is by default removed.
- --[no]forcespecial
- Forces the special flag of text in the fig
file, so that every single text is processed through LaTeX.
- --preamble=s
- Adds the string s in the preamble
of the LaTeX file generated, that is, before the
\begin{document};
CONFIGURATION
Many of the command-line
options are pre-definable in either the global or the user
configuration file. Global configuration is overridden by users'
configuration which is overridden by the command line options. Here
is a list of the variables you can define:
- PACKAGES=pack1,pack2...
- Defines the basic list of packages. See
the --package command-line argument for the handling of packages
arguments.
- ADD=pack1,pack2...
- Defines the supplementary packages. This
option doesn't make any sense in the global configuration file. Be
careful that this option will be overridden by the command line,
thus, a ADD=something and a --add=somethingelse will
add only somethingelse to the package list, and not
something+somethingelse.
- DOC_CLASS=class
- Sets the document class used by LaTeX.
- DOC_OPTIONS=options
- Sets the options for the document class.
- FORCE_SPECIAL=0|1
- Sets or unsets the default for option
--forcespecial.
- GV=0|1
- Wether to run ``gv'' at the end of the
conversion or not.
- INPUT=file
- See the --input=file option.
Especially comes in useful in the users' configuration files.
- PREAMBLE=string
- Identical to the --preamble=s
option.
- KEEP_PS=0|1
- See the --keepps
option.
AEGUILL
Fig2ps used to include aeguill
by default on PDF output to produce nice
looking PDF files. However, this behavior is
no longer desired. For perfect PDF, we
recommend that you use cm-super fonts. If you still wish to use
aeguill, include it with -add=aeguill.
FILES
/etc/fig2ps/fig2ps.rc,
$HOME/.fig2ps.rc
You can also give a look at
/usr/share/doc/fig2ps/examples to give you few ideas. For
now, the example(s) are quite limited...
SEE ALSO
xfig(1),
fig2dev(1),
latex(1),
gv(1),
gs(1),
kpsewhich(1)...
AUTHOR
This little script has been
written by Vincent Fourmond, from on an original idea of Seb
Desreux (the first script is for private use, and used the eepic
export of xfig, which is severely limitated), improved by a few
others...
BUG REPORT
Send bugs or comments to
Vincent Fourmond <>