Gavin Salam's web
Home
Publications
Talks
feynfig logo

FeynFig is a program to generate feynman diagrams in xfig format, which can also be translated to SVG format with the fig2dev program. It can be used in two ways: one can write an input file describing the feynman diagram to be drawn. FeynFig will then convert this to an xfig file.

A second, often more convenient approach, is to use FeynFig to generate a template of gluons, quarks, photons, ... These can then be copied into any program that can read XFig or SVG files. That allows individual parts to be, copied, moved, rotated, restyled (and in some programs chopped), in order to produce the final diagram that is desired. Some sample templates are included with the distribution or can be downloaded below

FeynFig is based on FeynMongo by Paolo Nason and Manfred Lindner. It was adapted for xfig and enhanced by Gavin Salam with further additions and man page by Thomas Pollehn.

Download current version: feynfig-1.2b.tar.gz

Usage with Keynote

Keynote (v14 and above) has the facility to import svg files. Download any of the following svg files, or download and unpack feynfig-svgs.tgz.

Then from Finder,

  1. Drag the svg file into your Keynote file,
  2. Select the resulting object,
  3. From the menubar choose Format → Shapes and Lines → Break Apart.
That will make it editable, e.g. to change colour, line thickness, etc. At the time of writing (May 2024) it is not possible to drag the images directly from a webpage.

Available SVGs

fermion1.3.svg fermion2.0.svg fermion2.5.svg cfermion120.svg cfermion180.svg

dfermion1.3.svg dfermion2.0.svg dfermion2.5.svg

gluon1.3.svg gluon2.0.svg gluon2.5.svg cgluon1.0_120.svg cgluon1.0_180.svg cgluon120.svg cgluon180.svg

photon1.3.svg photon2.0.svg photon2.5.svg cphoton120.svg cphoton180.svg

pomeron1.3.svg pomeron2.0.svg pomeron2.5.svg vertex.svg

Usage with xfig

You may also want to download an XFig library file, Feynman_Diagrams.tgz, containing various basic Feynman diagram elements. This should be uncompressed in the xfig library directory, for example (on RedHat Fedora):

cd /usr/X11R6/lib/X11/xfig/Libraries/
gunzip -c Feynman_Diagrams.tgz | tar xvf - 
The feynman diagram elements will be available from the library tool on your next invocation of xfig. Note that this has not been tested in quite a while.
Gavin Salam

Last modified: Sun Apr 6 19:53:01 MET DST 1997