File: fig2ps.1

package info (click to toggle)
fig2ps 1.5-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 196 kB
  • sloc: perl: 452; makefile: 42
file content (450 lines) | stat: -rw-r--r-- 9,215 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
'\" t
.\" ** The above line should force tbl to be a preprocessor **
.\" Man page for fig2ps, based on the one from ctioga(1)
.\"
.\" Copyright 2004,2005,2006,2009 by Vincent Fourmond
.\"
.\" You may distribute under the terms of the GNU General Public
.\" License as specified in the file GPL.txt that comes with the
.\" fig2ps program.
.\"
.pc
.TH FIG2PS 1 "2009-01-01" "Version 1.4" "Conversion from XFig to PS/EPS/PDF"

.SH NAME
fig2ps, fig2eps,fig2pdf \- Convert xfig files in ps|pdf, processing
all the text marked as special with LaTeX.

.SH SYNOPSIS

.B fig2ps \fR[\fB\-h\fR|\fB\-\-help\fR] 

.B fig2ps 
[\fI options \fR] 
.I file1.fig \fR[\fIfile2.fig ...\fR]

.B fig2pdf
[\fI options \fR] 
.I file1.fig \fR[\fIfile2.fig ...\fR]

.SH DESCRIPTION

.B fig2ps 
converts figures produced by XFig into postscript or PDF, processing
the text with LaTeX. It takes advantage of the
.I pstex
and 
.I pstext_t
export formats of
.BR fig2dev .

.B fig2ps
converts successively all the files given as arguments. It's behaviour
is governed by quite a few options. In all the options, the
.B =
sign is optional, so that

.I fig2ps \-\-bbox=dvips file.fig

and

.I fig2ps \-\-bbox dvips file.fig

are equivalent.

.SH EXAMPLES

To convert 
.I file.fig
to PS:

.I fig2ps file.fig

To convert it to PDF:

.I fig2pdf file.fig

or

.I fig2ps --pdf file.fig


If the XFig file you want to convert to PDF contains included images,
you might want to try:

.I fig2pdf --manual-ps2pdf file.fig



.SH OPTIONS

.TP 4
.B \-\-gv, \-\-nogv
If on,
.B fig2ps
runs 
.B gv
on every file just after they are produced. On by default if 
.B fig2ps
thinks it is talking to a terminal (ie not from a pipe). You might
want to switch that off when processing lots of files.

.TP
.B \-\-xpdf
Views produced files with
.B xpdf
rather than 
.B gv\fR. 
Obviously, that won't be really useful if you are producing PS files,
you've been warned.

.TP
.B \-\-viewer\fI=command
Runs 
.I command
rather than 
.B gv
on the produced files. 

.TP
.B \-\-keep
Tells
.B fig2ps
to keep the temporary directory in which temporary files are
created. Useful for debugging. If this option is on, 
.B fig2ps
prints the name of the directory when it has finished its job, so you
know where to look.

.TP
.B \-\-packages\fI=pack1,pack2,...
Sets the package list to be used to 
.I pack1,pack2,...\fR. 
Resets any package given by the 
.B --add
command-line option. For more information about packages, see the
section
.B PREAMBLE
below.


.TP
.B \-\-add\fI=pack1,pack2,...
Adds 
.I pack1,pack2,...
to the existing list of packages. See the section 
.B PREAMBLE
below. This option is cumulative.

.TP
.B \-\-bbox\fI=dvips|gs|a,b,c,d
Chooses the method to determine the bounding box of the files. See the
section
.B BOUNDING BOX
below for more information.

.TP
.B \-\-input\fI=file
Uses file as a template for the LaTeX file. More information about
that can be found in the section
.B PREAMBLE
below. This option was written for a private use, though you can of
course profit from it. However, most of the times, what you really
want is 
.IR --add=file .
.I file
will be looked for using
.BR kpsewhich .

.TP
.B \-\-pdf, \-\-nopdf
Whether the final output of 
.B fig2ps 
will be PDF or postscript. This option is automatically when called as
.BR fig2pdf .
Note that in any case, 
.B fig2ps
has to go through Postscript output to produce a PDF file.

.TP
.B \-\-eps
Change the output default extension from
.I .ps 
to
.IR .eps . 
This is on by default when the program is called as 
.BR fig2eps .
It has no other effects.

.TP
.B \-\-manual\-ps2pdf
When producing PDF files, 
.B fig2ps
uses
.B epstopdf
to perform the conversion. This may lead to bad quality output with
embedded pictures. The use of this option disables PDF production by 
.B epstopdf
and lets 
.B ps2pdf
produce the final output PDF (but after tweaking the PS file using 
.B epstopdf\fR). 
In general, this produces much better results.

.TP
.B \-\-ps2pdf\-options
When 
.I "--manual-ps2pdf"
does not produce output of decent quality, you can use this option
to manually feed options to 
.B ps2pdf\fR.
The use of this option implies
.I \-\-manual\-ps2pdf\fR.



.TP
.B \-\-keepps
When producing a PDF file, asks
.B fig2ps
to keep the intermediary Postscript file.

.TP
.B \-\-forcespecial, \-\-noforcespecial
.B fig2ps 
only processes with LaTeX text which is marked as 
.I special
in the Fig file. When this option is on, all text is treated as if it
was marked with the 
.I special
flag.

.TP
.B \-\-dvips\fI=string
Passes 
.I string
as options for 
.BR dvips .

.TP
.B \-\-fig2dev\fI=string
Passes 
.I string
as options for 
.BR fig2dev .

.TP
.B \-\-preamble\fI=string
Adds
.I string
in the preamble of the LaTeX file generated, just before the
.I \ebegin{document}
stanza. Effects are cumulative.

.TP
.B \-V\fR, \fB \-\-version
Prints the version of
.B fig2ps
and exits.


.SH CONFIGURATION FILES

Many of the command-line options can be set in either the system-wide
(in
.I /etc\fR)
or the user configuration file (in the user's home directory). Some
more details can be configured in the configuration files. Global
configuration is overridden by users' configuration which in turn is
overridden by the command line options.  Here is a list of the
variables you can define:

.TP 4
.B PACKAGES\fI=pack1,pack2...
Defines the basic list of packages. See the 
.B PREAMBLE
section.

.TP
.B ADD\fI=pack1,pack2
Has the same effect as the 
.B --add 
command-line option. Does not make too much sense in the global
configuration file, but you might want to use it in a personal one.

.TP
.B DOC_CLASS\fI=class
Sets the document class used by LaTeX.

.TP
.B DOC_OPTIONS\fI=Ioptions 
Sets the options for the document class.

.TP
.B FORCE_SPECIAL\fI=0\fR|\fI1
Sets the default for option
.B \-\-forcespecial\fR.

.TP
.B GV\fI=0\fR|\fI1
Sets the default for option
.B \-\-gv\fR.

.TP
.B GV\fI=file
Has the same effect as the
.B \-\-input
command-line option.

.TP
.B PREAMBLE\fI=string
Identical to the 
.B \-\-preamble
option, with the slight difference that the in configuration files,
it is not cumulative: the last assignment seen is the only taken into
account. 

.TP
.B KEEP_PS\fI=0\fR|\fI1
Sets the default for option
.B \-\-keepps\fR.


.SH PREAMBLE

The preamble of the LaTeX file is built as such:

.TP 2
.B *
if a
.B \-\-input
file is specified, it will be used directly with a
.I \einput
statement. A 
.I \edocumentclass
statement will be added if the input file does not contain any.
.TP
.B *
else, a preamble is made based on the values of
.B DOC_CLASS\fR,
.B DOC_OPTIONS\fR,
and 
.B PACKAGES
(the latter is overridden by the 
.B \-\-packages
command-line option). See below for the format of the package
variables.

.P
Then, the packages specified using the
.B ADD
variable and the
.B \-\-add
command-line options are added to the preamble, followed by the 
.I geometry
package that deals with setting the size of the output (tweaked for 
.B fig2ps\fR's
purposes) and finally the contents of the
.B PREAMBLE
variable and the 
.B \-\-preamble
command-line options. 

.P
The 
.B \-\-packages
and
.B \-\-add
options, and the corresponding variables, take a comma separated list
of packages. Options for the packages can be specified in two ways: 

.TP 4
.I [option]package
in which you can only specify one option;
.TP
.I option1:option2:...:package
in which you can specify an arbitrary number of options, as long as
you don't need a comma inside an option. Should the need arise, use
.B \-\-preamble\fR.


.SH BOUNDING BOX

One of the delicate jobs of 
.B fig2ps
is to set the bounding box of the produced file, that is the rectangle
that holds the figure. There are basically three ways for
.B fig2ps
to get them:

.TP 4
.I dvips
In this mode, 
.B fig2ps
runs
.B dvips
with the 
.I \-E
option. It works reasonably fine most of the time, but it will produce
incorrect results if you have rotated text near the edge of the graph.

.TP
.I gs
Asks
.B gs
to tell the bounding box of the figure. It used to produce
systematically perfect results, but the quality has degraded somehow
recently. It still works in most of the cases, and that is why it is
the default. It fails on very large pictures.

.TP
.I a,b,c,d
Specify your bounding box by hand.

.P
The benefits of using the last two methods is that 
.B fig2ps
tells you how big the picture is (in centimeters).


.SH FILES

.I /etc/fig2ps/fig2ps.rc\fR,
.I $HOME/.fig2ps.rc

The
.I examples/
directory in the source tarball contains some examples. Check 
.B fig2ps
on them to see if it works fine, but keep in mind that 
.B fig2ps
will choke on 
.I examples/Large-example.fig
!


.SH SEE ALSO

.B xfig\fR(1),
.B fig2dev\fR(1), 
.B latex\fR(1), 
.B gv\fR(1), 
.B gs\fR(1),
.B kpsewhich\fR(1)

The Sourceforge project page at:

.I http://sourceforce.net/projects/fig2ps

.SH AUTHOR

This script was written by Vincent Fourmond, from 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...

.SH BUG REPORT AND FEATURE REQUESTS

Please use the tracker from the Sourceforge project page:

.I https://sourceforge.net/tracker/?group_id=125824