1fig2dev(1) General Commands Manual fig2dev(1)
2
3
4
6 fig2dev - translates Fig code to various graphics languages
7
8
10 fig2dev -L language [-m mag] [-s fsize] [-Z maxdimension]
11 [-D +/-rangelist [-K]] [other options] [fig-file
12 [out-file]]
13
15 fig2dev translates fig code in the named fig-file into the specified
16 graphics language and puts them in out-file. The default fig-file and
17 out-file are standard input and standard output, respectively
18
19 Xfig (Facility for Interactive Generation of figures) is a screen-ori‐
20 ented tool which runs under the X Window System, and allows the user to
21 draw and manipulate objects interactively. This version of fig2dev is
22 compatible with xfig versions 1.3, 1.4, 2.0, 2.1, 3.0, 3.1 and 3.2.
23
24 Xfig version 3.2.3 and later saves and allows the user to edit comments
25 for each Fig object. These comments are output with several of the
26 output languages, such as PostScript, CGM, EMF, LaTeX, MetaFont,
27 PicTeX, (as % comments), tk (as # comments), and pic (as .\" comments).
28
29
30
32 -L language
33 Set the output graphics language. Valid languages are box, cgm,
34 dxf, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver),
35 gif, ibmgl, jpeg, latex, map (HTML image map), mf (MetaFont), mp
36 (MetaPost), mmp (Multi-MetaPost), pcx, pdf, pdftex, pdftex_t,
37 pic, pict2e, pictex, png, ppm, ps, pstex, pstex_t, pstricks, ptk
38 (Perl/tk), shape (LaTeX shaped paragraphs), sld (AutoCad slide
39 format), svg (beta driver), textyl, tiff, tikz, tk (tcl/tk),
40 tpic, xbm and xpm.
41
42 Notes:
43 dvips and xdvi must be compiled with the tpic support (-DTPIC)
44 for epic, eepic and tpic to work.
45 You must have ghostscript and ps2pdf, which comes with the
46 ghostscript distribution to get the pdf output and the bitmap
47 formats (png, jpeg, etc.), and the netpbm (pbmplus) package to
48 get gif, xbm, xpm, and sld output.
49
50
51 -h Print help message with all options for all output languages
52 then exit.
53
54
55 -V Print the program version number and exit.
56
57
58 -D +/-rangelist
59 With +rangelist, keep only those depths in the list. With
60 -rangelist, keep all depths except those in the list. The
61 rangelist may be a list of comma-separated numbers or ranges
62 separated by colon (:). For example, -D +10,40,55:70,80 means
63 keep only layers 10, 40, 55 through 70, and 80.
64
65
66 -K The selection of the depths with the -D +/-rangelist option does
67 normally not affect the calculation of the bounding box. Thus
68 the generated document might have a much larger bounding box
69 than necessary. If -K is given then the bounding box is adjusted
70 to include only those objects in the selected depths.
71
72
73 -G minor[:major][:unit]
74 Draws a grid on the page. Specify thin, or thin and thick line
75 spacing in one of several units. For example, -G .25:1cm draws
76 a thin, gray line every .25 cm and a thicker gray line every 1
77 cm. Specifying -G 1in draws a thin line every 1 inch. Frac‐
78 tions may be used, e.g. -G 1/16:1/2in will draw a thin line
79 every 1/16 inch (0.0625 inch) and a thick line every 1/2 inch.
80 Allowable units are: i, in, inch, f, ft, feet, c, cm, mm, and m.
81 Only allowed for PostScript, EPS, PDF, and bitmap (GIF, JPEG,
82 etc) drivers for now.
83
84
85 -j Enable the I18N internationalization facility.
86
87
88 -m mag Set the magnification at which the figure is rendered to mag.
89 The default is 1.0. This may not be used with the maxdimension
90 option (-Z).
91
92
93 -s fsize
94 Set the default font size (in points, 1/72 inch) for text
95 objects to fsize. The default is 11*mag, and thus is scaled by
96 the -m option. If there is no scaling, the default font is
97 eleven point Roman.
98
99
100 -Z maxdimension
101 Scale the figure so that the maximum dimension (width or height)
102 is maxdimension inches or cm, depending on whether the figure
103 was saved with imperial or metric units. This may not be used
104 with the magnification option (-m).
105
106
107 other options
108 The other options are specific to the choice of graphics lan‐
109 guage, as described below.
110
111
112
114 -b borderwidth
115 Make blank border around figure of width borderwidth.
116
117
118 -F Use correct font sizes (points, 1/72 inch) instead of the tradi‐
119 tional size that xfig/fig2dev uses, which is 1/80 inch. The
120 corresponding xfig command-line option is -correct_font_size.
121
122
123 -g color
124 Use color for the background.
125
126
127 -N Convert all colors to grayscale.
128
129
130 -S smoothfactor
131 This will smooth the output by passing smoothfactor to ghost‐
132 script in the -dTextAlphaBits and -dGraphicsAlphaBits options to
133 improve font rendering and graphic smoothing. A value of 2 for
134 smoothfactor provides some smoothing and 4 provides more.
135
136
137
139 -t color
140 Use color for the transparent color in the GIF file. This must
141 be specified in the same format that ppmmake(1) allows. It may
142 allow an X11 color name, but at least you may use a six-digit
143 hexadecimal RGBvalue using the # sign, e.g. #ff0000 (Red).
144
145
146
148 -q image_quality
149 use the integer value image_quality for the JPEG "Quality" fac‐
150 tor. Valid values are 0 - 100, with the default being 75.
151
152
153
155 CGM is Computer Graphics Metafile, developed by ISO and ANSI and is a
156 vector-based plus bitmap language. Microsoft WORD, PowerPoint and
157 probably other products can import this format and display it on the
158 screen, something that they won't do with EPS files that have an ASCII
159 preview.
160
161
162 -b dummyarg
163 Generate binary output (dummy argument required after the -b).
164
165
166 -r Position arrowheads for CGM viewers that display rounded arrow‐
167 heads. Normally, arrowheads are pointed, so fig2dev compensates
168 for this by moving the endpoint of the line back so the tip of
169 the arrowhead ends where the original endpoint of the line was.
170 If the -r option is used, the position of arrows will NOT be
171 corrected for compensating line width effects, because the
172 rounded arrowhead doesn't extend beyond the endpoint of the
173 line.
174
175
176
178 DXF is the Drawing Interchange File Format. The output to DXF is
179 experimental.
180
181
182 -a Select ANSI A paper size instead of the default ISO A4.
183
184
185 -d xll,yll,xur,yur
186 Restrict plotting to a rectangular area of the plotter paper
187 which has a lower left hand corner at (xll,yll) and a upper
188 right hand corner at (xur,yur). All four numbers are in inches
189 and follow -d in a comma-separated list - xll,yll,xur,yur - with
190 no spaces between them.
191
192
193 -P Rotate the figure to portrait mode. The default is landscape
194 mode.
195
196
197 -v Plot the figure upside-down in portrait mode or backwards in
198 landscape mode.
199
200
201
203 EMF is Enhanced Metafile, developed by Microsoft and is a vector-based
204 plus bitmap language. Microsoft WORD, PowerPoint and probably other
205 products can import this format and display it on the screen, something
206 that they won't do with EPS files that have an ASCII preview.
207
208
209
211 EPIC is an enhancement to LaTeX picture drawing environment.
212
213 EEPIC is an extension to EPIC and LaTeX picture drawing environment
214 which uses tpic specials as a graphics mechanism. It was written by
215 Conrad Kwok of Division of Computer Science at University of Califor‐
216 nia, Davis. Conrad Kwok has also written the EEPIC driver of fig2dev.
217
218 EEPIC-EMU is an EEPIC emulation package which does not use tpic spe‐
219 cials.
220
221
222 -A factor
223 Scale arrowheads by factor. The width and height of arrowheads
224 is divided by this factor. This is because EPIC arrowheads are
225 normally about double the size of TeX arrowheads.
226
227
228 -E num Set encoding for text translation (0 = none, 1 = ISO-8859-1, 2 =
229 ISO-8859-2; default 1).
230
231
232 -F Don't set the font face, series, and style; only set it's size
233 and the baselineskip. By default, fig2dev sets all 5 font param‐
234 eters when it puts some text. The disadvantage is that you can't
235 set the font from your LaTeX document. With this option on, you
236 can set the font from your LaTeX document.
237
238 If any of the pictures included in your LaTeX document has been
239 generated with -F, then all pictures must be generated with this
240 option.
241
242
243 -f font
244 Set the default font used for text objects to font, where font
245 is one of rm, bf, it, sf or tt. The default is rm.
246
247
248 -l lwidth
249 Use "\thicklines" when the width of the line is equal or wider
250 than lwidth. The default is 2.
251
252
253 -P Generate a complete LaTeX file. In other words, the output file
254 can be formatted without requiring any changes.
255
256
257 -R Allow rotated text. Rotated text will be set using the \rotate‐
258 box command. So, you will need to include "\usepackage{graph‐
259 ics}" in the preamble of your LaTeX document.
260
261 If this option is not set, then rotated text will be set hori‐
262 zontally.
263
264
265 -S scale
266 Set the scale to which the figure is rendered. This option
267 automatically sets the magnification and fsize to scale/12 and
268 scale respectively.
269
270
271 -t stretch
272 Set the stretch factor of dashed lines to stretch. The default
273 is 30.
274
275
276 -v Include comments in the output file.
277
278
279 -W Enable variable line width. By default, only two line widths
280 are available: The normal line width ("\thinlines"), and thick
281 lines ("\thicklines"). See also the -l option above.
282
283
284 -w Disable variable line width. Only "\thicklines" and/or "\thin‐
285 lines" commands will be generated in the output file.
286
287 When variable line width option is enabled, the "\thinlines"
288 command is still used when the line width is less than
289 LineThick. One potential problem is that the width of "\thin‐
290 lines" is 0.4pt but the resolution of Fig is 1/80 inch (approx.
291 1pt). If LineThick is set to 2, normal lines will be drawn in
292 0.4pt wide lines but the next line width is already 2pt. One
293 possible solution is to set LineThick to 1 and set the width of
294 those lines you want to be drawn in "\thinlines" to 0.
295
296 Due to this problem, variable line width is disabled by default
297 (-w).
298
299
300
302 IBM-GL (IBM Graphics Language) is compatible with HP-GL (Hewlett-
303 Packard Graphics Language).
304
305
306 -a Select ANSI A paper size instead of the default ISO A4.
307
308
309 -c Generate instructions for an IBM 6180 Color Plotter without an
310 IBM Graphics Enhancement Cartridge (IBM-GEC).
311
312
313 -d xll,yll,xur,yur
314 Restrict plotting to a rectangular area of the plotter paper
315 which has a lower left hand corner at (xll,yll) and a upper
316 right hand corner at (xur,yur). All four numbers are in inches
317 and follow -d in a comma-separated list - xll,yll,xur,yur - with
318 no spaces between them.
319
320
321 -f fontfile
322 Load text character specifications from the table in the file
323 fontfile. The table must have 36 entries - one for each font
324 plus a default. Each entry consists of 5 numbers which specify
325 the
326 1.) standard character set (0 - 4, 6 - 9, 30 - 39),
327 2.) alternate character set (0 - 4, 6 - 9, 30 - 39),
328 3.) character slant angle (degrees),
329 4.) character width scale factor and
330 5.) character height scale factor.
331
332
333 -k Precede output with PCL command to use HP/GL.
334
335
336 -l pattfile
337 Load area fill line patterns from the table in the pattfile
338 file. The table must have 21 entries - one for each of the area
339 fill patterns. Each entry consists of 5 numbers which specify
340 the
341 1.) pattern number (-1 - 6),
342 2.) pattern length (inches),
343 3.) fill type (1 - 5),
344 4.) fill spacing (inches) and
345 5.) fill angle (degrees).
346
347
348 -m mag,x0,y0
349 The magnification may appear as the first element in a comma
350 separated list - mag,x0,y0 - where the second and third parame‐
351 ters specify an offset in inches.
352
353
354 -P Rotate the figure to portrait mode. The default is landscape
355 mode.
356
357
358 -p penfile
359 Load plotter pen specifications from the table in the penfile
360 file. The table must have 9 entries - one for each color plus a
361 default. Each entry consists of 2 numbers which specify the
362 1.) pen number (1 - 8) and
363 2.) pen thickness (millimeters).
364
365
366 -S speed
367 Set the pen speed to speed (centimeters/second).
368
369
370 -v Plot the figure upside-down in portrait mode or backwards in
371 landscape mode. This allows you to write on the top surface of
372 overhead transparencies without disturbing the plotter ink on
373 the bottom surface.
374
375 Fig2dev may be installed with either ANSI A or ISO A4 default paper
376 size. The -a option selects the alternate paper size. Fig2dev does
377 not fill closed splines. The IBM-GEC is required to fill other poly‐
378 gons. Fig2dev may be installed for plotters with or without the IBM-
379 GEC. The -c option selects the alternate instruction set.
380
381
382
384 -d dmag
385 Set a separate magnification for the length of line dashes to
386 dmag.
387
388
389 -E num Set encoding for latex text translation (0 = no translation, 1 =
390 ISO-8859-1, 2 = ISO-8859-2; default 1).
391
392
393 -F Don't set the font face, series, and style; only set it's size
394 and the baselineskip. By default, fig2dev sets all 5 font param‐
395 eters when it puts some text. The disadvantage is that you can't
396 set the font from your LaTeX document. With this option on, you
397 can set the font from your LaTeX document.
398
399 If any of the pictures included in your LaTeX document has been
400 generated with -F, then all pictures must be generated with this
401 option.
402
403
404 -f font
405 Set the default font used for text objects to font, where font
406 is one of rm, bf, it, sf or tt. The default is rm.
407
408
409 -l lwidth
410 Sets the threshold between LaTeX thin and thick lines to lwidth
411 pixels. LaTeX supports only two different line widths: \thin‐
412 lines and \thicklines. Lines of width greater than lwidth pix‐
413 els are drawn as \thicklines. Also affects the size of dots in
414 dotted line style. The default is 1.
415
416
417 -v Verbose mode.
418
419
420 LaTeX cannot accurately represent all the graphics objects which can be
421 described by Fig. For example, the possible slopes which lines may
422 have are limited. Some objects, such as spline curves, cannot be drawn
423 at all. Fig2latex chooses the closest possible line slope, and prints
424 error messages when objects cannot be drawn accurately.
425
426
427
429 Xfig version 3.2.3 and later saves and allows the user to edit comments
430 for each Fig object. The fig2dev map output language will produce an
431 HTML image map using Fig objects that have href="some_html_reference"
432 in their comments. Any Fig object except compound objects may used for
433 this. Usually, besides generating the map file, you would also gener‐
434 ate a PNG file, which is the image to which the map refers.
435
436 For example, you may have an xfig drawing with an imported image that
437 has the comment href="go_here.html" and a box object with a comment
438 href="go_away.html". This will produce an image map file such the user
439 may click on the image and the browser will load the "go_here.html"
440 page, or click on the box and the browser will load the "go_away.html"
441 page.
442
443 After the map file is generated by fig2dev you will need to edit it to
444 fill out any additional information it may need.
445
446
447 -b borderwidth
448 Make blank border around figure of width borderwidth.
449
450
451
453 fig2dev scales the figure by 1/8 before generating METAFONT code. The
454 magnification can be further changed with the -m option or by giving
455 magnification options to mf.
456
457 In order to process the generated METAFONT code, the mfpic macros must
458 be installed where mf can find them. The mfpic macro package is avail‐
459 able at any CTAN cite under the subdirectory: graphics/mfpic
460
461
462 -C code
463 specifies the starting METAFONT font code. The default is 32.
464
465
466 -n name
467 specifies the name to use in the output file.
468
469
470 -p pen_magnification
471 specifies how much the line width should be magnified compared
472 to the original figure. The default is 1.
473
474
475 -t top specifies the top of the whole coordinate system. The default
476 is ypos.
477
478
479 -x xmin
480 specifies the minimum x coordinate value of the figure (inches).
481 The default is 0.
482
483
484 -y ymin
485 specifies the minimum y coordinate value of the figure (inches).
486 The default is 0.
487
488
489 -X xmax
490 specifies the maximum x coordinate value of the figure (inches).
491 The default is 8.
492
493
494 -Y ymax
495 specifies the maximum y coordinate value of the figure (inches).
496 The default is 8.
497
498
499
501 -i file
502 Include file content via \input-command.
503
504
505 -I file
506 Include file content as additional header.
507
508
509 -o Old mode (no latex).
510
511
512 -p number
513 Adds the line "prologues:=number" to the output.
514
515
516
518 -f font
519 Set the default font used for text objects to font, where font
520 is one of R (roman), B (bold), I (italic), H (sans serif) or C
521 (typewriter). The default is R.
522
523
524 -p ext Enables the use of certain PIC extensions which are known to
525 work with the groff package; compatibility with DWB PIC is
526 unknown. The extensions enabled by each option are:
527
528 arc Allow ARC_BOX i.e. use rounded corners
529 line Use the 'line_thickness' value
530 fill Allow ellipses to be filled
531 all Use all of the above
532 psfont Don't convert PostScript fonts generic type
533 (useful for files going to be Ditroff'ed for
534 and printed on PS printer). DWB-compatible.
535 allps Use all of the above (i.e. "all" + "psfont")
536
537
539 PICT2E is an enhancement to the LaTeX picture environment. It is
540 enabled by inserting "\usepackage{pict2e}" in the document preamble.
541 Depending on the content of the figure, it may be necessary to also
542 include "\usepackage{color}" and "\usepackage{graphics}". Figures pro‐
543 duced with the PICT2E driver can be processed with any LaTeX engine,
544 e.g., LaTeX + dvips, LaTeX + dvipdfm, pdflatex, xelatex, or ConTeX.
545 Pattern fills are not supported by the PICT2E output language. The
546 PICT2E driver renders patterns by filling the respective area with the
547 pen-color at 25% intensity, i.e., a 75% tint of the pen-color. The
548 PICT2E driver allows one to choose any font available to the LaTeX
549 engine, including PostScript fonts. Apart from patterns and, possibly,
550 text fonts, figures produced with PICT2E are identical to figures pro‐
551 duced with the PostScript driver.
552
553
554 -b borderwidth
555 Make blank border around figure of width borderwidth*(1/72)
556 inches.
557
558
559 -C num Do not emit a \color-command for the color number num. (0 =
560 black, 1 = blue, 2 = green - see the color chooser widget in
561 Xfig). By default, fig2dev does not issue a \color-command for
562 objects which have the color set to "Default" in xfig. With
563 this option, the "\color"-command is also omitted for objects
564 having the color num. The color of these objects, as well as of
565 those having the color set to "Default", is picked up from the
566 including LaTeX-document.
567
568 The option -C 0 is particularly useful. By default, xfig starts
569 with the color set to black. Then, fig2dev emits
570 "\color{black}" commands, and the color-package must be included
571 in the document preamble. For black text and black-and-white
572 drawings, this is superfluous.
573
574
575 -e Do not try to be compatible with epic/eepic. By default, you
576 can include "\usepackage{pict2e, epic, eepic}" (in this order!)
577 in the document preamble and mix LaTeX pictures using the
578 epic/eepic command set and pictures produced with the PICT2E
579 output language within one document. With this option on, epic
580 or eepic pictures can not be mixed with PICT2E-pictures.
581
582 By default, fig2dev avoids the use of the "\circle" and
583 "\oval"-commands, which are defined by epic, in lieu of the
584 "\circlearc"-command exclusive to pict2e. In addition, line
585 widths are not only set using "\linethickness", but also with
586 the eepic-command "\allinethickness" (if it is defined).
587
588
589 -E num Set encoding for text translation (0 = no translation, 1 =
590 ISO-8859-1, 2 = ISO-8859-2; default 1). For instance, to use
591 utf8-encoded text, first create a text object, then edit the
592 text using the edit-button in xfig. Convert the fig-file to
593 pict2e with the option -E 0 and include "\usepackage[utf8]{inpu‐
594 tenc}" in the LaTeX file (not necessary when using xelatex). In
595 xfig, the text typed in may not be displayed correctly, but the
596 document produced from the LaTeX file will show the same text as
597 was typed in.
598
599
600 -F Do not set the font family, series or shape. By default,
601 fig2dev sets the font family, series, shape, font size and base‐
602 lineskip. With this option on, the text font can be set from
603 the including LaTeX-document, e.g., "\itshape
604 \input{fig1.pict2e}". See also -o (no font size).
605
606
607 -f font
608 Set the default font used for text objects to font. The string
609 font may be one of rm, bf, it, sf, tt, \rmfamily, \bfseries,
610 \itshape, \sffamily, \ttfamily, or one of the 35 standard Post‐
611 Script font names. The default is \rmfamily.
612
613
614 -i dir Prepend the string dir to graphics files included in the pict2e-
615 picture. For instance, having imported "image.jpg" in xfig,
616 with - i '$HOME/Figures/' the code "\incudegraphics{$HOME/Fig‐
617 ures/image.jpg}" will be generated.
618
619
620 -o Do not set the font size or baselineskip. Text will be rendered
621 at the size that is in force where the pict2e-code is inserted
622 into the LaTeX-document, e.g., "\small \input{fig1.pict2e}".
623 See also -F (no font properties).
624
625
626 -O Do not quote characters special to TeX/LaTeX. Useful to get,
627 e.g., an italic x, not $x$, because it was forgotten to set the
628 text-flag "special-text" in xfig. This option effectively sets
629 the "special-text" flag for all text.
630
631
632 -P Pagemode, generate a stand-alone LaTeX-file as out-file. The
633 document produced from the LaTeX-file will have the paper size
634 equal to the figure's bounding box (but see the -b option to add
635 a margin). The generated LaTeX-file calls the package "geome‐
636 try.sty" to set the paper size.
637
638
639 -R num Replace arrowheads num by LaTeX-arrows ("\vector"). The number
640 of an arrowhead ("Arrow Type" in xfig) can be found by opening
641 the arrow chooser widget in xfig and counting the arrows, start‐
642 ing from 1. For instance, to replace filled triangle arrowheads
643 with LaTeX \vector-commands, use -R 3.
644
645
646 -r Replace all arrows by LaTeX-arrows.
647
648
649 -T Only use TeX fonts, even where PostScript-fonts are specified.
650
651
652 -v Verbose mode. Write comment lines into the output file, usually
653 naming the type of the object that is drawn.
654
655
656 -w Remove the suffix from included graphics-files. With this
657 option on, fig2dev generates code that contains, e.g.,
658 "\includegraphics{fig1}", instead of "\includegraph‐
659 ics{fig1.eps}".
660
661
662
664 In order to include PiCTeX pictures into a document, it is necessary to
665 load the PiCTeX macros.
666
667 PiCTeX uses TeX integer register arithmetic to generate curves, and so
668 it is very slow. PiCTeX draws curves by \put-ing the psymbol repeat‐
669 edly, and so requires a large amount of TeX's internal memory, and gen‐
670 erates large DVI files. The size of TeX's memory limits the number of
671 plot symbols in a picture. As a result, it is best to use PiCTeX to
672 generate small pictures.
673
674
675 -a Anonymous mode. Do not write the user name into the output file.
676
677
678 -E num Set encoding for latex text translation (0 = no translation, 1 =
679 ISO-8859-1, 2 = ISO-8859-2; default 1).
680
681
682 -f font
683 Set the default font used for text objects to font, where font
684 is one of rm, bf, it, sf or tt. The default is rm.
685
686
687 -l dimen
688 Set line thickness to dimen. Default "1pt".
689
690
691 -p psymbol
692 Set the psymbol. Default "\makebox(0,0)[l]{\tencirc\sym‐
693 bol{'160}}".
694
695
696 -r Do not allow rotated text. Otherwise, files with PiCTeX macros
697 and rotated text need to be processed with dvips.
698
699
701 Typically you will wish to set the y scale to -1. See -g for more
702 information.
703
704
705 -d [mm|in]
706 Output dimensions should be assumed to be millimeters (mm) or
707 inches (in). The default is millimeters.
708
709
710 -p [pos|neg]
711 Select the image polarity. For positive images lines drawn in
712 the fig file will generate lines of material. For negative
713 images lines drawn in the fig file will result in removed mate‐
714 rial. Consider etching a chrome on glass transmission mask.
715 Drawing lines in the fig file and choosing 'neg' will result in
716 these lines being etched through the chrome, leaving transparent
717 lines.
718
719
720 -g <x scale>x<y scale>+<x offset>+<y offset>
721 This controls the geometry of the output, scaling the dimensions
722 as shown and applying the given offset. Typically you will wish
723 to set the y scale to -1, mirroring about the x axis. This is
724 because Gerber assumes the origin to be bottom left, while xfig
725 selects top left.
726
727
728 -f <n digits>.<n digits>
729 This controls the number of digits of precision before and after
730 the implied decimal point. With -f 5.3 the following number
731 12345678 corresponds to 12345.678. Whereas with -f 3.5 it cor‐
732 responds to 123.45678. The default is for 3 places before the
733 decimal point and 5 after. This corresponds, to a range of 0 to
734 1m in 10 micron increments.
735
736
737 -i [on|off]
738 Controls the output of comments describing the type of objects
739 being output. The text appears as comments starting with ## on
740 each line in the output file. By default this is on.
741
742
743
745 With PostScript, xfig can be used to create multiple page figures Spec‐
746 ify the -M option to produce a multi-page output. For posters, add -O
747 to overlap the pages slightly to get around the problem of the unprint‐
748 able area in most printers, then cut and paste the pages together. Due
749 to memory limitations of most laser printers, the figure should not
750 have large imported images (bitmaps). Great for text with very big let‐
751 ters.
752
753 The EPS driver has the following differences from PostScript:
754 o No showpage is generated because the output is meant to be
755 imported into another program or document and not printed
756 o The landscape/portrait options are ignored
757 o The centering option is ignored
758 o The multiple-page option is ignored
759 o The paper size option is ignored
760 o The x/y offset options are ignored
761
762 The EPS driver has the following two special options:
763
764
765 -B 'Wx [Wy X0 Y0]'
766 This specifies that the bounding box of the EPS file should have
767 the width Wx and the height Wy. Note that it doesn't scale the
768 figure to this size, it merely sets the bounding box. If a
769 value less than or equal to 0 is specified for Wx or Wy, these
770 are set to the width/height respectively of the figure. Origin
771 is relative to screen (0,0) (upper-left). Wx, Wy, X0 and Y0 are
772 interpreted in centimeters or inches depending on the measure
773 given in the fig-file. Remember to put either quotes (") or
774 apostrophes (') to group the arguments to -B.
775
776
777 -R 'Wx [Wy X0 Y0]'
778 Same as the -B option except that X0 and Y0 is relative to the
779 lower left corner of the figure. Remember to put either quotes
780 (") or apostrophes (') to group the arguments to -R.
781
782 The PDF driver uses all the PostScript options.
783
784 Text can now include various ISO-character codes above 0x7f, which is
785 useful for language specific characters to be printed directly. Not
786 all ISO-characters are implemented.
787
788 Color support: Colored objects created by Fig can be printed on a color
789 postscript printer. There are 32 standard colors: black, yellow, white,
790 gold, five shades of blue, four shades of green, four shades of cyan,
791 four shades of red, five shades of magenta, four shades of brown, and
792 four shades of pink. In addition there may be user-defined colors in
793 the file. See the xfig FORMAT3.2 file for the definition of these col‐
794 ors. On a monochrome printer, colored objects will be mapped into dif‐
795 ferent grayscales by the printer. Filled objects are printed using the
796 given area fill and color. There are 21 "shades" going from black to
797 full saturation of the fill color, and 21 more "tints" from full satu‐
798 ration + 1 to white. In addition, there are 16 patterns such as
799 bricks, diagonal lines, crosshatch, etc.
800
801
802 -A Add an ASCII (EPSI) preview.
803
804
805 -b borderwidth
806 Make blank border around figure of width borderwidth.
807 Not available in EPS.
808
809
810 -C dummy_arg
811 Add a color *binary* TIFF preview for Microsoft products that
812 need a binary preview. See also -T (monochrome preview). A
813 dummy argument must be supplied for historical reasons.
814
815
816 -c option centers the figure on the page. The centering may not be
817 accurate if there are texts in the fig_file that extends too far
818 to the right of other objects.
819
820
821 -e option puts the figure against the edge (not centered) of the
822 page. Not available in EPS.
823
824
825 -F Use correct font sizes (points, 1/72 inch) instead of the tradi‐
826 tional size that xfig/fig2dev uses, which is 1/80 inch. The
827 corresponding xfig command-line option is -correct_font_size.
828
829
830 -f font
831 Set the default font used for text objects to font, where font
832 is one of the 35 standard PostScript font names. The default is
833 Times-Roman.
834
835
836 -g color
837 Use color for the background.
838
839
840 -l dummy_arg
841 Generate figure in landscape mode. The dummy argument is
842 ignored, but must appear on the command line for reasons of com‐
843 patibility. This option will override the orientation specifi‐
844 cation in the file (for file versions 3.0 and higher).
845 Not available in EPS.
846
847
848 -M Generate multiple pages if figure exceeds paper size.
849 Not available in EPS.
850
851
852 -N Convert all colors to grayscale.
853
854
855 -n name
856 Set the Title part of the PostScript output to name. This is
857 useful when the input to fig2dev comes from standard input.
858
859
860 -O When used with -M, overlaps the pages slightly to get around the
861 problem of the unprintable area in most printers.
862 Not available in EPS.
863
864
865 -p dummy_arg
866 Generate figure in portrait mode. The dummy argument is
867 ignored, but must appear on the command line for reasons of com‐
868 patibility. This option will override the orientation specifi‐
869 cation in the file (for file versions 3.0 and higher). This is
870 the default for Fig files of version 2.1 or lower.
871 Not available in EPS.
872
873
874 -T Add a monochrome *binary* TIFF preview for Microsoft products
875 that need a binary preview. See also -C (color preview).
876
877
878 -x offset
879 Shift the figure in the X direction by offset PostScript points
880 (1/72 inch). A negative value shifts the figure to the left and
881 a positive value to the right.
882 Not available in EPS.
883
884
885 -y offset
886 Shift the figure in the Y direction by offset points (1/72
887 inch). A negative value shifts the figure up and a positive
888 value down.
889 Not available in EPS.
890
891
892 -z papersize
893 Set the papersize. Not available in EPS.
894 Available paper sizes are:
895
896 Letter (8.5" x 11" also A),
897 Legal ( 11" x 14")
898 Ledger ( 11" x 17"),
899 Tabloid ( 17" x 11", really Ledger in Landscape mode),
900 A (8.5" x 11" also Letter),
901 B ( 11" x 17" also Ledger),
902 C ( 17" x 22"),
903 D ( 22" x 34"),
904 E ( 34" x 44"),
905 A9 ( 37 mm x 52 mm),
906 A8 ( 52 mm x 74 mm),
907 A7 ( 74 mm x 105 mm),
908 A6 (105 mm x 148 mm),
909 A5 (148 mm x 210 mm),
910 A4 (210 mm x 297 mm),
911 A3 (297 mm x 420 mm),
912 A2 (420 mm x 594 mm),
913 A1 (594 mm x 841 mm),
914 A0 (841 mm x1189 mm),
915 B10 ( 32 mm x 45 mm),
916 B9 ( 45 mm x 64 mm),
917 B8 ( 64 mm x 91 mm),
918 B7 ( 91 mm x 128 mm),
919 B6 (128 mm x 182 mm),
920 B5 (182 mm x 257 mm),
921 B4 (257 mm x 364 mm),
922 B3 (364 mm x 515 mm),
923 B2 (515 mm x 728 mm),
924 B1 (728 mm x1030 mm),
925 B0 (1030mm x1456 mm).
926
927
929 The pstex language is a variant of ps which suppresses formatted (spe‐
930 cial) text. The pstex_t language has the complementary behavior: it
931 generates only the LaTeX special text and the commands necessary to
932 position special text, and to overlay the PostScript file generated
933 using pstex. These two drivers can be used to generate a figure which
934 combines the flexibility of PostScript graphics with LaTeX text format‐
935 ting of special text.
936
937
938 -F Use correct font sizes (points) instead of the traditional size
939 that xfig/fig2dev uses, which is 1/80 inch. The corresponding
940 xfig command-line option is -correct_font_size.
941
942
943 -g color
944 Use color for the background.
945
946
947 -n name
948 Set the Title part of the PostScript output to name. This is
949 useful when the input to fig2dev comes from standard input.
950
952 The pstex_t language produces only the LaTeX special text and the com‐
953 mands necessary to position special text, and to overlay the PostScript
954 file generated using pstex. (see above)
955
956
957 -E num Set encoding for latex text translation (0 no translation, 1
958 ISO-8859-1, 2 ISO-8859-2; default 1)
959
960
961 -F Don't set the font face, series, and style; only set it's size
962 and the baselineskip. By default, fig2dev sets all 5 font param‐
963 eters when it puts some text. The disadvantage is that you can't
964 set the font from your LaTeX document. With this option on, you
965 can set the font from your LaTeX document (like "\sfshape \input
966 picture.eepic").
967
968
969 -p file
970 specifies the name of the PostScript file to be overlaid. If
971 not set or its value is null then no PS file will be inserted.
972
973
974
976 The PSTricks driver provides full LaTeX text and math formatting for
977 XFig drawings without overlaying separate outputs as in the PSTEX meth‐
978 ods. The output matches the quality of output of the PostScript driver
979 except for text, where the Latex font selection mechanism is used as
980 for other fig2dev LaTeX drivers. In addition, text is rendered black,
981 although font color-changing LaTex code can be embedded in the drawing.
982 The generated PSTricks code is meant to be readable. Each command
983 stands alone, not relying on global option state variables. Thus the
984 user can easily use XFig to rough out a PSTricks drawing, then finish
985 by hand editing.
986
987 To use the driver's output, give the command "\usepackage{pstricks}" in
988 your document preamble. The graphicx and pstricks-add packages may
989 also be required. The former is used for bitmap graphics and the sec‐
990 ond for complex line styles and/or hollow PSTricks arrows (with the -R
991 1 option). The driver will tell you which packages are needed. In the
992 document body, include the figure with "\input{pstfile}" where pst‐
993 file.tex is the output file. Use the XFig special flag to have text
994 passed as-is to LaTeX. For non-special text, the same mechanism as the
995 LaTeX and epic driver mechanism is used to match font specs, but this
996 is imprecise.
997
998
999 Known bugs and limitations.
1000 PSTricks support for join styles is version dependent. Raw post‐
1001 script is inserted with "\pstVerb" for old versions when other
1002 than angle joins are needed. The -t option controls this behav‐
1003 ior. PSTricks does not support rotated ellipses directly, so a
1004 rput command is emitted that rotates and locates a horizontal
1005 ellipse. This makes a problem with hatch patterns, which are
1006 moved and rotated along with the ellipse. Hatch rotation is
1007 fixed by a counter-rotation, but the origin is not adjusted, so
1008 registration with adjacent hatch patterns will be incorrect.
1009 Flipped bitmap graphics use an undocumented feature of the
1010 graphicx package: a negative height flips the image vertically.
1011 This appears to work reliably. However, you may want to flip
1012 graphics with another program before including them in Xfig
1013 drawings just to be sure. With the -p option, the driver
1014 attempts to convert non-EPS pictures to EPS with the TeX distri‐
1015 bution's bmeps program, but bmeps does not know about very many
1016 file formats including gif.
1017
1018
1019 -f font
1020 Set the default font used for text objects to font, where font
1021 is one of rm, bf, it, sf or tt. The default is rm.
1022
1023
1024 -G dummy_arg
1025 Draws a standard PSTricks grid in light gray, ignoring the size
1026 parameters, numbered in PSTricks units.
1027
1028
1029 -l weight
1030 Sets a line weight factor that is multiplied by the actual Fig
1031 line width. The default value 0.5 roughly matches the output of
1032 the PS driver.
1033
1034
1035 -n 0|1|2|3
1036 Sets environment type. Default 0 creates a \picture environment
1037 with bounding box exactly enclosing the picture (but see -x and
1038 -y ). A 1 emits bare PSTricks commands with no environment at
1039 all, which can be used with \input{commands} inside an existing
1040 \pspicture. A 2 emits a complete LaTeX document. A 3 also
1041 emits a complete LaTeX document but attempts to set the PSTricks
1042 unit to fit a 7.5 by 10 inch (portrait aspect) box.
1043
1044
1045 -P Shorthand for -n 3.
1046
1047
1048 -p dir Attempts to run the bmeps program to translate picture files to
1049 EPS, which is required by PSTricks. The translated files go in
1050 dir , which must already exist (the driver will not create it).
1051 Moreover, (BIG CAVEAT HERE) the driver overwrites files with
1052 impunity in this directory! Don't put your stuff here. The
1053 includegraphics commands in the output file refer to this direc‐
1054 tory. Even if the -p option is not used, includegraphics com‐
1055 mands follow this convention with the default directory ./eps .
1056 In this case, the user must do the conversions independently.
1057 The bmeps program is part of the standard TeX distribution. It
1058 converts the following formats to EPS: png jpg pnm tif. You can
1059 see the bmeps command with the -v option.
1060
1061
1062 -R 0|1|2
1063 Sets arrow style. With the default style 0, Fig arrows are con‐
1064 verted to lines and polygons. With style 1, the Fig arrowhead
1065 dimensions are converted to PSTricks arrowhead dimensions and
1066 PSTricks arrowhead options are emitted. Hollow arrows will
1067 require the additional package pstricks-add. With style 2,
1068 PSTricks arrowhead options are emitted with no dimensions at
1069 all, and arrowhead size may be controlled globally with psset.
1070
1071
1072 -S scale
1073 Scales the image according to the same convention as the EPIC
1074 driver, i.e., to size scale/12.
1075
1076
1077 -t version
1078 Provides the driver with PSTricks version number so output can
1079 match expected LaTeX input.
1080
1081
1082 -v Print verbose warnings and extra comments in the output file.
1083 Information provided includes font substitution details, the
1084 bmeps commands used for picture conversion, if any, and one com‐
1085 ment per Fig object in the output.
1086
1087
1088 -x marginsize
1089 Adds marginsize on the left and right of the PStricks bounding
1090 box. By default, the box exactly encloses the image.
1091
1092
1093 -y marginsize
1094 Adds marginsize on the top and bottom of the PStricks bounding
1095 box. By default, the box exactly encloses the image.
1096
1097
1098
1099 -z 0|1|2
1100 Sets font handling option. Default option 0 attempts to honor
1101 Fig font names and sizes, finding the best match with a standard
1102 LaTeX font. Option 1 sets LaTeX font size only. Option 2
1103 issues no font commands at all.
1104
1105
1106
1108 -f font
1109 Set the default font used for text objects to font, where font
1110 is one of rm, bf, it, sf or tt. The default is rm.
1111
1112
1113 -l lwidth
1114 Set the line thickness. lwidth must be a value between 1 and 12.
1115
1116
1118 TIKZ is a powerful frontend to the Portable Graphics Format (PGF)
1119 developed by Till Tantau, now at the University of Lübeck. TIKZ was
1120 developed to be as platform-independent as possible, i.e., tikz-code
1121 can be processed with plain TeX, pdftex, xetex, LaTeX, ConTeX, pdfla‐
1122 tex, lualatex, or combinations of LaTeX + dvips, LaTeX + dvipdfm or
1123 others. The TIKZ-code emitted by fig2dev tries to maintain this porta‐
1124 bility. For instance, a tikz-picture is commenced with \tikzpicture
1125 (TeX-style), to not exclude any processing engine. However, the stand-
1126 alone file produced with the -P option must be processed with a LaTeX-
1127 engine. In addition, font-commands may require a LaTeX engine.
1128
1129
1130 -b borderwidth
1131 Make blank border around figure of width borderwidth*(1/72)
1132 inches.
1133
1134
1135 -C num Do not emit a \color-command for the color number num. (0 =
1136 black, 1 = blue, 2 = green - see the color chooser widget in
1137 Xfig). By default, fig2dev does not issue a \color-command for
1138 objects which have the color set to "Default" in xfig. With
1139 this option, the "\color"-command is also omitted for objects
1140 having the color num. The color of these objects, as well as of
1141 those having the color set to "Default", is picked up from the
1142 including document.
1143
1144
1145 -E num Set encoding for text translation (0 = no translation, 1 =
1146 ISO-8859-1, 2 = ISO-8859-2; default 1). For instance, to use
1147 utf8-encoded text, first create a text object, then edit the
1148 text using the edit-button in xfig. Convert the fig-file to tikz
1149 with the option -E 0 and include "\usepackage[utf8]{inputenc}"
1150 in the LaTeX file (not necessary when using xelatex). In xfig,
1151 the text typed in may not be displayed correctly, but the docu‐
1152 ment produced from the LaTeX file will show the same text as was
1153 typed in.
1154
1155
1156 -F Do not set the font family, series or shape. By default,
1157 fig2dev sets the font family, series, shape, font size and base‐
1158 lineskip. As a side effect, this requires the New Font Selec‐
1159 tion Scheme (NFSS) of LaTeX. With this option on, the text font
1160 can be set from the including document, which may be TeX or
1161 LaTeX. See also -o (no font size).
1162
1163
1164 -f font
1165 Set the default font used for text objects to font. The string
1166 font may be one of rm, bf, it, sf, tt, \rmfamily, \bfseries,
1167 \itshape, \sffamily, \ttfamily, or one of the 35 standard Post‐
1168 Script font names. The default is \rmfamily.
1169
1170
1171 -i dir Prepend the string dir to graphics files included in the tikz-
1172 picture. For instance, having imported "image.jpg" in xfig,
1173 with - i '$HOME/Figures/' the code "\pgfimage[width=...,
1174 height=...]{$HOME/Figures/image.jpg}" will be generated.
1175
1176
1177 -o Do not set the font size or baselineskip. Text will be rendered
1178 at the size that is in force where the tikz-code is inserted
1179 into the document, e.g., "\small\input fig1.tikz". See also -F
1180 (no font properties).
1181
1182
1183 -O Do not quote characters special to TeX/LaTeX. Useful to get,
1184 e.g., an italic x, not $x$, because it was forgotten to set the
1185 text-flag "special-text" in xfig. This option effectively sets
1186 the "special-text" flag for all text.
1187
1188
1189 -P Pagemode, generate a stand-alone LaTeX-file as out-file. The
1190 document produced from the LaTeX-file will have the paper size
1191 equal to the figure's bounding box (but see the -b option to add
1192 a margin). The generated LaTeX-file calls the package "geome‐
1193 try.sty" to set the paper size.
1194
1195
1196 -T Only use TeX fonts, even where PostScript-fonts are specified.
1197
1198
1199 -v Verbose mode. Write comment lines into the output file, usually
1200 naming the type of the object that is drawn.
1201
1202
1203 -w Remove the suffix from included graphics-files. With this
1204 option on, fig2dev generates code that contains, e.g., "\pgfim‐
1205 age{fig1}", instead of "\pgfimage{fig1.pdf}".
1206
1207
1209 -l dummy_arg
1210 Generate figure in landscape mode. The dummy argument is
1211 ignored, but must appear on the command line for reasons of com‐
1212 patibility. This option will override the orientation specifi‐
1213 cation in the file (for file versions 3.0 and higher).
1214
1215
1216 -p dummy_arg
1217 Generate figure in portrait mode. The dummy argument is
1218 ignored, but must appear on the command line for reasons of com‐
1219 patibility. This option will override the orientation specifi‐
1220 cation in the file (for file versions 3.0 and higher). This is
1221 the default for Fig files of version 2.1 or lower.
1222
1223
1224 -P Generate canvas of full page size instead of using the bounding
1225 box of the figure's objects. The default is to use only the
1226 bounding box.
1227
1228
1229 -z papersize
1230 Set the paper size. See the POSTSCRIPT OPTIONS for available
1231 paper sizes. This is only used when the -P option (use full
1232 page) is used.
1233
1234
1235
1237 -f font
1238 Set the default font used for text objects to font. The default
1239 is rm. The string font can be one of rm, bf, it, sf, tt, avant,
1240 avantcsc, avantd, avantdi, avanti, bookd, bookdi, bookl,
1241 booklcsc, bookli, chanc, cour, courb, courbi, couri, helv,
1242 helvb, helvbi, helvc, helvcb, helvcbi, helvci, helvcsc, helvi,
1243 pal, palb, palbi, palbu, palc, palcsc, pali, palsl, palu, palx,
1244 times, timesb, timesbi, timesc, timescsc, timesi, timessl or
1245 timesx.
1246
1247
1248
1250 [x]fig(1), pic(1), pic2fig(1), transfig(1)
1251
1252
1253
1255 Please send bug reports, fixes, new features etc. to:
1256 thomas.loimer@tuwien.ac.at
1257
1258 Arc-boxes are not supported for the tk output language, and only X bit‐
1259 map pictures are supported because of the canvas limitation in tk.
1260
1261 Picture objects are not scaled with the magnification factor for tk
1262 output.
1263
1264 Because tk scales canvas items according to the X display resolution,
1265 polygons, lines, etc. may be scaled differently than imported pictures
1266 (bitmaps) which aren't scaled at all.
1267
1268 Rotated text is only supported in the IBM-GL (HP/GL) and PostScript
1269 (including eps) languages.
1270
1272 Copyright (c) 1991 Micah Beck
1273 Parts Copyright (c) 1985 Supoj Sutantavibul
1274 Parts Copyright (c) 1989-1999 Brian V. Smith
1275
1276 Permission to use, copy, modify, distribute, and sell this software and
1277 its documentation for any purpose is hereby granted without fee, pro‐
1278 vided that the above copyright notice appear in all copies and that
1279 both that copyright notice and this permission notice appear in sup‐
1280 porting documentation. The authors make no representations about the
1281 suitability of this software for any purpose. It is provided "as is"
1282 without express or implied warranty.
1283
1284 THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
1285 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
1286 EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSE‐
1287 QUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
1288 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
1289 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER‐
1290 FORMANCE OF THIS SOFTWARE.
1291
1292
1293
1295 Micah Beck
1296 Cornell University
1297 Sept 28 1990
1298
1299 and Frank Schmuck (then of Cornell University)
1300 and Conrad Kwok (then of U.C. Davis).
1301
1302 Drivers contributed by
1303 Jose Alberto Fernandez R. (U. of Maryland)
1304 and Gary Beihl (MCC)
1305
1306 Color support, ISO-character encoding and poster support by
1307 Herbert Bauer (heb@regent.e-technik.tu-muenchen.de)
1308
1309 Modified from f2p (fig to PIC), by the author of Fig
1310 Supoj Sutanthavibul (supoj@sally.utexas.edu)
1311 University of Texas at Austin.
1312
1313 MetaFont driver by
1314 Anthony Starks (ajs@merck.com)
1315
1316 X-splines code by
1317 Carole Blanc (blanc@labri.u-bordeaux.fr)
1318 Christophe Schlick (schlick@labri.u-bordeaux.fr)
1319 The initial implementation was done by C. Feuille, S. Grobois, L.
1320 Maziere and L. Minihot as a student practice (Universite Bordeaux,
1321 France).
1322
1323 Japanese text support for LaTeX output written by T. Sato
1324 (VEF00200@niftyserve.or.jp)
1325
1326 The tk driver was written by
1327 Mike Markowski (mm@udel.edu) with a little touch-up by Brian Smith
1328
1329 The CGM driver (Computer Graphics Metafile) was written by
1330 Philippe Bekaert (Philippe.Bekaert@cs.kuleuven.ac.be)
1331
1332 The EMF driver (Enhanced Metafile) was written by
1333 Michael Schrick (m_schrick@hotmail.com)
1334
1335 The GBX (Gerber) driver was written by
1336 Edward Grace (ej.grace@imperial.ac.uk).
1337
1338
1339
1340Version 3.2.6a Jan 2017 fig2dev(1)