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.
latexor when you ranmf? – Thruston Nov 03 '21 at 14:48feynmfat all? – Thruston Nov 03 '21 at 14:49feynmfbecause 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:58feynmfyou have to runlatexso that it creates a.mffile, then runmfon that file with an appropriate output mode, then rundvipdf(or whatever) to produce the output. I do not think Overleaf supports this complex flow. – Thruston Nov 03 '21 at 15:39standaloneclass, then include them in your main file as graphics. – Thruston Nov 03 '21 at 15:40pdflatex feynman.tex(feynman.texwas the name I gave to the file) , then typemf '\mode:=laserjet; input marrows'and then type againpdflatex feynman.tex. This worked when I commented themarrowlines. Thus, I don't think it is a compilation problem. – jmaguire Nov 03 '21 at 15:49