I want to name the left and right hand vertex x and y.but it is not working.
\usepackage{tikz-feynman}
\usepackage[compat=1.1.0]{tikz-feynman}
\usepackage{simpler-wick}
\usetikzlibrary{calc}
\begin{document}
\feynmandiagram[horizontal=a to b, layered layout]{
a[dot]--[fermion,half left,edge label=\(p_1\)]b[dot],a--[fermion,half right,edge label'=\(p_2\)]b[dot],
a--[out=135,in=-135,loop,min distance=2cm,anti fermion,edge label'=\(p_3\)]a,
b--[fermion,out=45,in=-45,loop,min distance=2cm,edge label=\(p_4\)]b
};
\feynmandiagram[horizontal=a to b, layered layout]{
a[particle=\(x\)]--[fermion,half left,edge label=\(p_1\)]b[particle=\(y\)],a--[fermion,half right,edge label'=\(p_2\)]b[dot],
a--[out=135,in=-135,loop,min distance=2cm,anti fermion,edge label'=\(p_3\)]a,
b--[fermion,out=45,in=-45,loop,min distance=2cm,edge label=\(p_4\)]b
};
\end{document}
these codes generate this result. but I cant have both.how i can do that 2 in 1? thank you. :)
{}
above the text field (or use the keyboard shortcut Ctrl + K).\feynmandiagram[...
line.