0

My question is similar to the one from this post: How does one draw a momentum arrow along a line in feynmf?.

However, I want to know if it is possible to draw a momentum arrow along a line using the feynmf package instead of the feynmp-auto one.

I used this solution:

\usepackage{feynmp-auto}
\newcommand{\marrow}[5]{%
    \fmfcmd{style_def marrow#1
    expr p = drawarrow subpath (1/4, 3/4) of p shifted 6 #2 withpen pencircle scaled 0.4;
    label.#3(btex #4 etex, point 0.5 of p shifted 6 #2);
    enddef;}
    \fmf{marrow#1,tension=0}{#5}}
\begin{document}
\setlength{\unitlength}{1mm}
\begin{fmffile}{marrows}
    \begin{fmfgraph*}(50,30)
        \fmfleftn{i}{2}
        \fmfrightn{o}{2}
        \fmf{fermion}{i1,v1,o1}
        \fmf{fermion}{i2,v2,o2}
        \fmf{photon,label=$\gamma$}{v1,v2}
        \fmfdotn{v}{2}
        \fmflabel{$e^-$}{i1}
        \fmflabel{$e^-$}{o1}
        \fmflabel{$\mu^-$}{i2}
        \fmflabel{$\mu^-$}{o2}
        % Momentum arrows
        \marrow{a}{down}{bot}{$p_1$}{i1,v1}
        \marrow{b}{up}{top}{$p_2$}{i2,v2}
        \marrow{c}{left}{lft}{$q$}{v1,v2}
        \marrow{d}{down}{bot}{$p_3$}{v1,o1}
        \marrow{e}{up}{top}{$p_4$}{v2,o2}
    \end{fmfgraph*}
\end{fmffile}
\end{document}

which is given by @Betohaku as an answer to the question in How does one draw a momentum arrow along a line in feynmf? and it worked.

However, when I swap \usepackage{feynmp-auto} for \usepackage{feynmf}, it doesn't compile. I would like to know which changes should I make so that I can get the same result using the package feynmf.

jmaguire
  • 115
  • Welcome to TeX.SE. Please provide a MWE to clarify your problem. – Roland Nov 03 '21 at 12:07
  • Can you tell us why it does not compile? Did it fail when you ran latex or when you ran mf ? – Thruston Nov 03 '21 at 14:48
  • And perhaps you could clarify why you need to use feynmf at all? – Thruston Nov 03 '21 at 14:49
  • @Thruston, it did compile now in Overleaf but the diagram did not appear. I am trying to use feynmf because I want to submit to ArXiv and when I tried with feynmp-auto the diagrams did not appear. I found then a question at ArXiv's FAQ about feynmf and I could upload the file with the diagrams but only by removing the momentum arrows. – jmaguire Nov 03 '21 at 14:58
  • Hmmm. Did you get a chance to read the user guide? with feynmf you have to run latex so that it creates a .mf file, then run mf on that file with an appropriate output mode, then run dvipdf (or whatever) to produce the output. I do not think Overleaf supports this complex flow. – Thruston Nov 03 '21 at 15:39
  • Your best bet is probably to create your diagrams as separate stand alone PDFs using the standalone class, then include them in your main file as graphics. – Thruston Nov 03 '21 at 15:40
  • @Thruston, I tried to compile this without Overleaf. I think the correct way to compile this is to do pdflatex feynman.tex (feynman.tex was the name I gave to the file) , then type mf '\mode:=laserjet; input marrows' and then type again pdflatex feynman.tex. This worked when I commented the marrow lines. Thus, I don't think it is a compilation problem. – jmaguire Nov 03 '21 at 15:49

0 Answers0