1FIG2PS(1)             Conversion from XFig to PS/EPS/PDF             FIG2PS(1)
2
3
4

NAME

6       fig2ps,  fig2eps,fig2pdf - Convert xfig files in ps|pdf, processing all
7       the text marked as special with LaTeX.
8
9

SYNOPSIS

11       fig2ps [-h|--help]
12
13       fig2ps [ options ] file1.fig [file2.fig ...]
14
15       fig2pdf [ options ] file1.fig [file2.fig ...]
16
17

DESCRIPTION

19       fig2ps converts figures produced by XFig into postscript or  PDF,  pro‐
20       cessing  the  text  with  LaTeX.  It  takes  advantage of the pstex and
21       pstext_t export formats of fig2dev.
22
23       fig2ps converts successively all the files given as arguments. It's be‐
24       haviour  is  governed by quite a few options. In all the options, the =
25       sign is optional, so that
26
27       fig2ps --bbox=dvips file.fig
28
29       and
30
31       fig2ps --bbox dvips file.fig
32
33       are equivalent.
34
35

EXAMPLES

37       To convert file.fig to PS:
38
39       fig2ps file.fig
40
41       To convert it to PDF:
42
43       fig2pdf file.fig
44
45       or
46
47       fig2ps --pdf file.fig
48
49
50       If the XFig file you want to convert to PDF contains  included  images,
51       you might want to try:
52
53       fig2pdf --manual-ps2pdf file.fig
54
55
56
57

OPTIONS

59       --gv, --nogv
60           If  on,  fig2ps runs gv on every file just after they are produced.
61           On by default if fig2ps thinks it is talking to a terminal (ie  not
62           from  a  pipe).  You  might want to switch that off when processing
63           lots of files.
64
65
66       --xpdf
67           Views produced files with xpdf rather  than  gv.   Obviously,  that
68           won't  be  really useful if you are producing PS files, you've been
69           warned.
70
71
72       --viewer=command
73           Runs command rather than gv on the produced files.
74
75
76       --keep
77           Tells fig2ps to keep the temporary  directory  in  which  temporary
78           files  are  created.  Useful  for  debugging. If this option is on,
79           fig2ps prints the name of the directory when it  has  finished  its
80           job, so you know where to look.
81
82
83       --packages=pack1,pack2,...
84           Sets  the  package  list to be used to pack1,pack2,....  Resets any
85           package given by the --add command-line option. For  more  informa‐
86           tion about packages, see the section PREAMBLE below.
87
88
89
90       --add=pack1,pack2,...
91           Adds  pack1,pack2,...   to  the  existing list of packages. See the
92           section PREAMBLE below. This option is cumulative.
93
94
95       --bbox=dvips|gs|a,b,c,d
96           Chooses the method to determine the bounding box of the files.  See
97           the section BOUNDING BOX below for more information.
98
99
100       --input=file
101           Uses  file as a template for the LaTeX file. More information about
102           that can be found in the section PREAMBLE below.  This  option  was
103           written for a private use, though you can of course profit from it.
104           However, most of the times, what you  really  want  is  --add=file.
105           file will be looked for using kpsewhich.
106
107
108       --pdf, --nopdf
109           Whether  the final output of fig2ps will be PDF or postscript. This
110           option is automatically when called as fig2pdf.  Note that  in  any
111           case,  fig2ps  has to go through Postscript output to produce a PDF
112           file.
113
114
115       --eps
116           Change the output default extension from .ps to .eps.  This  is  on
117           by  default when the program is called as fig2eps.  It has no other
118           effects.
119
120
121       --manual-ps2pdf
122           When producing PDF files, fig2ps uses epstopdf to perform the  con‐
123           version.  This  may  lead  to bad quality output with embedded pic‐
124           tures. The use of this option disables PDF production  by  epstopdf
125           and  lets  ps2pdf  produce the final output PDF (but after tweaking
126           the PS file using epstopdf).  In general, this produces much better
127           results.
128
129
130       --ps2pdf-options
131           When --manual-ps2pdf does not produce output of decent quality, you
132           can use this option to manually feed options to ps2pdf.  The use of
133           this option implies --manual-ps2pdf.
134
135
136
137
138       --keepps
139           When  producing  a  PDF  file, asks fig2ps to keep the intermediary
140           Postscript file.
141
142
143       --forcespecial, --noforcespecial
144           fig2ps only processes with LaTeX text which is marked as special in
145           the  Fig file. When this option is on, all text is treated as if it
146           was marked with the special flag.
147
148
149       --dvips=string
150           Passes string as options for dvips.
151
152
153       --fig2dev=string
154           Passes string as options for fig2dev.
155
156
157       --preamble=string
158           Adds string in the preamble  of  the  LaTeX  file  generated,  just
159           before the \begin{document} stanza. Effects are cumulative.
160
161
162       -V,  --version
163           Prints the version of fig2ps and exits.
164
165
166

CONFIGURATION FILES

168       Many  of  the command-line options can be set in either the system-wide
169       (in /etc) or the user configuration file (in  the  user's  home  direc‐
170       tory).  Some more details can be configured in the configuration files.
171       Global configuration is overridden by  users'  configuration  which  in
172       turn  is overridden by the command line options.  Here is a list of the
173       variables you can define:
174
175
176       PACKAGES=pack1,pack2...
177           Defines the basic list of packages. See the PREAMBLE section.
178
179
180       ADD=pack1,pack2
181           Has the same effect as the --add command-line option. Does not make
182           too much sense in the global configuration file, but you might want
183           to use it in a personal one.
184
185
186       DOC_CLASS=class
187           Sets the document class used by LaTeX.
188
189
190       DOC_OPTIONS=Ioptions
191           Sets the options for the document class.
192
193
194       FORCE_SPECIAL=0|1
195           Sets the default for option --forcespecial.
196
197
198       GV=0|1
199           Sets the default for option --gv.
200
201
202       GV=file
203           Has the same effect as the --input command-line option.
204
205
206       PREAMBLE=string
207           Identical to the --preamble option, with the slight difference that
208           the  in configuration files, it is not cumulative: the last assign‐
209           ment seen is the only taken into account.
210
211
212       KEEP_PS=0|1
213           Sets the default for option --keepps.
214
215
216

PREAMBLE

218       The preamble of the LaTeX file is built as such:
219
220
221       * if a --input file is specified, it  will  be  used  directly  with  a
222         \input  statement.  A  \documentclass  statement will be added if the
223         input file does not contain any.
224
225       * else,  a  preamble  is  made  based  on  the  values  of   DOC_CLASS,
226         DOC_OPTIONS, and PACKAGES (the latter is overridden by the --packages
227         command-line option). See below for the format of the  package  vari‐
228         ables.
229
230
231       Then,  the packages specified using the ADD variable and the --add com‐
232       mand-line options are added to the preamble, followed by  the  geometry
233       package  that  deals  with  setting the size of the output (tweaked for
234       fig2ps's purposes) and finally the contents of  the  PREAMBLE  variable
235       and the --preamble command-line options.
236
237
238       The --packages and --add options, and the corresponding variables, take
239       a comma separated list of packages. Options for  the  packages  can  be
240       specified in two ways:
241
242
243       [option]package
244           in which you can only specify one option;
245
246       option1:option2:...:package
247           in which you can specify an arbitrary number of options, as long as
248           you don't need a comma inside an option. Should the need arise, use
249           --preamble.
250
251
252

BOUNDING BOX

254       One  of  the  delicate jobs of fig2ps is to set the bounding box of the
255       produced file, that is the rectangle that holds the figure.  There  are
256       basically three ways for fig2ps to get them:
257
258
259       dvips
260           In  this  mode, fig2ps runs dvips with the -E option. It works rea‐
261           sonably fine most of  the  time,  but  it  will  produce  incorrect
262           results if you have rotated text near the edge of the graph.
263
264
265       gs  Asks  gs to tell the bounding box of the figure. It used to produce
266           systematically perfect results, but the quality has degraded  some‐
267           how  recently. It still works in most of the cases, and that is why
268           it is the default. It fails on very large pictures.
269
270
271       a,b,c,d
272           Specify your bounding box by hand.
273
274
275       The benefits of using the last two methods is that fig2ps tells you how
276       big the picture is (in centimeters).
277
278
279

FILES

281       /etc/fig2ps/fig2ps.rc, $HOME/.fig2ps.rc
282
283       The  examples/  directory in the source tarball contains some examples.
284       Check fig2ps on them to see if it works fine, but  keep  in  mind  that
285       fig2ps will choke on examples/Large-example.fig !
286
287
288

SEE ALSO

290       xfig(1), fig2dev(1), latex(1), gv(1), gs(1), kpsewhich(1)
291
292       The Sourceforge project page at:
293
294       http://sourceforce.net/projects/fig2ps
295
296

AUTHOR

298       This  script  was written by Vincent Fourmond, from an original idea of
299       Seb Desreux (the first script is for private use, and  used  the  eepic
300       export  of  xfig,  which is severely limitated), improved by a few oth‐
301       ers...
302
303

BUG REPORT AND FEATURE REQUESTS

305       Please use the tracker from the Sourceforge project page:
306
307       https://sourceforge.net/tracker/?group_id=125824
308
309
310
311Version 1.4                       2009-01-01                         FIG2PS(1)
Impressum