5

I am using feynmp to generate Feynman diagrams with pdflatex. Everything seems to be working but my labels are not showing up.

What is wrong?

\documentclass{minimal}
\usepackage{feynmp}

% Needed to interpret generated *.1, *.2 etc. as ps files.
\DeclareGraphicsRule{*}{mps}{*}{} 

\begin{document}
Here is a vertex for a local potential in momentum space:
\begin{fmffile}{fgraphs}
  \begin{fmfgraph}(40,30) 
    % Note that the size is given in normal parentheses instead of curly
    % brackets in units of \unitlength (default 1pt). 
    \fmfleft{i1,i2} % Define external vertices from bottom to top 
    \fmfright{o1,o2} 
    \fmf{fermion}{i1,v1,o1} 
    \fmf{fermion}{i2,v2,o2} 
    \fmf{photon,tension=0.3}{v1,v2}

    % These labels are missing! 
    \fmflabel{$\vec{p}$}{i1}
    \fmflabel{$\vec{q}$}{i2}
    \fmflabel{$\vec{p}+\vec{k}$}{o1}
    \fmflabel{$\vec{p}-\vec{k}$}{o2}
  \end{fmfgraph}
\end{fmffile}
\end{document}

Save this to tst.tex and compile with:

pdflatex tst
mpost fgraphs
pdflatex tst
pdflatex tst
  • I have removed the spacing "noise" from the MWE: It is now in this question. – mforbes Jan 16 '12 at 10:23
4

Use the starred form \begin{fmfgraph*}.

  • 1
    This workes, but the labels are outside the bounding box and mix in with the surrounding text. Any way to work around this nicely? – Martin Ueding Jun 13 '15 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.