\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{tikz-feynman}
\begin{document}
\begin{align*}
\feynmandiagram [inline=(b.base), horizontal=f1 to f2, layered layout] {
f1 [particle=\(p\)] -- [fermion] b [blob] -- [fermion] f2 [particle=\(p\)]
};
&=
\vcenter{\hbox{%
\begin{tikzpicture}
\begin{feynman}
\vertex (a1) at (-1,0) {\(p\)};
\vertex (a3) at (1,0) {\(p\)};
\diagram* {
(a1) -- [fermion] (a3),
};
\end{feynman}
\end{tikzpicture}
}}
+
\vcenter{\hbox{%
\begin{tikzpicture}
\begin{feynman}
\vertex (a1) {\(p\)};
\vertex[right=1cm of a1] (a2);
\vertex[right=0.5cm of a2] (a3);
\vertex[right=0.25cm of a3] (a4);
\vertex[right=1cm of a4] (a5) {\(p\)};
\diagram* {
{
(a1) -- [fermion] (a2) -- (a3) -- (a4) -- [fermion] (a5),
},
(a2) -- [photon, out=90, in=90, looseness=2.0] (a4)
};
\end{feynman}
\end{tikzpicture}
}}
\end{align*}
\end{document}
I would like to have the equal and the plus signs vertically aligned with the fermion lines. With the code above I get this:
which is okay for the one in the middle but not for the other two.
align*
environment and end it withalign
. Do you really need thealign
environment or would it be ok to write everything in a singletikzpicture
?