fig2ps

Langue: en

Version: 2008-11-06 (ubuntu - 07/07/09)

Section: 1 (Commandes utilisateur)

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. This is now the default option.
gs
Tells fig2ps to use gs with option -sDEVICE=bbox to get the bounding box. It used to work pretty fine with older versions of gs, but does not appear to work anymore now.
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.
--fig2dev=s
Passes s as options when running fig2dev.
--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.

TYPE 1 FONTS AND AEGUILL

fig2ps used to include aeguill to generate Type 1 fonts (better for PDF production). However, the use of aeguill is now discouraged. You now have few options for producing files with Type 1 fonts:
If you don't need special glyphs such as accented characters, please remove the latin1:inputenc,T1:fontenc entries from the PACKAGES line in the /etc/fig2ps/fig2ps.rc file, or dump a .fig2ps.rc file in your home directory with a line like

PACKAGES=english:babel,amsmath,graphics,color

This will use only OT1 encoding, and you should get Type 1 output in recent distributions.

The second approach, which I recommand, is to install the cm-super or latin modern fonts, which should get rid of this problem.
You still can include aeguill manually if you like, but beware as some glyphs might not render the way you'd expect them...

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 was 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 <vincent.fourmond@9online.fr>

POD ERRORS

Hey! The above document had some coding errors, which are explained below:
Around line 182:
You forgot a '=back' before '=head1'