SysTutorials

Linux Manual Pages › Section 1

fig2dev(1)

NAME

fig2dev – translates Fig code to various graphics languages

SYNOPSIS

fig2dev [-L language] [-m mag] [-s fsize] [-Z maxdimension] [-D +/-rangelist [-K]] [other options] [fig-file [out-file]]

fig2dev -h|-V

DESCRIPTION

fig2dev

translates fig code in the named fig-file into the specified graphics language and puts them in out-file. The graphics language is inferred from the suffix of out-file, or it must be given with the -L option. The default fig-file and out-file are standard input and standard output, respectively. A minus (-) in place of fig-file or out-file also denotes either standard input or standard output.

Xfig (Facility for Interactive Generation of figures) is a screen-oriented tool which runs under the X Window System, and allows the user to draw and manipulate objects interactively. This version of fig2dev is compatible with xfig versions 1.3, 1.4, 2.0, 2.1, 3.0, 3.1 and 3.2.

Xfig version 3.2.3 and later saves and allows the user to edit comments for each Fig object. These comments are output with several of the output languages, such as PostScript, CGM, EMF, LaTeX, MetaFont, PicTeX, (as % comments), tk (as # comments), and pic (as .\" comments).

GENERAL OPTIONS (all drivers)

-L language
Set the output graphics language. Valid languages are box, cgm, dxf, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg, latex, map (HTML image map), mf (MetaFont), mp (MetaPost), pcx, pdf, pdftex, pdftex_t, pic, pict2e, pictex, png, ppm, ps, pstex, pstex_t, pstricks, ptk (Perl/tk), shape (LaTeX shaped paragraphs), sld (AutoCad slide format), svg, textyl, tiff, tikz, tk (tcl/tk), tpic, xbm and xpm.

Notes:
You must have ghostscript installed to get the pdf output, and ghostscript and one from the netpbm, the ImageMagick or the GraphicsMagick packages to get the bitmap formats (png, jpeg, etc.).

-h
Print help message with all options for all output languages then exit.
-V
Print the program version number and exit.
-D +/-rangelist
With +rangelist, keep only those depths in the list. With -rangelist, keep all depths except those in the list. The rangelist may be a list of comma-separated numbers or ranges separated by colon (:). For example, -D +10,40,55:70,80 means keep only layers 10, 40, 55 through 70, and 80.
-K
The selection of the depths with the -D +/-rangelist option does normally not affect the calculation of the bounding box. Thus the generated document might have a much larger bounding box than necessary. If -K is given then the bounding box is adjusted to include only those objects in the selected depths.
-G minor[:major][:unit]
Draws a grid on the page. Specify thin, or thin and thick line spacing in one of several units. For example, -G .25:1cm draws a thin, gray line every .25 cm and a thicker gray line every 1 cm. Specifying -G 1in draws a thin line every 1 inch. Fractions may be used, e.g. -G :1/2in will draw a thick line every 1/2 inch.
Allowable units are: i, in, inch, f, ft, feet, c, cm, mm, and m.
Only allowed for PostScript, EPS, PDF, pstricks, tikz and bitmap (GIF, JPEG, etc) drivers.
-j
Enable the I18N internationalization facility.
-m mag
Set the magnification at which the figure is rendered to mag. The default is 1.0. This may not be used with the maxdimension option (-Z).
-s fsize
Set the default font size (in points, 1/72 inch) for text objects to fsize. The default is 11*mag, and thus is scaled by the -m option. If there is no scaling, the default font is eleven point Roman.
-Z maxdimension
Scale the figure so that the maximum dimension (width or height) is maxdimension inches or cm, depending on whether the figure was saved with imperial or metric units. This may not be used with the magnification option (-m).
other options
The other options are specific to the choice of graphics language, as described below.

OPTIONS COMMON TO ALL BITMAP FORMATS

-b borderwidth
Make blank border around figure of width borderwidth (1/72 inch).
-F
Use correct font sizes (points, 1/72 inch) instead of the traditional size that xfig/fig2dev uses, which is 1/80 inch. The corresponding xfig command-line option is -correct_font_size.
-g color
Use color for the background.
-N
Convert all colors to grayscale.
-S smoothfactor
This will smooth the output by passing smoothfactor to ghostscript in the -dTextAlphaBits and -dGraphicsAlphaBits options to improve font rendering and graphic smoothing. A value of 2 for smoothfactor provides some smoothing and 4 provides more.

GIF OPTIONS

-t color
Use color for the transparent color in the GIF file. This must be specified in the same format that ppmmake(1) allows. It may allow an X11 color name, but at least you may use a six-digit hexadecimal RGBvalue using the # sign, e.g. #ff0000 (Red).

JPEG OPTIONS

-q image_quality
use the integer value image_quality for the JPEG "Quality" factor. Valid values are 0 – 100, with the default being 75.

CGM OPTIONS

CGM is Computer Graphics Metafile, developed by ISO and ANSI and is a vector-based plus bitmap language. Microsoft WORD, PowerPoint and probably other products can import this format and display it on the screen, something that they won’t do with EPS files that have an ASCII preview.

-a
Generate binary output.
-r
Position arrowheads for CGM viewers that display rounded arrowheads. Normally, arrowheads are pointed, so fig2dev compensates for this by moving the endpoint of the line back so the tip of the arrowhead ends where the original endpoint of the line was. If the -r option is used, the position of arrows will NOT be corrected for compensating line width effects, because the rounded arrowhead doesn’t extend beyond the endpoint of the line.

DXF OPTIONS

DXF is the Drawing Interchange File Format. The output to DXF is experimental.

-a
Select ANSI A paper size instead of the default ISO A4.
-d xll,yll,xur,yur
Restrict plotting to a rectangular area of the plotter paper which has a lower left hand corner at (xll,yll) and a upper right hand corner at (xur,yur). All four numbers are in inches and follow -d in a comma-separated list – xll,yll,xur,yur – with no spaces between them.
-P
Rotate the figure to portrait mode. The default is landscape mode.
-v
Plot the figure upside-down in portrait mode or backwards in landscape mode.

EMF OPTIONS

EMF is Enhanced Metafile, developed by Microsoft and is a vector-based plus bitmap language. Microsoft WORD, PowerPoint and probably other products can import this format and display it on the screen, something that they won’t do with EPS files that have an ASCII preview.

-l lang
Set the compatibility level to lang, where lang is one of win95, win98 or winnt. The default is winnt.
-r
Position arrowheads for EMF viewers that display rounded arrowheads. See the discussion of the -r option for the CGM output driver above.

EPIC OPTIONS

EPIC is an enhancement to LaTeX picture drawing environment.

EEPIC is an extension to EPIC and LaTeX picture drawing environment which uses tpic specials as a graphics mechanism. It was written by Conrad Kwok of Division of Computer Science at University of California, Davis. Conrad Kwok has also written the EEPIC driver of fig2dev.

EEPIC-EMU is an EEPIC emulation package which does not use tpic specials.

-d factor
Scale arrowheads by factor. The width and height of arrowheads is divided by this factor. This is because EPIC arrowheads are normally about double the size of TeX arrowheads.
-E num
Set encoding for text translation (0 = none, 1 = ISO-8859-1, 2 = ISO-8859-2; default 1).
-F
Don’t set the font face, series, and style; only set it’s size and the baselineskip. By default, fig2dev sets all 5 font parameters when it puts some text. The disadvantage is that you can’t set the font from your LaTeX document. With this option on, you can set the font from your LaTeX document.
If any of the pictures included in your LaTeX document has been generated with -F, then all pictures must be generated with this option.
-f font
Set the default font used for text objects to font, where font is one of rm, bf, it, sf or tt. The default is rm.
-l lwidth
Use " hicklines" when the width of the line is equal or wider than lwidth. The default is 2.
-P
Generate a complete LaTeX file. In other words, the output file can be formatted without requiring any changes.
-R dummyarg
Allow rotated text. Rotated text will be set using the otatebox command. So, you will need to include "