I find myself often in the situation where I have to arrange graphs generated with feynmp
in equations. This works usually fine, but I have to play around with the space, i.e. I need to add some at the bottom for the text and the graph not to overlap.
Consider the following code
\documentclass{article}
\usepackage{lipsum}
\usepackage{mathtools}
\usepackage{feynman-auto}
\setlength{\unitlength}{.09cm}
\begin{document}
\lipsum[10]
\begin{fmffile}{operator_2}
\begin{align*}
(a)-(b):=
\fmfframe(2,12.5)(2,-12.5){%
\begin{fmfgraph*}(40,25)
\fmfleftn{i}{2}
\fmfrightn{o}{2}
\fmf{dashes}{i1,v,o1}
\fmf{fermion}{i2,v,o2}
\fmfblob{0.15w}{v}
\fmflabel{$p_2$}{i2}
\fmflabel{$p_4$}{i1}
\fmflabel{$p_3$}{o1}
\fmflabel{$p_1$}{o2}
\end{fmfgraph*}%
}
-
\fmfframe(2,12.5)(2,-12.5){%
\begin{fmfgraph*}(40,25)
\fmfleftn{i}{2}
\fmfrightn{o}{2}
\fmflabel{$p_2$}{i2}
\fmflabel{$p_4$}{i1}
\fmflabel{$p_3$}{o1}
\fmflabel{$p_1$}{o2}
\fmf{photon,tension=2,fore=red}{i1,v4}
\fmf{photon,tension=2,fore=red}{o1,v1}
\fmf{dashes,tension=2}{o2,v2}
\fmf{dashes,tension=2}{i2,v3}
\fmfdotn{v}{4}
\end{fmfgraph*}%
}
\end{align*}
\end{fmffile}
\lipsum[10]
\end{document}
which should result in the following output:
The math and the graph are nicely aligned, but I would need to add something like \\\\\\
after the last \fmfframe{}
command to make enough space for the text to fit... Also, it seems that there is unnecessary space between the upper text and the graph. Can this be reduced?
If possible I would like to apply these changes to all environments of the form
\begin{fmffile}{name}
\begin{align*}
\fmfframe()(){}
.
.
.
\end{align*}
\end{fmffile}
I'm not sure if it would be smart to create a new environment for this (and I lack the skill to do it anyways...). Also, I am not interested in solutions that are based on tikz-feynman
.