fig2vect

SourceForge.net Logo
Yet another Fig to vector converter

Usage

PDF manual "fig2vect.pdf" available
german version "f2vde.pdf" available too
Command line options
Configuration file
Option processing order
Configuration entry lines
For all drivers
General options
Number precision
Spline processing
Arrowheads
Fill patterns and dash patterns
Embedded images
Text typesetting
MetaPost driver
Arrowheads
Text typesetting
PS/EPS driver
PS level and PS structure
Virtual memory
Encoding of embedded bitmaps
PDF driver
General options
Fill patterns
Embedded bitmap images
TeX driver
SVG driver
SVG header and structure
Object attributes
Text typesetting
ECMA script (JavaScript)

Command line options

The program is invoked by typing
 
  fig2vect  options
  fig2vect  options inputfile
  fig2vect  options inputfile outputfile
  fig2vect  options directory

 
The program runs as a filter if no input file name is specified. If the output file name is omitted the program writes output to standard output.
When the program is run on a directory name the directory is traversed. Each *.fig file is converted into an appropriate output file. If make-style behaviour is turned on a conversion is started only for *.fig files which are newer than the output files to produce.
 
The following options are available:

-h
--help
prints a help text.
-v
--version
prints the version number.
-C
--show-configuration
shows the permanent options in use.
-c
--configure
configures permanent options.
-u
--unconfigure
removes all permanent options.
-r
--reset
resets all permanent options for this one program invokation.
-m
--make
enables make-style behaviour when running on a directory.
-m-
--make=off
disables make-style behaviour when running on a directory.
-a
automatically chooses an output file name if no output file name was specified. The file name is based on the input file name and the output driver.
-l configuration
--language=configuration
chooses a configuration for output.
-o key=value
--option=key=value
overrides a configuration entry configured in the fig2vect.cfg file.

Configuration file

Option processing order

The program uses a configuration file /etc/fig2vect/fig2vect.cfg. Users can keep their own copy of the file in $HOME/.defaults/fig2vect.cfg and apply modifications as needed to that file.
The file consists of a general options section (introduced by [*]), driver-specific sections (introduced i.e. by [mp]) and configuration definition sections (introduced i.e. by [mp.pdf]). The name of a configuration consists of the driver name and additional identifiers separated by a dot.
Option processing order is:

  1. General options section
  2. Driver options section
  3. Configuration definition section
  4. Option overrides on the command line
So if you run
fig2vect -l mp.pdf -o tex.command=tex test.fig test.mp
settings are obtained from the "[*]" section, the "[mp]" section, the "[mp.pdf]" section. Finally the tex command is overwritten by the "-o tex.command=tex" command line argument.

Configuration entry lines

All settings are written as key=value lines. Keys are multipart strings, the parts are separated by whitespaces in the configuration file, by dots when overriding options on the command line.
 
The following configuration entries lines can be used: