I am trying to create Feynman diagrams with LaTeX/MetaPost and feynmp seems like the perfect package to do so. I had no problems with the tutorial and can generate the diagram itself in .eps without problems. But once I started labeling each diagram, the edges of the diagram get cropped off like this:
What am I doing wrong? Here's my code:
% feynman.tex
\documentclass{article}
\usepackage{feynmp}
\usepackage{amsmath}
\begin{document}
\unitlength = 1mm
\begin{fmffile}{diagram}
\gdef\P#1#2{%
\begin{fmfgraph*}(70,20)
\fmfi{#1}{#2}
\def\L##1##2{\fmfiv{%
dec.shape=circle,dec.size=3thin,
dec.fill=1,lab.dist=5thick,
lab=\noexpand\texttt{%
\noexpand\scriptsize ##1}}{##2}}
\L{sw}{sw}\L{.3[nw,,ne]}{.3[nw,ne]}
\L{ne}{ne}\L{.7[sw,,se]}{.7[sw,se]}
\end{fmfgraph*}}
\P{plain}{sw .. .3[nw,ne]
.. .7[sw,se] .. ne}
\end{fmffile}
\end{document}
dec.fill=1
), and this (white) fill covers the lines.\P
is not a good idea, in my opinion. However, I get the full output with this code. Also, the two\noexpand
commands are wrong, because they annihilate the effect of\texttt
and of\scriptsize
.\noexpand
commands are wrong, but even with them I see the whole curve. How are you compiling the example? Withlatex+dvips+ps2pdf
?dvipdfm
it doesn't work. Why aren't you usingpdflatex
?\usepackage{feynmp-auto}
instead of\usepackage{feynmp}
, which doesn't require runningmpost
(just the twopdflatex
runs are sufficient). If you have an up-to-date TeX distribution it should work.