
NAME

fig2lat - Fig to LaTeX conversion

SYNOPSIS

  fig2lat [-l <driver>] [<options>] [-o <key>=<value>]* <file>

DESCRIPTION

The program converts *.fig drawings created using XFig or jFig
to other graphics formats, mainly for use with the LaTeX typesetting
system.

OPTIONS

-l <driver>
 	chooses a driver, one from the following:

	Drivers to use a Fig file with latex or pdflatex:

	pdf.tex		produces a *.tex/*.pdf file pair.
			Include the *.tex file in your LaTeX source, the
			*.tex file includes the *.pdf file.

	eps.tex		produces a *.tex/*.eps file pair.
			Include the *.tex file in your LaTeX source, the
			*.tex file includes the *.eps file.

	pgf		produces a *.pgf file for inclusion in a *.tex
			source.

	Drivers to produce a standalone image:

	tex.pdf		produces a full *.tex file for use with pdflatex.
			A file file-i.pdf is produced additionally,
			this file is included by the *.tex file.

	tex		produces a full *.tex file for use with pdflatex.
			The image is embedded as a PGF image.

	eps		produces a standalone EPS file.

	svg		produces a standalone SVG file.

-m
	activates make-mode when running on a directory to convert
	files only if no destination files up to date are found.

-o key=value
	sets key/value options, may be used multiple times.
	The following keys can be used:


	General options:

	lw=<width>		Change the line width base.
				The default for Fig files is 1/80 inch.
				Width can be one of the following:
				<number>bp	PS points
				<number>pt	Width in pt
				<number>in	Width in inch
				<number>cm	Width in cm
				<number>mm	Width in mm
				lighten		Use 1/160 inch
				auto		0.4pt * textsize / 10

	Text handling options

	tf=<string>		Text font selection for normal (non-special)
				text.  Either ``similar'' or ``fig''.

	ts=<size>		Font size factor for normal (non-special) text.
				Either the keyword ``none'' or a scale factor
				(typically in the range 0.95 ... 1.0).

	bbts[=<boolean>]	Use text size in bounding box calculaion.

	smash[=<boolean>]	Use \smash instruction in LaTeX output.

	mbox[=<boolean>]	Use \mbos instruction in LaTeX output.

	reset@font		Use \reset@font instruction in LaTeX output.

	ste[=<encoding>]	Encoding used when writing special text
				to output file. Either ``plain'' or
				``utf-8''.


	X-Spline and Bezier-Spline options

	xsss[=<number>]		Number of Bezier-Spline subsegments per
				X-spline segment. Default: 8, minimum: 2.


	Arrowhead options:

	ahas=<number>		Number of X-spline segments for a 90 degree
				angle on arcs. Default: 4.

	ahss=<integer>		Number of arrowhead X-spline segments
				for each original X-spline segment for
				arrowheads on splines. Default: 4.

	ahms=<integer>		Minimum number of X-spline segments for
				each arrowhead edge. Default: 4

	ahip=<float>		Arrowhead iteration precision. Default: 0.04.


	Output options:

	codi=[<number>]		Number of digits used for colors. Default: 3.


	Compatibilty options (compatibility to fig2dev):

	cosp[=<boolean>]	Compatible splines.

	coah[=<boolean>]	Compatible arrowheads.

	xsah[=<boolean>]	X-spline arrowheads (not together with coah).

	cols[=<boolean>]	Compatible line styles.

	cofop[=<boolean>]	Compatible fill for open paths.


	Source type (mutually exclusive):

	xfig			File produced by XFig

	jfig			File produced by jFig.

	winfig			File produced by WinFIG.


	Driver specific options (tex, tex.pdf):

	dcts[=<number>]		Font size in pt used in the document class.


	Driver specific options (eps, eps.tex):

	showpage[=<boolean>]	Use showpage operator.

	level=<integer>		PS level, 2 or 3.

	Driver specific options (svg)

	css[=<boolean>]		Use CSS styling.

	group[=<boolean>]	Group arrowhead objects with the object they
				are attached to.

	fragment[=<boolean>]	Write an SVG fragment instead of a complete
				file.

	fontbase[=<string>]	Specify source for GhostScript fonts
				converted to TTF, "none", "local", or "web".

	replacementfonts=[<boolean>]	enables/disables use of replacement
					font families.

	miterlimit[=<boolean>]	Enables or disables use of "stroke-miterlimit"
				style setting.


RETURN VALUE

The program returns exit status code 0 on success, any other value
indicates an error.

FILES

Fig2lat uses the following files from the current working directory:

f2lfonts.tex	is used in the preamble of tex and tex.pdf output, the file
		contents replaces the font selection packages.

f2lother.tex	is used in the preamble of tex and tex.pdf output, the file
		contents replaces the packages for "other setup".

NOTES

There are differences between the output from fig2lat and the output
from fig2dev. This is intended, otherwise we would not need an additional
program.

* Interpolated X-splines: Fig2lat uses the correct formula q=-0.5*s
  as described in [BS1995].

* Arrowheads: All arrowhead types introduced in xfig 3.2.5 are supported.
  On splines and arcs we have curved arrowheads. The same line width as
  for the original line is used for the arrowhead too, the arrowhead
  linewidth specified in the Fig file is ignored.

* Text: When using LaTeX/pdfLaTeX related drivers (tex, tex.pdf, pdf.tex,
  eps.tex, pgf) all text is handled by LaTeX/pdfLaTeX. The tf setting
  controls whether to use PS fonts or similar feature LaTeX fonts for
  normal text. For special text no font selection instructions are written
  at all, so document default fonts are used.

* Fill patterns: Fill patterns are vector graphics in fig2lat.

* Splines: X-splines are converted to a sequence of Bezier splines instead
  of polylines.

KNOWN ISSUES

* The curved arrowheads on arcs and splines are implemented as sequences
  of short - sometimes very short - Bezier curves.
  At least for my arrowtest.fig test file I saw malformed arrowheads
  in some renderers although the same graphics were shown fine in other
  renderers.
  You can avoid the problem by using the coah option (compatible arrowheads).
  For Batik 1.7 Squiggle you can also attempt the miterlimit=no option.

AUTHOR

Dipl.-Ing. Dirk Krause

HISTORY

This program replaces the fig2vect program seen in previous versions
of dktools.

COPYRIGHT AND LICENSE

Run
  fig2lat --license-terms
to see the license conditions.

SEE ALSO

[BS1995]	Carole Blanc, Christophe Schlick:
		X-Splines: A Spline Model Designed for the End-User
		Proceedings of the SIGGRAPH 1995

[fig2lat]	http://dktools.sourceforge.net

