[Home] / Mac setup / LaTeX stuffs / Feynman 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.
If you have installed MacTeX,
skip to 2. You already have feynmf/feynmp under /usr/local/texlive/...
Otherwise:
$ cd ~/Downloads/feynmf $ latex (or platex) feynmf.ins
$ 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
\documentclass{article} \usepackage{feynmp} \begin{document} \unitlength = 1mm \begin{fmffile}{gluon} \begin{fmfgraph}(40,25) \fmfleft{in} \fmfright{out} \fmf{curly}{in,out} \end{fmfgraph} \end{fmffile} \end{document}
% mpost gluonThis will read gluon.mp and create gluon.1 which is actually an EPS file.
\documentclass{article} \usepackage{feynmp} \begin{document} \unitlength = 1mm \begin{fmffile}{foo} \begin{fmfgraph}(40,25) ..... example ... \end{fmfgraph} \end{fmffile} \end{document}The file name (shown as "foo" above) should be named properly.
\fmfleft{v1,v2,v3} ,and not like
fmfleft{v1, v2, v3} [WRONG].Otherwise, you will get get a message like:
feynmf: warning: dangling vertex `v1' colliding with `v2'. feynmf: Have you seen the warning messages above?when you run mp.
2013-11-17: Taku Yamanaka