Menu

fig2lat

Dirk Krause
← Previous ↑ Home ↑ Programs → Next

fig2lat — Convert XFig → PDF+TeX / EPS+TeX / PGF

Fig2lat converts Fig drawings created in XFig, jFig or WinFIG to vector graphics formats used in LaTeX/pdfLaTeX environments.

  • Standalone images
    Fig2lat can produce *.tex files for direct pdflatex processing resulting in a standalone PDF file.
  • Objects for inclusion in LaTeX documents
    Fig2lat can produce *.tex files or *.tex/*.pdf or *.tex/*.eps file pairs for inclusion in LaTeX documents.

Main features

  • All arrowheads introduced in Xfig 3.2.5 are supported.
  • Curved arrowheads on curved lines (splines, arcs).
  • Different text handling modes available:
    When producing objects for inclusion in LaTeX documents you can decide to either use fonts exactly as specified in the Fig file or to use a font with matching features from the LaTeX documents font setup.
  • Correct formula q=-0.5s for interpolated splines. A compatibility mode using q=-s is available.
  • Smaller gaps in dotted, dashed and dash-dotted lines. A compatibility mode with gaps as long as dashes is available.
  • Fill patterns use vector graphics operations.
  • Variable line width. Fig2lat allows to specify a base line width (object line widths are multiples of the base line width) differing from 1/80 inch (0.9bp) specified in the Fig file format specification.
    Guidelines for illustrating books recommend to use the line width of vertical lines in characters like "H" or "T" for lines in illustrations — typically 0.4pt.
    Fig2lat allows you to configure a base line with, either in bp, pt, in, cm, or mm. Alternatively you can choose "auto" using 0.4pt for a text size of 10pt and scaling for other text sizes.

Examples

Produce PDF+TeX file pair for image

To produce a PDF+TeX file pair (x.pdf and x.tex) from the x.fig file:

fig2lat -l pdf.tex x.fig

To include the image in a LaTeX document you want to process with pdflatex:

\begin{figure}%
{\centering%
\input{x.tex}\caption{My image}\label{fig:my-image}%
}%
\end{figure}

Produce EPS+TeX file pair for image

To produce a EPS+TeX file pair (x.eps and x.tex) from the x.fig file:

fig2lat -l eps.tex x.fig

To include the image in a LaTeX document you want to process with LaTeX/dvixxx

\begin{figure}%
{\centering%
\input{x.tex}\caption{My image}\label{fig:my-image}%
}%
\end{figure}

Produce PGF file for image

To produce a PGF file x.pgf from the x.fig file:

fig2lat -l pgf x.fig

To include the image in a LaTeX document:

\begin{figure}%
{\centering%
\input{x.pgf}\caption{My image}\label{fig:my-image}%
}%
\end{figure}

Produce standalone PDF file

To produce a standalone PDF file x.pdf from the x.fig file:

fig2lat -l tex x.fig
pdflatex x

Alternatively you can use

fig2lat -l tex.pdf x.fig
pdflatex x

instead.


Conversion to other file formats

The [gxhints:wiki:Home] page shows how to convert from fig to eps, pdf, svg, png, jpeg, ico, and xpm.


Manual

See the [fig2lat manual] for the full documentation.


← Previous ↑ Home ↑ Programs → Next

Related

Wiki: Home
Wiki: fig2lat manual
gxhints - Graphics conversion hints: Wiki: Home