[Home] / Mac setup / LaTeX stuffs / Feynman Diagram

feynMF/feynMP - Drawing Feynman Diagram

tree diagram

feynMFis a tool made by Thorsten Ohl to draw Feynman diagrams with LaTeX.

There are two ways to make Feynman diagrams; feynMF makes diagrams as special bitmap fonts, whereas feynMP makes diagrams as EPS files. Here, I will describe how to use feynMP, since it is simpler and the output is cleaner.

I also assume that you have MacTeX or platex for Japanese installed, and have TeXShop for Mac OS X, but even otherwise you should be able to use feynMP on your system.

1. How to install feynMF/feynMP

If you have installed MacTeX, skip to 2. You already have feynmf/feynmp under /usr/local/texlive/...

  1. Download feynmf.zip from CTAN site.
  2. Expand the zip file (by double clicking). (On Leopard, the folder shows up under "Downloads" in Dock.)
  3. From Terminal, type
    $ cd ~/Downloads/feynmf
    $ latex (or platex) feynmf.ins
  4. Next, copy 4 files into the following directories.
    $ mkdir -p ~/Library/texmf/tex/feynmf
    $ mkdir -p ~/Library/texmf/metafont/feynmf
    $ mkdir -p ~/Library/texmf/metapost/feynmf
    $ cp feynmf.sty ~/Library/texmf/tex/feynmf
    $ cp feynmp.sty ~/Library/texmf/tex/feynmf
    $ cp feynmf.mf ~/Library/texmf/metafont/feynmf
    $ cp feynmp.mp ~/Library/texmf/metapost/feynmf

2. A simple example

  1. With TeXShop, let's make a simple diagram. Make simple latex source, my_gluon.tex, as follows.
    	    \unitlength = 1mm
  2. Typeset it by hitting "Typeset" button. This will create gluon.mp in the same directory as my_gluon.tex.
  3. On Terminal, change directory to whre my_gluon.tex exists, and do
    	% mpost gluon
    This will read gluon.mp and create gluon.1 which is actually an EPS file.
  4. Typeset the latex file again. Voilla! A curly gluon line
    will show up.

3. How to draw something more useful

4. Tips

2013-11-17: Taku Yamanaka