[Tex/LaTex] Feynmf doesn’t produce feynman diagram at all in TXC

diagramsmetafontpackagestexniccenter

I am trying to draw a feynman diagram using feynmf in TXC.
I use the following code

    \documentclass{article}
    \usepackage{feynmf}
    \begin{document}
    \unitlength = 1mm
    % determine the unit for the size of diagram.
    ... here comes an example with feynmf
     \begin{fmffile}{one}   %one.mf will be created for this feynman diagram  
       \fmfframe(1,7)(1,7){     %Sets dimension of Diagram
       \begin{fmfgraph*}(110,62) %Sets size of Diagram
        \fmfleft{i1,i2} %Sets there to be 2 sources 
        \fmfright{o1,o2}    %Sets there to be 2  outputs
        \fmflabel{$e^-$}{i1} %Labels one of the left sources
        \fmflabel{$e^+$}{i2} %Labels one of the left sources
        \fmflabel{${\ensuremath{\erlpm}}$}{o1} %Labels one of the right outputs
        \fmflabel{${\ensuremath{\erlpm}}$}{o2} %Labels one of the right outputs
        \fmf{fermion}{i1,v1,i2} %Connects the sources with a vertex.
        \fmf{fermion}{o1,v2,o2} %Connects the outputs with a vertex.
        \fmf{photon,label=$\gamma/Z^0$}{v1,v2} %Labels the conneting line.
       \end{fmfgraph*}
      }
    \end{fmffile}

The thing is, that no error occurs, however no diagram is printed.
Searching the web I found that I have to run LaTeX, then run metafont and run LaTeX again.
Somehow I have to pre-produce the file "ome.mf" and run, I don't know how to do it, though.
Any ideas?

Best Answer

Running (pdf)latex on the file should produce a file called one.mf in the same directory as your main .tex file.

You need to open a command window (or DOS shell, or whatever it's called) cd to the directory and issue

mf one.mf

However, you can say

\usepackage{feynmp}

which will create one.mp. You'd run

mpost one.mp

This is vastly more efficient than the Metafont method.

For even more convenience, use the feynmp-auto package, which will automatically run mpost (for this to work with MikTex you have to add the -enable-write18 switch to the argument list of (pdf)latex)

Related Question