1FIG2PS(1) Conversion from XFig to PS/EPS/PDF FIG2PS(1)
2
3
4
6 fig2ps, fig2eps,fig2pdf - Convert xfig files in ps|pdf, processing all
7 the text marked as special with LaTeX.
8
10 fig2ps [-h|--help]
11
12 fig2ps [ options ] file1.fig [file2.fig ...]
13
14
15
17 fig2ps converts figures produced by XFig into postscript or PDF, pro‐
18 cessing the text with LaTeX. It takes advantage of the pstex and
19 pstext_t export formats of fig2dev.
20
21 fig2ps converts successively all the files given as arguments. It's be‐
22 haviour is governed by quite a few options. In all the options, the =
23 sign is optional, so that
24
25 fig2ps --bbox=dvips file.fig
26
27 and
28
29 fig2ps --bbox dvips file.fig
30
31 are equivalent.
32
33
34
36 --gv, --nogv
37 If on, fig2ps runs gv on every file just after they are produced.
38 On by default if fig2ps thinks it is talking to a terminal (ie not
39 from a pipe). You might want to switch that off when processing
40 lots of files.
41
42
43 --keep
44 Tells fig2ps to keep the temporary directory in which temporary
45 files are created. Useful for debugging. If this option is on,
46 fig2ps prints the name of the directory when it has finished its
47 job, so you know where to look.
48
49
50 --packages=pack1,pack2,...
51 Sets the package list to be used to pack1,pack2,.... Resets any
52 package given by the --add command-line option. For more informa‐
53 tion about packages, see the section PREAMBLE below.
54
55
56
57 --add=pack1,pack2,...
58 Adds pack1,pack2,... to the existing list of packages. See the
59 section PREAMBLE below. This option is cumulative.
60
61
62 --bbox=dvips|gs|a,b,c,d
63 Chooses the method to determine the bounding box of the files. See
64 the section BOUNDING BOX below for more information.
65
66
67 --input=file
68 Uses file as a template for the LaTeX file. More information about
69 that can be found in the section PREAMBLE below. This option was
70 written for a private use, though you can of course profit from it.
71 However, most of the times, what you really want is --add=file.
72 file will be looked for using kpsewhich.
73
74
75 --pdf, --nopdf
76 Whether the final output of fig2ps will be PDF or postscript. This
77 option is automatically when called as fig2pdf. Note that in any
78 case, fig2ps has to go through Postscript output to produce a PDF
79 file.
80
81
82 --eps
83 Change the output default extension from .ps to .eps. This is on
84 by default when the program is called as fig2eps. It has no other
85 effects.
86
87
88 --keepps
89 When producing a PDF file, asks fig2ps to keep the intermediary
90 Postscript file.
91
92
93 --forcespecial, --noforcespecial
94 fig2ps only processes with LaTeX text which is marked as special in
95 the Fig file. When this option is on, all text is treated as if it
96 was marked with the special flag.
97
98
99 --dvips=string
100 Passes string as options for dvips.
101
102
103 --fig2dev=string
104 Passes string as options for fig2dev.
105
106
107 --preamble=string
108 Adds string in the preamble of the LaTeX file generated, just
109 before the \begin{document} stanza. Effects are cumulative.
110
111
112
114 Many of the command-line options can be set in either the system-wide
115 (in /etc) or the user configuration file (in the user's home direc‐
116 tory). Some more details can be configured in the configuration files.
117 Global configuration is overridden by users' configuration which in
118 turn is overridden by the command line options. Here is a list of the
119 variables you can define:
120
121
122 PACKAGES=pack1,pack2...
123 Defines the basic list of packages. See the PREAMBLE section.
124
125
126 ADD=pack1,pack2
127 Has the same effect as the --add command-line option. Does not make
128 too much sense in the global configuration file, but you might want
129 to use it in a personal one.
130
131
132 DOC_CLASS=class
133 Sets the document class used by LaTeX.
134
135
136 DOC_OPTIONS=Ioptions
137 Sets the options for the document class.
138
139
140 FORCE_SPECIAL=0|1
141 Sets the default for option --forcespecial.
142
143
144 GV=0|1
145 Sets the default for option --gv.
146
147
148 GV=file
149 Has the same effect as the --input command-line option.
150
151
152 PREAMBLE=string
153 Identical to the --preamble option, with the slight difference that
154 the in configuration files, it is not cumulative: the last assign‐
155 ment seen is the only taken into account.
156
157
158 KEEP_PS=0|1
159 Sets the default for option --keepps.
160
161
162
164 The preamble of the LaTeX file is built as such:
165
166
167 * if a --input file is specified, it will be used directly with a
168 \input statement. A \documentclass statement will be added if the
169 input file does not contain any.
170
171 * else, a preamble is made based on the values of DOC_CLASS,
172 DOC_OPTIONS, and PACKAGES (the latter is overridden by the --packages
173 command-line option). See below for the format of the package vari‐
174 ables.
175
176
177 Then, the packages specified using the ADD variable and the --add com‐
178 mand-line options are added to the preamble, followed by the geometry
179 package that deals with setting the size of the output (tweaked for
180 fig2ps's purposes) and finally the contents of the PREAMBLE variable
181 and the --preamble command-line options.
182
183
184 The --packages and --add options, and the corresponding variables, take
185 a comma separated list of packages. Options for the packages can be
186 specified in two ways:
187
188
189 [option]package
190 in which you can only specify one option;
191
192 option1:option2:...:package
193 in which you can specify an arbitrary number of options, as long as
194 you don't need a comma inside an option. Should the need arise, use
195 --preamble.
196
197
198
200 One of the delicate jobs of fig2ps is to set the bounding box of the
201 produced file, that is the rectangle that holds the figure. There are
202 basically three ways for fig2ps to get them:
203
204
205 dvips
206 In this mode, fig2ps runs dvips with the -E option. It works rea‐
207 sonably fine most of the time, but it will produce incorrect
208 results if you have rotated text near the edge of the graph.
209
210
211 gs Asks gs to tell the bounding box of the figure. It used to produce
212 systematically perfect results, but the quality has degraded some‐
213 how recently. It still works in most of the cases, and that is why
214 it is the default. It fails on very large pictures.
215
216
217 a,b,c,d
218 Specify your bounding box by hand.
219
220
221 The benefits of using the last two methods is that fig2ps tells you how
222 big the picture is (in centimeters).
223
224
225
227 /etc/fig2ps/fig2ps.rc, $HOME/.fig2ps.rc
228
229 The examples/ directory in the source tarball contains some examples.
230 Check fig2ps on them to see if it works fine, but keep in mind that
231 fig2ps will choke on examples/Large-example.fig !
232
233
234
236 xfig(1), fig2dev(1), latex(1), gv(1), gs(1), kpsewhich(1)
237
238 The Sourceforge project page at:
239
240 http://sourceforce.net/projects/fig2ps
241
242
244 This script was written by Vincent Fourmond, from an original idea of
245 Seb Desreux (the first script is for private use, and used the eepic
246 export of xfig, which is severely limitated), improved by a few oth‐
247 ers...
248
249
251 Please use the tracker from the Sourceforge project page:
252
253 https://sourceforge.net/tracker/?group_id=125824
254
255
256
257Version 1.4 2009-01-01 FIG2PS(1)